Search code examples
gstreamerpython-gstreamer

VLC doenst work on 1 of 3 Pipelines with same encoding and depay from gst-rtsp-server


I have a strange thing here, I have 3 different Media Factories added to my RTSP Server. One of them (third one below) I can only play with gst-launch on a different machine.

The first two below works fine on vlc and gst-launch, what I didn't understand is why third one doesn't work, all pipelines has only different sources, encoding and depay is same on all 3 pipelines.

Work on other machine with vlc and 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.

Work on other machine with VLC and 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.

Work on other machine only with 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.

With GST_DEBUG=1 on my gst-rtsp-server instance it returns that error on the last Pipeline when I tried it with 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-VERSION: (major=1, minor=14, micro=5, nano=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

How can I fix this?


Solution

  • First of all you should check the VLC log what it doesn't like. Since your last one has more inputs I can imagine that your compositor has a different configuration.

    Out of the blue I would guess that in your last one the compositor outputs 4:4:4 data and creates a 4:4:4 profile H.264 stream. These streams are rarely supported by players.

    If that's the case you should make sure a 4:2:0 format goes into x264enc or define a non-4:4:4 H.264 target profile on the output caps.