VLC 不适用于 gst-rtsp-server 具有相同编码和 depay 的 3 个管道之一
VLC doenst work on 1 of 3 Pipelines with same encoding and depay from gst-rtsp-server
我这里有一件奇怪的事,我有 3 个不同的媒体工厂添加到我的 RTSP 服务器。其中一个(下面第三个)我只能在另一台机器上玩gst-launch。
下面的前两个在 vlc 和 gst-launch 上工作正常,我不明白为什么第三个不起作用,所有管道只有不同的来源,编码和 depay 在所有 3 个管道上都是相同的。
使用 vlc 和 gst-launch 在其他机器上工作。
compositor name=mix sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=640 sink_1::ypos=0 sink_2::xpos=0 sink_2::ypos=480 sink_3::xpos=640 sink_3::ypos=480 ! queue max-size-time=0 ! videoconvert ! videoscale ! video/x-raw, width=1920, height=1080 ! x264enc key-int-max=5 speed-preset=ultrafast tune=zerolatency ! rtph264pay name=pay0 filesrc location=error.jpg ! jpegdec ! imagefreeze ! textoverlay text="<span foreground='#2f2e41' >K1 Camera not reachable, check camera or IP-Address or Hostname</span>" valignment=top font-desc="Arial, 13" ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. filesrc location=error.jpg ! jpegdec ! imagefreeze ! textoverlay text="<span foreground='#2f2e41' >K2 Camera not reachable, check camera or IP-Address or Hostname</span>" valignment=top font-desc="Arial, 13" ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix.
使用 VLC 和 gst-launch 在其他机器上工作
compositor name=mix sink_0::xpos=0 sink_0::ypos=0 sink_2::xpos=0 sink_2::ypos=480 sink_4::xpos=0 sink_4::ypos=960 ! queue max-size-time=0 ! videoconvert ! videoscale ! video/x-raw, width=1920, height=480 ! x264enc key-int-max=5 speed-preset=ultrafast tune=zerolatency ! rtph264pay name=pay0 souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/mjpg/video.mjpg" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/mjpg/video.mjpg" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/mjpg/video.mjpg" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix.
仅使用 gst-launch 在其他机器上工作
compositor name=mix sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=640 sink_1::ypos=0 sink_2::xpos=1280 sink_2::ypos=0 sink_2::xpos=0 sink_2::ypos=480 sink_3::xpos=640 sink_3::ypos=480 sink_4::xpos=1280 sink_4::ypos=480 ! queue max-size-time=0 ! videoconvert ! videoscale ! video/x-raw, width=1920, height=960 ! x264enc key-int-max=5 speed-preset=ultrafast tune=zerolatency ! rtph264pay name=pay0 rtspsrc latency=200 user-id="admin" user-pw="enercon525244" location="rtsp://<ip-removed>/Streaming/channels/102" ! rtph264depay ! h264parse ! avdec_h264 ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/control/faststream.jpg?stream=full&preview&camera=left&size=640x480&fps=4.0" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/control/faststream.jpg?stream=full&preview&camera=right&size=640x480&fps=4.0" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/control/faststream.jpg?stream=full&preview&camera=left&size=640x480&fps=4.0" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/control/faststream.jpg?stream=full&preview&camera=right&size=640x480&fps=4.0" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix.
在我的 gst-rtsp-server 实例上 GST_DEBUG=1 它 returns 当我用 VLC 尝试它时在最后一个管道上出现错误:
0:00:15.140129410 25881 0x2c59400 ERROR rtspclient rtsp-client.c:1718:handle_play_request: client 0x342a240: media not found
0:00:15.163301390 25881 0x2c59400 ERROR rtspclient rtsp-client.c:1270:handle_teardown_request: client 0x342a240: no media for uri
GST 版本:(主要=1,次要=14,微型=5,纳米=0)
VLC log
satip debug: try to open 'rtsp://<ip-removed>/42342'
satip debug: connect to host '<ip-removed>'
main debug: net: connecting to <ip-removed> port 554
main debug: connection succeeded (socket = 1560)
main debug: net: opening 0.0.0.0 datagram port 9140
main debug: net: opening 0.0.0.0 datagram port 9141
satip error: Failed to play RTSP session
satip error: Failed to teardown RTSP session
main debug: net: connecting to <ip-removed> port 554
main debug: connection succeeded (socket = 1636)
access_realrtsp warning: Cseq mismatch, got 1, assumed 0
access_realrtsp debug: rtsp connected
access_realrtsp warning: only real/helix rtsp servers supported for now
main debug: no access modules matched
main debug: dead input
qt debug: IM: Deleting the input
main debug: changing item without a request (current 0/1)
main debug: nothing to play
我该如何解决这个问题?
首先你应该检查 VLC 日志它不喜欢什么。由于你的最后一个有更多的输入,我可以想象你的合成器有不同的配置。
出乎意料,我猜想在你的最后一个合成器中输出 4:4:4 数据并创建一个 4:4:4 配置文件 H.264 流。玩家很少支持这些流。
如果是这种情况,您应该确保 4:2:0 格式进入 x264enc
或在输出上限定义非 4:4:4 H.264 目标配置文件。
我这里有一件奇怪的事,我有 3 个不同的媒体工厂添加到我的 RTSP 服务器。其中一个(下面第三个)我只能在另一台机器上玩gst-launch。
下面的前两个在 vlc 和 gst-launch 上工作正常,我不明白为什么第三个不起作用,所有管道只有不同的来源,编码和 depay 在所有 3 个管道上都是相同的。
使用 vlc 和 gst-launch 在其他机器上工作。
compositor name=mix sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=640 sink_1::ypos=0 sink_2::xpos=0 sink_2::ypos=480 sink_3::xpos=640 sink_3::ypos=480 ! queue max-size-time=0 ! videoconvert ! videoscale ! video/x-raw, width=1920, height=1080 ! x264enc key-int-max=5 speed-preset=ultrafast tune=zerolatency ! rtph264pay name=pay0 filesrc location=error.jpg ! jpegdec ! imagefreeze ! textoverlay text="<span foreground='#2f2e41' >K1 Camera not reachable, check camera or IP-Address or Hostname</span>" valignment=top font-desc="Arial, 13" ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. filesrc location=error.jpg ! jpegdec ! imagefreeze ! textoverlay text="<span foreground='#2f2e41' >K2 Camera not reachable, check camera or IP-Address or Hostname</span>" valignment=top font-desc="Arial, 13" ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix.
使用 VLC 和 gst-launch 在其他机器上工作
compositor name=mix sink_0::xpos=0 sink_0::ypos=0 sink_2::xpos=0 sink_2::ypos=480 sink_4::xpos=0 sink_4::ypos=960 ! queue max-size-time=0 ! videoconvert ! videoscale ! video/x-raw, width=1920, height=480 ! x264enc key-int-max=5 speed-preset=ultrafast tune=zerolatency ! rtph264pay name=pay0 souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/mjpg/video.mjpg" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/mjpg/video.mjpg" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/mjpg/video.mjpg" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix.
仅使用 gst-launch 在其他机器上工作
compositor name=mix sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=640 sink_1::ypos=0 sink_2::xpos=1280 sink_2::ypos=0 sink_2::xpos=0 sink_2::ypos=480 sink_3::xpos=640 sink_3::ypos=480 sink_4::xpos=1280 sink_4::ypos=480 ! queue max-size-time=0 ! videoconvert ! videoscale ! video/x-raw, width=1920, height=960 ! x264enc key-int-max=5 speed-preset=ultrafast tune=zerolatency ! rtph264pay name=pay0 rtspsrc latency=200 user-id="admin" user-pw="enercon525244" location="rtsp://<ip-removed>/Streaming/channels/102" ! rtph264depay ! h264parse ! avdec_h264 ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/control/faststream.jpg?stream=full&preview&camera=left&size=640x480&fps=4.0" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/control/faststream.jpg?stream=full&preview&camera=right&size=640x480&fps=4.0" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/control/faststream.jpg?stream=full&preview&camera=left&size=640x480&fps=4.0" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix. souphttpsrc ssl-strict=false is-live=true user-id="<user-removed>" user-pw="<pwd-removed>" location="http://<ip-removed>/control/faststream.jpg?stream=full&preview&camera=right&size=640x480&fps=4.0" do-timestamp=true ! multipartdemux ! jpegdec ! videoscale ! video/x-raw, width=640, height=480 ! queue ! mix.
在我的 gst-rtsp-server 实例上 GST_DEBUG=1 它 returns 当我用 VLC 尝试它时在最后一个管道上出现错误:
0:00:15.140129410 25881 0x2c59400 ERROR rtspclient rtsp-client.c:1718:handle_play_request: client 0x342a240: media not found
0:00:15.163301390 25881 0x2c59400 ERROR rtspclient rtsp-client.c:1270:handle_teardown_request: client 0x342a240: no media for uri
GST 版本:(主要=1,次要=14,微型=5,纳米=0)
VLC log
satip debug: try to open 'rtsp://<ip-removed>/42342'
satip debug: connect to host '<ip-removed>'
main debug: net: connecting to <ip-removed> port 554
main debug: connection succeeded (socket = 1560)
main debug: net: opening 0.0.0.0 datagram port 9140
main debug: net: opening 0.0.0.0 datagram port 9141
satip error: Failed to play RTSP session
satip error: Failed to teardown RTSP session
main debug: net: connecting to <ip-removed> port 554
main debug: connection succeeded (socket = 1636)
access_realrtsp warning: Cseq mismatch, got 1, assumed 0
access_realrtsp debug: rtsp connected
access_realrtsp warning: only real/helix rtsp servers supported for now
main debug: no access modules matched
main debug: dead input
qt debug: IM: Deleting the input
main debug: changing item without a request (current 0/1)
main debug: nothing to play
我该如何解决这个问题?
首先你应该检查 VLC 日志它不喜欢什么。由于你的最后一个有更多的输入,我可以想象你的合成器有不同的配置。
出乎意料,我猜想在你的最后一个合成器中输出 4:4:4 数据并创建一个 4:4:4 配置文件 H.264 流。玩家很少支持这些流。
如果是这种情况,您应该确保 4:2:0 格式进入 x264enc
或在输出上限定义非 4:4:4 H.264 目标配置文件。