[FFmpeg-user] encoding video from png diffs

Cley Faye cleyfaye at gmail.com
Fri Sep 2 01:17:45 EEST 2016

2016-09-01 19:31 GMT+02:00 Joshua Grauman <jnfo at grauman.com>:

> I could of course generate all the pngs, but it would take up a lot of
> space and I'm wondering if anyone knows of any creative way to do this?
> Thanks!

​You could just do that. There is no need to write them anywhere though;
you can pipe png sequences into ffmpeg directly (I create animations this

I'm not familiar with vcdiff, but as long as you have a tool that produce a
png on a standard output, you could loop over your diffs, piping the output
info ffmpeg. Maybe you'll need a temporary variable storing the resulting
png for the next step, but that will be held in RAM so no worries. Be
careful if you do that though; binary data and shell script variables are
not too friendly. I'd do that in python or another language.

Once you have your script that output the sequence of png on it's standard
output, you can pipe them to ffmpeg using '-' as the input name. Something
like this:
$ your_script | ffmpeg -f png_pipe -i - out.mp4
Don't forget to specify framerate etc.

(of course, if ffmpeg does support such format by itself, ignore this
message; I'm not familiar with *all* the stuff ffmpeg supports either).

More information about the ffmpeg-user mailing list