[FFmpeg-user] Take webcam picture with minimal delay

Roger Pack rogerdpack2 at gmail.com
Wed Oct 25 06:49:18 EEST 2017

Maybe overwrite a jpg file "over and over" and just grab a copy of it
on demand when you need it?

On 9/20/17, mail at stefan-kleeschulte.de <mail at stefan-kleeschulte.de> wrote:
> Hi everyone!
> I want to take a picture from a webcam (to send it in a http server's
> response). I already found a command to take a picture and write it to
> stdout (from where I can grab it in the http server):
> ffmpeg -f video4linux2 -video_size 1920x1080 -input_format yuyv422 -i
> /dev/video0 -f image2 -frames:v 1 -qscale:v 1 pipe:1
> The only drawback is that it takes about 3 seconds to get the picture.
> The delay comes from ffmpeg (not from the server/network), probably
> because it needs to wait for the webcam to initialize.
> Now my idea is to somehow keep the webcam active and grab the current
> video frame whenever a http request comes in. But I do not know how to
> do this with ffmpeg (on linux). Can I use one instance of ffmpeg to
> capture the webcam video and stream it *somewhere*, and then use a
> second instance of ffmpeg to extract the current frame of that stream?
> Or is there a better way to do it?
> Thanks!
> Stefan Kleeschulte
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

More information about the ffmpeg-user mailing list