mpromonet / v4l2rtspserver

RTSP Server for V4L2 device capture supporting HEVC/H264/JPEG/VP8/VP9
The Unlicense
1.86k stars 428 forks source link

RTSP stream seems to break when using -S stream... at least in ffplay #117

Closed aerik closed 5 years ago

aerik commented 5 years ago

First, thanks for this library - I am using it for small raspberry pi zero security cams.

This is on a raspberry pi zero w, with stretch lite. and a version 2 "noir" camera. I built v4l2rtspserver successfully, and when I ran it with the -S option, I could open a webpage an see the video in the HLS player in Chrome - very cool! But MotionEye did not show the (tcp based, not udp) RTSP stream, so I tested it with ffplay and could not view it there either. I removed the -S flag and it worked in both places.

Is this by design? Or am I hitting some limit of the Pi Zero?

(It would be super cool if the -S option still worked, but I could still use the rtsp stream in MotionEye)

mpromonet commented 5 years ago

Hi Aerik,

Using -S option, the H264 stream is muxed in TS (Transport Stream). The TS segment is the playlist of HLS or MPEG#. The RTP stream is then video/MP2T instead of video/H264 . Steaming video/H264 through RTP and TS through HLS/MPEG# is possible, it needs to implement it. An other approach could be to use 2 instances of v4l2rtspserver one with -S and the other without that read from a v4l2loopback device.

Best Regards, Michel.