[FFmpeg-user] how to record stream and take pictures at once?

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue May 21 00:04:57 EEST 2019

Am Mo., 20. Mai 2019 um 22:56 Uhr schrieb erwin mueller via
ffmpeg-user <ffmpeg-user at ffmpeg.org>:

> I want to record a webcam stream for 30 seconds and at the same time I want to take 3 pictures (second 1, 15 and 30)
> I treid this command, fired with a pythn script:
> ffmpeg -i "" -vcodec copy -an -t 30 -bufsize 2048k -y "/home/pi/cam/Klingel-$(date +"%y_%m_%d_%H_%M_%S").mp4" -i  "/home/pi/cam/Klingel-$(date +"%y_%m_%d_%H_%M_%S").mp4" -f image2 -vf fps=1/10 img%03d.jpg
> but this is first recording a mp4 and then taking pictures. Is it possible to have it in parallel?

(Complete, uncut console output missing.)

Just remove "-i Klingel", ffmpeg can produce multiple outputs from one input.

Carl Eugen

More information about the ffmpeg-user mailing list