I've got go2rtc running on a Raspberry Pi 4, and everything seems to work well except that I'm unable to play content from more than one client at the same time. Each of them plays perfectly if used alone, but once one of them starts playing, the rest can't start getting any video.
I've configured go2rtc to give me debug info and every time I try to play on a second client, it tries to start ("DBG [rtsp] new consumer stream=test") and when I press stop, a disconnect message is printed. But that's it. The clients are varied; two VLC on Mac and Windows and ffplay on Linux. ffplay gives "decode_slice_header error / no frame!" errors, preceded by "non-existing PPS 0 referenced" messages.
I've tried serving a local .mp4 file, a /dev/video0 device, a ffmpeg exec stream, etc. and all of them present the same problem. I've also noticed that if I try to override -rtsp_transport tcp by using an output: entry, or try to force UDP, it says that the protocol is not supported. Maybe it's related to the problem?
Finally, I've tried mediamtx, and the problem does not arise but I'd rather use go2rtc for its flexibility.
My config is as basic as it gets:
streams:
myexec:
exec:ffmpeg -re -fflags nobuffer -flags low_delay -i /dev/video0 -vcodec h264_v4l2m2m -b:v 4M -an -f rtsp {output}
mydevice:
ffmpeg:device?video=/dev/video0&input_format=bgr24&video_size=1024x1024#video=h264#hardware
mytest:
ffmpeg:/home/pi/test.mp4#video=h264#hardware
ffmpeg:
h264:
"-vcodec h264_v4l2m2m -b:v 4M -an"
log:
level: debug # default level
exec: debug
rtsp: debug
streams: debug
Any ideas?
I've got go2rtc running on a Raspberry Pi 4, and everything seems to work well except that I'm unable to play content from more than one client at the same time. Each of them plays perfectly if used alone, but once one of them starts playing, the rest can't start getting any video.
I've configured go2rtc to give me debug info and every time I try to play on a second client, it tries to start ("DBG [rtsp] new consumer stream=test") and when I press stop, a disconnect message is printed. But that's it. The clients are varied; two VLC on Mac and Windows and ffplay on Linux. ffplay gives "decode_slice_header error / no frame!" errors, preceded by "non-existing PPS 0 referenced" messages.
I've tried serving a local .mp4 file, a /dev/video0 device, a ffmpeg exec stream, etc. and all of them present the same problem. I've also noticed that if I try to override -rtsp_transport tcp by using an output: entry, or try to force UDP, it says that the protocol is not supported. Maybe it's related to the problem?
Finally, I've tried mediamtx, and the problem does not arise but I'd rather use go2rtc for its flexibility.
My config is as basic as it gets:
Any ideas?