我正在尝试使用Ubuntu 18.04将Jetson TX2的HCSI编码的CSI输入流传输到gstreamer的UDP多播。我经历了整个互联网,并尝试了所有代码,但无法通过URL或SDP文件通过VLC连接到它。但是我可以从另一台gstreamer实例从同一台计算机连接到它。目标是能够从浏览器连接到流,但是我想使其与VLC一起使用会更容易。
服务器代码:
gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=239.127.1.21 port=5000
接收方代码:
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! xvimagesink
这有效,并且接收器代码随视频一起打开窗口。当我尝试通过VLC接收时,我遇到了一些问题,但基本上没有任何效果,并且VLC仅在连接,我尝试过:
vlc udp://:5000
vlc rtp://:5000
错误:A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (96).
vlc udp://239.127.1.21:5000
vlc rtp://239.127.1.21:5000
(与上述rtp...
相同的错误)vlc v.sdp
和sdp文件:v=0
c=IN IP4 239.192.1.21
m=video 5000 RTP/AVP 96
a=rtpmap:96 H264/90000
我尝试了各种IP,例如服务器的IP,本地主机,尝试从另一台计算机进行连接,并尝试了客户端IP和服务器IP的各种组合。我也无法连接到单播,但是我需要使多播工作。
所以我的问题基本上是:如何从浏览器连接到gstreamer流。
答案 0 :(得分:1)
你能尝试
gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! rtph264pay mtu=1400 config-interval=1 pt=96 ! udpsink host=239.127.1.21 port=5000
带有sdp文件
v=0
c=IN IP4 239.127.1.21
m=video 5000 RTP/AVP 96
a=rtpmap:96 H264/90000