[FFmpeg-user] Export screenshot then pipe each to external program

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Sep 8 16:36:27 EEST 2016


2016-09-07 19:10 GMT+02:00 Adnan RIHAN <axel50397 at gmail.com>:

> $ ffmpeg -i video.mp4 -vf fps=1/5 -c:v png -f image2pipe - | myProgram -
>
> Maybe I haven’t handled correctly something. How does ffmpeg proceed
> to write to the standard output in that case? Does it buffer until it finishes
> then write to myProgram standard input (all in once)? Or does it open
> the standard output and write each image as they're treated?

FFmpeg will continuously write png frames to stdout, do not assume that
you can detect frame boundaries without using a (png) parser.

Instead of pipe, you can use a filename above ("out") and then check if
the file contains what you expect.
You can also do "ffmpeg -i out -qscale 2 out.avi" to see that (if) FFmpeg
can read what above line produces.

Carl Eugen


More information about the ffmpeg-user mailing list