v4l2rtspserver
v4l2rtspserver copied to clipboard
ffmpeg rtsp_transport tcp not working when running on same machine / remote causes local to work
Describe the bug
Openwrt 22.03.3, v4l2rtspserver 2.3
Running v4l2rtspserver on an embedded devices. streaming, running no errors.
When running ffmpeg from the local device/console rtsp over tcp does not work properly. ffmpeg connects but never recieves any frames. However, when running from any other pc on the local network it does work. Local rtsp over udp works fine with ffmpeg. **Also, if a remote ffmpeg connects, the local one will start to connect as well.
Working: -- Running LOCAL and remote using the IP ffmpeg -i rtsp://localhost:554/stream -acodec copy -vcodec copy /tmp/lala.mp4 ffmpeg -i rtsp://192.168.1.200:554/stream -acodec copy -vcodec copy /tmp/lala.mp4
Not Working LOCAL , but does work remote. ffmpeg -rtsp_transport tcp -i rtsp://localhost:554/stream -acodec copy -vcodec copy /tmp/lala.mp4 ffmpeg -rtsp_transport tcp -i rtsp://192.168.1.200:554/stream -acodec copy -vcodec copy /tmp/lala.mp4
we also tried the -I setting to force the interface. all firewall rules are disabled and allowed (hence why it works over the network)
To Reproduce Run v4l2rtspserver with usb camera h264 Try to connect with ffmpeg using rtsp_transport tcp Does not connect remote tcp it works.
Expected behavior Expected that it will work on the same machine using TCP.
Hi,
You should get more information enabling ffmpeg logs, or using network tool like tcpdump or tshark.
Best Regards, Michel.