0

I've got a computer that has a usb webcam attached to it. I currently use this with OBS for live streaming 24/7 to a remote streaming service.

However, if i e.g try to ffmpeg or opencv from the same camera, for a different purpose, the /dev/video0 will be unavailable/busy while OBS is streaming from it.

How can i use ffmpeg to make the /dev/video0 webcam's feed available (and uncompressed/raw) to multiple clients/processes running on the same computer, while preferably keeping the need for resource-hungry encoding/decoding/reencoding going on down to a minimum? (the pc is semi-potato)

ffplay -f video4linux2 -list_formats all /dev/video0

gives me:

[video4linux2,v4l2 @ 0x7ffa10000bc0] Raw       :     yuyv422 :           YUYV 4:2:2 : 640x480 160x120 176x144 320x176 320x240 352x288 432x240 544x288 640x360 752x416 800x448 800x600 864x480 960x544 960x720 1024x576 1184x656 1280x720 1280x960
[video4linux2,v4l2 @ 0x7ffa10000bc0] Compressed:       mjpeg :          Motion-JPEG : 640x480 160x120 176x144 320x176 320x240 352x288 432x240 544x288 640x360 752x416 800x448 800x600 864x480 960x544 960x720 1024x576 1184x656 1280x720 1280x960

Some perhaps relevant notes:

Also, if there's perhaps even some better software solution than using ffmpeg to achieve this, i'd appreciate any tips on that as well.

DhP
  • 263

0 Answers0