网络流 (RTSP),但在接收端不显示

Network Streaming (RTSP) but No Display in Receiving Side

提问人:Cloud Cho 提问时间:11/2/2023 更新时间:11/2/2023 访问量:66

问:

我尝试流式传输,但在接收端看不到任何显示。这是我的图表:

一个映像 --> 使用 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 发送

gstreamer rtsp

评论


答:

1赞 SeB 11/2/2023 #1

您可以尝试 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

评论

0赞 Cloud Cho 11/2/2023
我尝试运行命令行,但看起来“h263parse”不在 1.14.5 版中(不知何故 1.8.3 有它 - 我检查过)。如何添加“h263parse”?还是有等价物?gst-inspect-1.0 | grep 263
1赞 SeB 11/2/2023
我正在使用 gstreamer 1.16.3,h263parse 来自 videoparsersbad。你有gst-plugins-bad安装吗?话虽如此,就我而言,h263parse 不是强制性的,您可以尝试省略它。
0赞 Cloud Cho 11/2/2023
感谢您的版本。我会先尝试“坏”。看起来没有“h263parse”不显示视频。
1赞 SeB 11/2/2023
我建议您首先尝试使用以下命令在localhost上使用:并从同一主机进行测试: ̀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=6000gst-launch-1.0 -v udpsrc address=127.0.0.1 port=6000 ! application/x-rtp,encoding-name=H263 ! rtph263depay ! avdec_h263 ! queue ! autovideosink
1赞 SeB 11/2/2023
让我们在聊天中继续讨论