我正在使用gstreamer连接到流式视频,该视频是原始UDP多播上的原始H.264基本流.我发现当我只有 eth0
它时,它连接得很好:
gst-launch udpsrc uri=udp://239.255.43.43:4444 ! h264parse ! ffdec_h264 ! xvimagesink sync=false
但是,当我提出这两个问题时wlan0
,eth0
我会遇到问题.我使用wlan0
我的主要互联网连接,eth0
并在我的本地局域网上,流媒体视频服务器.我有wlan0
默认路线:
host$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0
当我尝试连接此配置时,gstreamer只是坐在select()
呼叫上等待连接.
解决方案是告诉gstreamer用于接收多播UDP流的接口:
gst-launch udpsrc multicast-iface="eth0" uri=udp://239.255.43.43:4444 ! h264parse ! ffdec_h264 ! xvimagesink sync=false