QGroundControl RTSP Video stream only works after editing and re-editing the RTSP address, no matter if the address was correct in the beginning

Hello everyone,
I have an intermittent, incredibly annoying problem with video streaming to QGroundControl which I just cannot understand, because sometimes it works, sometimes it doesn’t.

I use a chinese IP camera which is sending RTSP video over Ethernet cable. I use it in two configurations: 1) (this is the problematic configuration) camera is connected via ethernet cable to a PC running QGroundControl 4.4.3 and 2) connected to a Herelink Air Unit 1.1 via ethernet port, then sending and receiving video on the HereLink Ground Unit.

The Herelink configutarion works fine every time. Herelink is running QGC version 4.4.0.1.

On my PC the video stream is generally present, I know this because I can access it via web browser client and it works every time. However on QGC it will not work until I do a little dance. The Video source in QGC is set correctly: RTSP source is set and the address is correct. I power on the camera, turn on QGC and there is no video stream (BUT! The record button is red, while it should be grayed out if there was no video stream at all!). I need to go back to QGC settings, edit the rtsp address by adding literally anything (I discovered this while troubleshooting by adding :[port nr], but the actual number makes no difference), go back to see if there is still no video stream (obviously not, as now the RTSP address is INCORRECT and the REC button is GRAY), then go back to settings, erase the incorrect addition, and TADAA, the video stream appears.

However when I turn off QGC and turn it back on again, not only there will be no video stream, but doing the same “dance” sometimes will, and sometimes will not end up with a working video stream. Sometimes I need to restart QGC or edit the RTSP address a couple of times (like 2-3-4 Times) before the video appears.

I would be very grateful if someone could help me identify and eliminate the problem.

I cannot attach a txt file as apparently it is not allowed, so I pasted a log here below. It is from an attempt where I booted the whole system (no video on GQC), edited the address (still no video), edited the address again, video appeared.

Thank you all!

[D] at D:\a\qgroundcontrol\qgroundcontrol\src\QGCApplication.cc:285 - “Settings location “C:/Users/wojci/AppData/Roaming/QGroundControl.org/QGroundControl.ini” Is writable?: true”
[D] at D:\a\qgroundcontrol\qgroundcontrol\src\QGCLoggingCategory.cc:122 - “Filter rules “*Log.debug=false\nLinkManagerLog.debug=true\nLinkManagerVerboseLog.debug=true\nGStreamerAPILog.debug=true\nqt.qml.connections=false””
[D] at D:\a\qgroundcontrol\qgroundcontrol\src\QGCApplication.cc:388 - “System reported locale: QLocale(Polish, Latin, Poland) ; Name “pl_PL” ; Preffered (used in maps): “pl-PL””
[D] at D:\a\qgroundcontrol\qgroundcontrol\src\Vehicle\MAVLinkLogManager.cc:360 - “MAVLink logs directory: “C:/Users/wojci/OneDrive/Dokumenty/QGroundControl/Logs””
[D] at D:\a\qgroundcontrol\qgroundcontrol\src\QtLocationPlugin\QGCMapEngine.cpp:164 - “Map Cache in: “C:/Users/wojci/AppData/Local/cache/QGCMapCache300” / “qgcMapCache.db””
[D] at qrc:/qml/FlightDisplayViewUVC.qml:54 - “UVC Video output visible: false”
[D] at D:\a\qgroundcontrol\qgroundcontrol\src\MissionManager\MissionController.cc:2371 - “setCurrentPlanViewSeqNum”
[D] at D:\a\qgroundcontrol\qgroundcontrol\src\MissionManager\MissionController.cc:2371 - “setCurrentPlanViewSeqNum”
[!] at D:\a\qgroundcontrol\qgroundcontrol\src\VideoReceiver\GstVideoReceiver.cc:1476 - “gst_element_link_pads() failed”
[D] at D:\a\qgroundcontrol\qgroundcontrol\src\comm\LinkManager.cc:400 - “New auto-connect UDP port added”
[D] at D:\a\qgroundcontrol\qgroundcontrol\src\comm\LinkManager.cc:881 - “allocateMavlinkChannel 1”
[D] at D:\a\qgroundcontrol\qgroundcontrol\src\QGCApplication.cc:850 - "“v4.4.3"”
[!] at D:\a\qgroundcontrol\qgroundcontrol\src\VideoReceiver\GstVideoReceiver.cc:1373 - “GStreamer error: Could not read from resource.”
[!] at …/gst-libs/gst/rtsp/gstrtspconnection.c:1052 - “(NULL) failed to connect: Operation was cancelled”
[!] at …/gst/rtsp/gstrtspsrc.c:5137 - “ Could not connect to server. (Generic error)”
[!] at D:\a\qgroundcontrol\qgroundcontrol\src\VideoReceiver\GstVideoReceiver.cc:1148 - “Unable to link video sink”
[!] at D:\a\qgroundcontrol\qgroundcontrol\src\VideoReceiver\GstVideoReceiver.cc:1060 - “_addVideoSink() failed”
[!] at D:\a\qgroundcontrol\qgroundcontrol\src\VideoReceiver\GstVideoReceiver.cc:1476 - “gst_element_link_pads() failed”
[!] at D:\a\qgroundcontrol\qgroundcontrol\src\VideoReceiver\GstVideoReceiver.cc:1476 - “gst_element_link_pads() failed”
[D] at D:\a\qgroundcontrol\qgroundcontrol\src\comm\LinkManager.cc:454 - “Found Zero-Conf: “_dosvc._tcp.local.” “HP-Wojtek-Abris” “HP-Wojtek-Abris.local.” 7680 QMap((“P”, “65280”)(“SH00”, “ayCLi8lCgXDjD/1y”))”

