I have two cameras A and B. Both cameras stream a H264 over RTP. Camera A with 40Mbps and camera B with 25Mbps.
When I connect the two cameras and my display to a Switch only camera A will show. Sometimes I got a picture form camera B. When I disconnect camera A I will see the stream of camera B.
But when I connect camera A and my display to Switch 1 and camera B to Switch 2 and connect both Switch by a patch cable I can receive both streams without any judder.
I did some inverstigations. I did a record with tcpdump and analyzed it with wireshark. There I can see that RTP frames of camera B are missing when I only use one Switch.
It is independent of the Switch. I tested several Swichtes (100Mbps and 1000Mbps).
When I connect two cameras of type A or two cameras of type B to one Switch I can show their streams without any problems. It even works when the bandwith increase up to 90Mbps. I only got problems when I combine camera A with camera B.
Any ideas?
Thanks
@MicMoba
Hello,
Perhaps the second switch provides additional buffering and this improves performance.
Please try to increase Gstreamer buffering.
Regards,
Yuri.
Hello,
thanks for reply. I put a block scheme to the attachment. My OS is a Yocto based embedded Linux. Kernel 4.14.126.
Display:
IP: 192.168.0.75
Mask: 255.255.255.0
CPU: i.MX6Quad
Ehternet: 100Mbps
Resolution: 800x480px
CAM_A:
IP:192.168.0.120
Mask: 255.255.255.0
Streaming IP: 192.168.0.75
Streaming Port: 10002
Streaming MAC: Displays MAC
Codec: H264
Streaming mode: RTP over UDP
Bitrate: 40000kbps
Resolution: 1280x800px
CAM_B:
IP:192.168.0.100
Mask: 255.255.255.0
Streaming IP: 192.168.0.75
Streaming Port: 5002
Streaming MAC: Displays MAC
Codec: H264
Streaming mode: RTP over UDP
Bitrate: 25000kbps
Resolution: 1280x800px
Switch:
I tried several Switch 10/100Mbit, 100/1000Mbit, with and without PoE support
My Script (steam2.sh):
gst-launch-1.0 -v udpsrc port=5002 ! application/x-rtp,payload=96 ! rtph264depay ! queue ! h264parse ! imxvpudec ! imxipuvideosink sync=false window-x-coord=400 window-y-coord=0 window-width=400 window-height=480 force-aspect-ratio=false &
gst-launch-1.0 -v udpsrc port=10002 ! application/x-rtp,payload=96 ! rtph264depay ! queue ! h264parse ! imxvpudec ! imxipuvideosink sync=false window-x-coord=0 window-y-coord=0 window-width=400 window-height=480 force-aspect-ratio=false
The issue is also there when I only show one stream with:
gst-launch-1.0 -v udpsrc port=5002 ! application/x-rtp,payload=96 ! rtph264depay ! queue ! h264parse ! imxvpudec ! imxipuvideosink sync=false force-aspect-ratio=false
If I display CAM_B I will only get a picture here and there. If I display CAM_A everything is okay.
Hello,
Please let me know more details about the system: block scheme, OS, (gstreamer) commands,
used to get the streams.
Regards,
Yuri.