Gstreamer 无法播放来自其他电脑的流:h264->rtp->udp

时间:2021-07-23 10:34:29

标签: udp gstreamer h.264 rtp

我想通过 UDP 将 h264 视频流式传输到另一台电脑。 我正在使用此管道来生成流:
videotestsrc ! video/x-raw,width=400,height=400,framerate=7/1 ! videoconvert ! x264enc ! h264parse config-interval=1 ! video/x-h264,stream-format=byte-stream,alignment=nal ! rtph264pay ! udpsink host=192.168.1.100 port=2705

我可以在同一台机器(IP地址为 192.168.1.100)上用这个管道播放这个:
udpsrc port=2705 ! application/x-rtp,width=400,height=400,encoding-name=H264,payload=96,framerate=7/1 ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink

但是当我尝试将它从另一台电脑流式传输到同一台机器时,我只得到这个输出并且它永远等待:
将管道设置为 PAUSED ...
流水线是实时的,不需要 PREROLL ...
将管道设置为 PLAYING ...
新时钟:GstSystemClock
重新分配延迟...
重新分配延迟...

这里可能有什么问题?

1 个答案:

答案 0 :(得分:1)

我找到了解决方案。播放管道中需要一个 videoconvert 元素。
工作播放管道是:

udpsrc port=2705 ! application/x-rtp,width=400,height=400,encoding-name=H264,payload=96,framerate=7/1 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! autovideosink