I wonder if your camera is MAVLink enabled and sends it RTSP address as part of the STREAM_INFORMATION.uri field. Potentially, that address is not correct and could be confusing QGC.

Can you enable the CameraManagerLog in Application settings → Console, and check if you see something. And maybe also look at Analyze Tools → MAVLink Inspector and look out for any VIDEO_STREAM_INFORMATION messages arriving.

Hi, thank you for the reply. There is no information on the manufacturer’s website about being MAVLink enabled and there are no options and no mention of MAVLink in the browser-accessible menu. The camera is quite simple and cheap, designed mostly as a simple OEM security IP camera.

I will look at the logs, but I have a question regarding the procedure. Should I be looking and the logs and the MAVLink Inspector while the video problem is present (so for example in a situation where everything is physically connected, the REC button is red , but there is no video stream)? Or when I managed to get the video to display in QGC?

Sorry if this is a stupid question ;).

Ok, so then it sounds more like it’s some sort of problem with the RTSP init. Not sure in that case, I’d try to look at the gstreamer logs in the “Console” section and check if you can spot anything.

@JulianOes

I have two logs (they were taken in the same situation, but with different logging levels: debug and info), but I can’t upload them txt files here so I attached a link to them on my google drive: red button no video gstreamer logs.zip - Google Drive

Both were taken in a situation where there was no video stream visible on QGC, but the REC button was red and the ethenet LED was blinking as if sending video. It’s hard to tell for me if there is any important information there. @JulianOes could you please take a look at these logs?

I don’t see immediately what is going wrong. I still suspect that there are some video_stream_information messages arriving from Herelink confusing QGC.

Any chance you can get check for these messages arriving in MAVLink inspector?

Thank you for taking the time to look at them.

Regarding Herelink, this problem was happening when Herelink was out of the loop, i.e. not used, and the camera was plugged directly to the PC with no radio.

I checked today the Mavlink Console and Mavlink Inspector, but there is nothing there - so as we suspected the camera has no Mavlink support and there is no Mavlink communication in this case.