Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oneflow-local-ffmpeg

FFmpeg media operations for OneFlow, running on the machine that already spawned the plugin. No Modal account, no GPU, no cloud round-trip.

Serves six ABI slots:

Slot Does
concat-videos Joins clips — stream copy when the codecs match, re-encode otherwise
extract-audio Pulls the audio track out as mp3
merge-video-audio Muxes a video and an audio asset
remove-video-audio Strips the audio track, copying the video stream
get-first-frame First frame as PNG
get-last-frame Last frame as PNG

This replaces tongflow-modal-ffmpeg, whose own manifest described it as "no model weights — pure media processing" while still requesting a cloud container. See ADR-0011.

Prerequisites

None required. The plugin resolves an ffmpeg binary in this order:

  1. FFMPEG_BIN — an explicit path, if you set one
  2. ffmpeg on PATH
  3. the imageio-ffmpeg wheel, pulled in by moviepy

System ffmpeg is preferred because its codec and filter coverage is wider than the bundled build. The wheel is the safety net, so a machine with nothing installed still works.

If all three fail the plugin returns an error naming the fix — it never quietly finds a different binary.

Pointing at a specific ffmpeg

export FFMPEG_BIN=/opt/homebrew/bin/ffmpeg

FFMPEG_BIN is optional. A bogus value is an error rather than a silent fall-through to PATH: if you named a binary, you meant that one.

Tests

pip install -r requirements.txt pytest
python -m pytest tests/ -v

The fixtures are generated 1-second clips (tiny.mp4 with audio, silent.mp4 without, tone.mp3), so the repo stays small and the suite is reproducible.

License

AGPL-3.0, matching OneFlow.

About

FFmpeg media operations for OneFlow, running locally — no Modal account, no GPU.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages