[FFmpeg-user] custom video enhancements using ffmpeg

Robert Krüger krueger at lesspain.de
Sat Jul 28 11:21:59 CEST 2012

On Sat, Jul 28, 2012 at 7:11 AM, Matt Bione <matt.bione at gmail.com> wrote:
> Hi,
>    I am looking to do the following :
> Add some custom enhancement (using my own code using opencv or something
> similar) to a video.
> I am looking at ffmpeg to produce raw frames which I can tweak and then
> give back to the ffmpeg to transcode it back. Is there a way to do this
> using the ffmpeg command line tools - maybe using pipes or creating streams
> ? I can think of a really inefficient way to do this - dump every frame to
> the disk using ffmpeg (e.g. , ffmpeg -i video.mpg image%d.jpg); read those
> files and apply my modifications to those images and finally call ffmpeg to
> produce a video using those frames(e.g. ffmpeg -f image2 -i image%d.jpg
> video.mpg ). But hopefully there is a better way that someone can point me
> to ?
> Regards
> Matt

look at libavfilter (http://ffmpeg.org/ffmpeg.html#Filtering). or what
you describe you would typically implement your own videofilter,
compile it into your version of ffmpeg and use it on the command line.
There are many examples of this in the codebase. Look for files vf_*.c
and take a look at /doc/examples/filtering_video.c.

More information about the ffmpeg-user mailing list