GStreamer 不通过 udp 流连接显示视频
GStreamer doesn't show video over an udp stream connection
按照 Youtube 上的葡萄牙语教程,执行的命令是:
来源:
gst-launch-1.0 videotestsrc \
! decodebin \
! x264enc \
! rtph264pay \
! udpsink host=localhost port=7001
接收器:
gst-launch-1.0 \
udpsrc port=7001 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" \
! rtph264depay \
! decodebin \
! videoconvert \
! autovideosink
这对他有用,通过 udp 连接显示了一个视频,在我的情况下它没有显示任何内容。
结果:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
运行 Ubuntu 20.04 全新安装。
已通过将 host=localhost
更改为 host=127.0.0.1
来修复
按照 Youtube 上的葡萄牙语教程,执行的命令是:
来源:
gst-launch-1.0 videotestsrc \
! decodebin \
! x264enc \
! rtph264pay \
! udpsink host=localhost port=7001
接收器:
gst-launch-1.0 \
udpsrc port=7001 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" \
! rtph264depay \
! decodebin \
! videoconvert \
! autovideosink
这对他有用,通过 udp 连接显示了一个视频,在我的情况下它没有显示任何内容。
结果:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
运行 Ubuntu 20.04 全新安装。
已通过将 host=localhost
更改为 host=127.0.0.1