提问人:Cloud Cho 提问时间:11/2/2023 更新时间:11/2/2023 访问量:66
网络流 (RTSP),但在接收端不显示
Network Streaming (RTSP) but No Display in Receiving Side
问:
我尝试流式传输,但在接收端看不到任何显示。这是我的图表:
一个映像 --> 使用 UDP 的 RTSP(使用 GStreamer) --> ?
这是我在终端中的命令行和输出:
从 Github 帖子发送(服务器)
并修改“x264enc”-->计算机的 “avenc_h263”
IP 地址为 192.168.3.30。
gst-launch-1.0 -v multifilesrc location=./IMG_7995.JPG loop=true ! jpegdec ! videoconvert ! videoscale ! videorate ! video/x-raw,framerate=30/1 ! avenc_h263 ! rtph263ppay pt=96 ! udpsink host=192.168.3.30 port=6000
** (gst-launch-1.0:11311): CRITICAL **: gst_ffmpeg_cfg_set_property: assertion 'qdata->size == sizeof (gint64)' failed
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)4032\,\ height\=\(int\)3024\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)1:4:0:0\,\ framerate\=\(fraction\)0/1"
从 GStreamer 示例接收(客户端),
修改“ffdec_h263”-->“avdec_h263”,并删除“queue-delay=0”,因为没有元素的错误
gst-launch-1.0 udpsrc port=6000 ! application/x-rtp, clock-rate=90000,payload=96 ! rtph263pdepay ! avdec_h263 ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
我在输出中没有看到任何错误(或我只是没有注意到的输出错误?),但没有显示。我实际上执行了 GStreamer 的 [诊断] 来验证我的 GStreamer 安装,这很好。我还在发送方和接收方之间切换计算机。
我期待一个视频从接收计算机的发送端播放图像。
我在 GStreamer 管道中错过了什么?谢谢。
运行环境
操作系统:Ubuntu 18.04 接收和 16.04 发送 GStreamer:1.14.5 接收和 1.8.3 发送
答:
您可以尝试 rtph263pay 而不是 rtph263ppay。
以下内容对我有用:
寄件人:
gst-launch-1.0 -v multifilesrc location=./IMG_7995.JPG loop=true ! jpegdec ! videoconvert ! videoscale ! videorate ! video/x-raw,framerate=30/1 ! avenc_h263 ! h263parse ! rtph263pay pt=96 ! udpsink host=192.168.3.30 port=6000
接收器 (192.168.3.30):
gst-launch-1.0 -v udpsrc address=192.168.3.30 port=6000 ! application/x-rtp,encoding-name=H263 ! rtph263depay ! h263parse ! avdec_h263 ! queue ! xvimagesink
评论
gst-inspect-1.0 | grep 263
gst-launch-1.0 -v videotestsrc ! videoconvert ! videoscale ! videorate ! video/x-raw,framerate=30/1 ! avenc_h263 ! rtph263pay pt=96 ! udpsink host=127.0.0.1 port=6000
gst-launch-1.0 -v udpsrc address=127.0.0.1 port=6000 ! application/x-rtp,encoding-name=H263 ! rtph263depay ! avdec_h263 ! queue ! autovideosink
评论