ffmpeg-python icon indicating copy to clipboard operation
ffmpeg-python copied to clipboard

It is possible use this library to stream a local camera?

Open blademckain opened this issue 6 years ago • 4 comments

It is possible use this library to stream a local camera ( like /dev/video ) in a web page ( using flask or another webserver ) ?

blademckain avatar Sep 26 '19 15:09 blademckain

any help? a simple example of how to stream /dev/video0 in h264 through a web page would be perfect

blademckain avatar Oct 02 '19 10:10 blademckain

@blademckain I would not recommend trying this with ffmpeg - the part of the library that used to do this has been removed.

I think you'll have a lot easier time using something like https://github.com/mpromonet/v4l2rtspserver to provide an RTSP feed of a webcam.

spirulence avatar Oct 28 '19 02:10 spirulence

That said, if you need to do some processing in the middle, you might use ffmpeg V4L support to read from the input and then output as a V4L device. I haven't played with this, as I don't have a Linux machine with a webcam at the moment.

spirulence avatar Oct 28 '19 02:10 spirulence

An input parameter for ffmpeg to capture from local web camera is: -i video=My_web_cam_name. This parameter works at least in Windows. An attempt to use: ffmpeg.input('video=My_web_cam_name') raises error video="Unity Video Capture": Invalid argument.

How to read the local web camera with ffmpeg-python in Windows?

igrowing avatar Nov 15 '22 15:11 igrowing