v4l2rtspserver icon indicating copy to clipboard operation
v4l2rtspserver copied to clipboard

RTSP Server With a V4l2Loopback camera

Open alecatalfamo opened this issue 3 years ago • 1 comments

I'm trying to launch [v4l2rtspserver] passing a v4l2loopback camera in which a mp4 file is redirected. The problem is that that camera does not support any requested formats. Does exist a solution for this problem?. I attach the error returned by v4l2loopback but you can imagine it.

[ERROR] /home/pi/Desktop/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:207
        /dev/video3: Cannot set format:H264 Invalid argument
[ERROR] /home/pi/Desktop/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:207
        /dev/video3: Cannot set format:MJPG Invalid argument
[ERROR] /home/pi/Desktop/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:207
        /dev/video3: Cannot set format:JPEG Invalid argument
[ERROR] /home/pi/Desktop/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:83
        Cannot init device:/dev/video3
[NOTICE] /home/pi/Desktop/v4l2rtspserver/v4l2wrapper/src/V4l2MmapDevice.cpp:141
VIDIOC_STREAMOFF: Bad file descriptor
VIDIOC_REQBUFS: Bad file descriptor

alecatalfamo avatar Apr 08 '22 10:04 alecatalfamo

Hi,

If this is a v4l2loopback, the capture format is fixed by the loopback input. Then it needs to be in a format supported by v4l2rtspserver or you can convert it with something like https://github.com/mpromonet/v4l2tools or some ffmpeg/gstreamer command.

Best Regards, Michel.

mpromonet avatar Apr 08 '22 19:04 mpromonet