Home

Awesome

Minimal example of an ffmpeg video filter which applies a pair of OpenGL shaders to each frame of its input, and emits the shaded frames.

Building

~/FFmpeg$ ln -s ~/ffmpeg-opengl/vf_gearstitch.c libavfilter/
~/FFmpeg$ git apply ~/ffmpeg-opengl/FFmpeg.diff
~/FFmpeg$ ./configure  --enable-libx264 --enable-filter=genericshader \
          --enable-gpl --enable-opengl --extra-libs='-lGLEW -lglfw'
~/FFmpeg$ make

Running

./ffmpeg -i input.mp4 -vf genericshader -y output.mp4

License

ffmpeg-opengl is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.