Closed AndreySkyFoxSidorov closed 2 months ago
Hello,
I also experience the same behavior on my Android device, when following the same steps. Video is displayed on the device, but the recording fails.
When I build to Windows and run on a PC, the recording is initiated perfect. When I build to Android and run on my device, the software is unable to link _recorderValve and _fileSink in GstVideoReceiver.cc
Module: GstVideoReceiver.cc Function: void GstVideoReceiver::startRecording(const QString& videoFile, FILE_FORMAT format) Call: gst_element_link(_recorderValve, _fileSink) return FALSE
System Information
Codec information when streaming to VLC (on Android and Windows).
Detailed Description I have investigated the template and pad information in _recorderValve and _fileSink using qCDebug traces based on "Basic tutorial 6: Media formats and Pad Capabilities" https://gstreamer.freedesktop.org/documentation/tutorials/basic/media-formats-and-pad-capabilities.html?gi-language=c
Findings: (so far) The 'src pad' capabilities change from Windows to Android.
video/x-h265
alignment: au
stream-format: hvc1 -> changed from 'hvc1' in Windows to 'byte-stream' in Android (?)
parsed: true
width: 2560
height: 1440
chroma-format: 4:2:0
bit-depth-luma: 8
bit-depth-chroma: 8
colorimetry: 1:3:5:1
profile: main
tier: main
level: 5.1
Questions: (to investigate further) Is this a valid reason why _recorderValve and _fileSink is unable to link? Why do the 'src pad' capabilities change from Windows to Android when the stream is unchanged?
Log Files and Screenshots
Windows: (success)
Starting recording "rtsp://192.168.0.130:554/1"
New video file: "C:/Users/Privat/Documents/QGroundControl Daily/Video/2022-08-18_16.35.59.mkv" "rtsp://192.168.0.130:554/1"
Pad Templates for RTSP packet receiver:
SRC template: 'stream_%u'
Availability: Sometimes
Capabilities:
application/x-rtp
application/x-rdt
Pad Templates for File Sink:
SINK template: 'sink'
Availability: Always
Capabilities:
ANY
Caps for the src pad:
video/x-h265
alignment: au
stream-format: hvc1
parsed: true
width: 2560
height: 1440
chroma-format: 4:2:0
bit-depth-luma: 8
bit-depth-chroma: 8
colorimetry: 1:3:5:1
profile: main
tier: main
level: 5.1
codec_data: 010160000000b0000000000099f000fcfdf8f800000f02200001001740010c01ffff016000000300b00000030000030099ac092100010022420101016000000300b00000030000030099a001402005a1636bb932fcdc04040402
Caps for the sink pad:
video/mpeg
mpegversion: { (int)1, (int)2, (int)4 }
systemstream: false
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-h264
stream-format: avc
alignment: au
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-h265
stream-format: hvc1
alignment: au
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-divx
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-huffyuv
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-dv
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-h263
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-msmpeg
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
image/jpeg
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-theora
video/x-dirac
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-pn-realvideo
rmversion: [ 1, 4 ]
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-vp8
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-vp9
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-raw
format: { (string)YUY2, (string)I420, (string)YV12, (string)UYVY, (string)AYUV, (string)GRAY8, (string)BGR, (string)RGB }
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-prores
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-wmv
wmvversion: [ 1, 3 ]
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-av1
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
Recording started "rtsp://192.168.0.130:554/1"
Android: (fail to link)
Starting recording "rtsp://192.168.0.130:554/1"
New video file: "/storage/emulated/0/QGroundControl Daily/Video/2022-08-18_21.40.58.mkv" "rtsp://192.168.0.130:554/1"
Pad Templates for RTSP packet receiver:
SRC template: 'stream_%u'
Availability: Sometimes
Capabilities:
application/x-rtp
application/x-rdt
SINK template: 'sink'
Availability: Always
Capabilities:
ANY
Caps for the src pad:
video/x-h265
width: 2560
height: 1440
framerate: [ 0/1, 2147483647/1 ]
parsed: true
stream-format: byte-stream
alignment: au
profile: main
chroma-format: 4:2:0
bit-depth-luma: 8
bit-depth-chroma: 8
colorimetry: 1:3:5:1
tier: main
level: 5.1
video/x-h265
alignment: au
stream-format: byte-stream
parsed: true
width: 2560
height: 1440
chroma-format: 4:2:0
bit-depth-luma: 8
bit-depth-chroma: 8
colorimetry: 1:3:5:1
profile: main
tier: main
level: 5.1
Caps for the sink pad:
video/mpeg
mpegversion: { (int)1, (int)2, (int)4 }
systemstream: false
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-h264
stream-format: avc
alignment: au
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-h265
stream-format: hvc1
alignment: au
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-divx
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-huffyuv
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-dv
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-h263
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-msmpeg
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
image/jpeg
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-theora
video/x-dirac
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-pn-realvideo
rmversion: [ 1, 4 ]
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-vp8
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-vp9
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-raw
format: { (string)YUY2, (string)I420, (string)YV12, (string)UYVY, (string)AYUV, (string)GRAY8, (string)BGR, (string)RGB }
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-prores
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-wmv
wmvversion: [ 1, 3 ]
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
video/x-av1
width: [ 16, 2147483647 ]
height: [ 16, 2147483647 ]
Failed to link valve and file sink "rtsp://192.168.0.130:554/1"
As I understand it, the reason is that _recorderValve _fileSink does not connect.
Class GstVideoReceiver
Metod GstVideoReceiver::startRecording(const QString& videoFile, FILE_FORMAT format)
Code:
if (!gst_element_link(_recorderValve, _fileSink)) { qCCritical(VideoReceiverLog) << "Failed to link valve and file sink" ; _dispatchSignal([this](){ emit onStartRecordingComplete(STATUS_FAIL); }); return; }
I have a suspicion that the recorder cannot get a keyframe to start working on the updated pipeline... Any ideas how to fix this?
FIX!
Problem with asynchronous link
Need Replase:
`
if (!gst_element_link(_recorderValve, _fileSink)) {
qCCritical(VideoReceiverLog) << "Failed to link valve and file sink" << _uri << " format:" <<format << " sink:" << _fileSink;
_dispatchSignal([this](){
emit onStartRecordingComplete(STATUS_FAIL);
});
return;
To:
int ErrorCount = 50000;
while (!gst_element_link(_recorderValve, _fileSink))
{
ErrorCount--;
if(ErrorCount <=0)
{
qCCritical(VideoReceiverLog) << "Failed to link valve and file sink" << _uri << " format:" <<format << " sink:" << _fileSink;
_dispatchSignal([this](){
emit onStartRecordingComplete(STATUS_FAIL);
});
return;
}
}
`
I didn't read whole thread but the fix you are proposing is not acceptable. There is no any good reason to have such loop. You need to follow gstreamer design and continue linking when elements are ready for that, instead of wasting CPU cycles and blocking thread.
Next time please prepare PR and work in a github way.
Also, your assumption about the key frame is wrong. It is filtered there so file sink always receives the key frame first.
Also, your assumption about the key frame is wrong. It is filtered there so file sink always receives the key frame first.
It doesn't work, the error happens before. Bug in this line https://github.com/mavlink/qgroundcontrol/blob/master/src/VideoReceiver/GstVideoReceiver.cc#L530
I bought a mk15 camera with MPEG-H Part2/HEVC (H.265) (hevc) codec. The problem is not only with me but also with other users: https://www.facebook.com/groups/siyitech/posts/1183273419179537/ (for example) This problem is for all users who use such codecs. A more elegant solution to this problem would be ideal. I tried different versions of gstreamer from 1.18.5 to 1.20.3, the behavior is the same. Searching the Internet, I came across the same problems in other applications (based on gstreamer), they are fixed by making delays or stopping and restarting the video stream with recording. I don't know how to solve this problem elegant ...
This problem is most likely related to the sink pad, which is not exposed at the time of linking. There is at least one similar case in the video receiver with appropriate handling.
First of all you need to identify your problem. There is perfect starting pont for that. Also I'd suggest to continue in a way used by @jensensi in his post - it is much easier and clear in this way for everyone and saves a lot of time. This is super important for guys who are not paid for this and volunteer on their own.
I've encountered the same issue with 4.2.3 on Android 12. Although the record video button does not seem to function, an empty .mkv (i selected .mkv) is created everytime the record button is pressed.
I tried the Android build results of PR #10396 on a Samsung Galaxy M20 running Android 10 and with that change I can display and record the following rtsp stream:
rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4
The APKs from that pull request are here: https://github.com/mavlink/qgroundcontrol/actions/runs/3008425702
I set the stream source in QGC to "UDP h.264 Video Stream" and try
gst-launch-1.0 -vvv videotestsrc ! "video/x-raw,width=320,height=240,format=(string)Y444" ! x264enc ! h264parse ! rtph264pay! udpsink host=192.168.1.101 port=5600
gst-launch-1.0 -vvv videotestsrc ! "video/x-raw,width=320,height=240,format=(string)I420" ! x264enc ! h264parse ! rtph264pay! udpsink host=192.168.1.101 port=5600
Setting the QGC Video Source to "RTSP Video Stream" with "RTSP URL" set to
rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4
I found why the video is not being recorded. Some cameras do not have a DONL field. And this problem is not entirely clear how to fix it.
LOG:
[I] at ../gst/rtp/gstrtph265depay.c:1284 - "
Hello again,
I have tried the APK provided by fredowski (above) on my device to check if the display and recording works? I am mainly interested in RTSP, but I have tried all three suggested streams with videodecoder set to default.
In this post I provide the results of the test with the APK.
System Information Operating System: [Android 9, FPV SIYI MK15 ] Qgroundcontrol: QGroundControl64.apk provided by fredowski
Test 1) Source: "UDP h.264 Video Stream". File format: "mkv" (using gst-launch-1.0 iwth Y444 & I420) Video decode priority: "Default".
Stream is started. QGC is launched.
2) Source: "RTSP Video Stream". File format: "mkv" (url = Bunny). Video decode priority: "Default".
Stream is started. QGC is launched.
One of two results are experienced when application is launched:
The video display "WAITING FOR VIDEO". No video is displayed. The recording video button is enabled (red/round). Nothing happens when the record button is pressed, i.e. the button is unchanged (red/round).
The video display some flickering gui elements (as described in #10396). The recording video button is enabled (red/round). When the record button is pressed, the button change shape from round to square (recording started) and remains square until it is pressed again (recording stopped).
In this latter case, the video folder contain a new video recording, which is a recording of the 'Bunny' video stream (no flickering gui elements here).
Log files I have included some log files for the two possible outcomes of test 2) (above) using the following settings:
Result: WAITING FOR VIDEO
[D] at ../../qgroundcontrol/qgroundcontrol/src/QGCApplication.cc:281 - "Settings location "/data/user/0/org.mavlink.qgroundcontrolbeta/files/.config/QGroundControl.org/QGroundControl Daily.ini" Is writable?: true"
[D] at ../../qgroundcontrol/qgroundcontrol/src/QGCLoggingCategory.cc:120 - "Filter rules "*Log.debug=false\nGStreamerLog.debug=true\nGStreamerAPILog.debug=true\nVideoReceiverLog.debug=true\nGStreamerAPILog.debug=true\nqt.qml.connections=false""
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x00000005"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x0000001d"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x00000017"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x00000027"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x00000014"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x0000002a"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00080000"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00010000"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00080000"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00010000"
[!] at ../sys/androidmedia/gstamc.c:2330 - "(NULL) Unable to map H265 profile 0x00000004"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00080000"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00010000"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00010000"
[D] at ../../qgroundcontrol/qgroundcontrol/src/QGCApplication.cc:384 - "System reported locale: QLocale(English, Latin, Denmark) ; Name "en_DK" ; Preffered (used in maps): "en-DK""
[E] at ../../qgroundcontrol/qgroundcontrol/src/QGCApplication.cc:409 - "Qt lib localization for "en_DK" is not present"
[E] at ../../qgroundcontrol/qgroundcontrol/src/QGCApplication.cc:414 - "Error loading source localization for "en_DK""
[E] at ../../qgroundcontrol/qgroundcontrol/src/QGCApplication.cc:419 - "Error loading json localization for "en_DK""
[E] at ../../qgroundcontrol/qgroundcontrol/src/FactSystem/FactMetaData.cc:718 - "Value does not exist in fact: QVariant(int, 4)"
[E] at ../../qgroundcontrol/qgroundcontrol/src/FactSystem/FactMetaData.cc:718 - "Value does not exist in fact: QVariant(int, 5)"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GStreamer.cc:122 - "Failed to change ranking of feature. Featuer does not exist: bcmdec"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:100 - "Starting "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4" , buffer -1"
[D] at ../../qgroundcontrol/qgroundcontrol/src/Vehicle/MAVLinkLogManager.cc:360 - "MAVLink logs directory: "/storage/emulated/0/QGroundControl Daily/Logs""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:265 - "Started "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/QtLocationPlugin/QGCMapEngine.cpp:164 - "Map Cache in: "/data/user/0/org.mavlink.qgroundcontrolbeta/files/QGCMapCache300" / "qgcMapCache.db""
[!] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:1412 - "gst_element_link_pads() failed"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:965 - "Streaming started "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/MissionManager/MissionController.cc:2370 - "setCurrentPlanViewSeqNum"
[D] at ../../qgroundcontrol/qgroundcontrol/src/MissionManager/MissionController.cc:2370 - "setCurrentPlanViewSeqNum"
[E] at qrc:/toolbar/GPSRTKIndicator.qml:93 - "qrc:/toolbar/GPSRTKIndicator.qml:93: TypeError: Cannot read property 'active' of null"
[E] at qrc:/toolbar/GPSRTKIndicator.qml:105 - "qrc:/toolbar/GPSRTKIndicator.qml:105: TypeError: Cannot read property 'numSatellites' of null"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:386 - "Starting decoding "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:444 - "Decoding started "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[!] at ../sys/androidmedia/gstamcvideodec.c:1985 - "<amcvideodec-omxqcomvideodecoderavc0> Codec only supports GL output but downstream does not"
[!] at :0 - "(NULL) co located POCs unavailable"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:994 - "_onNewDecoderPad "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:1137 - "Decoding started"
[D] at qrc:/qml/QGroundControl/FlightMap/PhotoVideoControl.qml:103 - "toggleShooting true"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:496 - "Starting recording "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:514 - "New video file: "/storage/emulated/0/QGroundControl Daily/Video/2022-10-12_18.19.24.mkv" "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:562 - "Recording started "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:1676 - "Got keyframe, stop dropping buffers"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
Result: Flickering gui elements
[D] at ../../qgroundcontrol/qgroundcontrol/src/QGCApplication.cc:281 - "Settings location "/data/user/0/org.mavlink.qgroundcontrolbeta/files/.config/QGroundControl.org/QGroundControl Daily.ini" Is writable?: true"
[D] at ../../qgroundcontrol/qgroundcontrol/src/QGCLoggingCategory.cc:120 - "Filter rules "*Log.debug=false\nGStreamerLog.debug=true\nGStreamerAPILog.debug=true\nVideoReceiverLog.debug=true\nGStreamerAPILog.debug=true\nqt.qml.connections=false""
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:551 - "(NULL) Unknown color format 0x7fa30c06, ignoring"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x00000005"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x0000001d"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x00000017"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x00000027"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x00000014"
[!] at ../sys/androidmedia/gstamc.c:2006 - "(NULL) Unable to map AAC profile 0x0000002a"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00080000"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00010000"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00080000"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00010000"
[!] at ../sys/androidmedia/gstamc.c:2330 - "(NULL) Unable to map H265 profile 0x00000004"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00080000"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00010000"
[!] at ../sys/androidmedia/gstamc.c:2254 - "(NULL) Unable to map H264 profile 0x00010000"
[D] at ../../qgroundcontrol/qgroundcontrol/src/QGCApplication.cc:384 - "System reported locale: QLocale(English, Latin, Denmark) ; Name "en_DK" ; Preffered (used in maps): "en-DK""
[E] at ../../qgroundcontrol/qgroundcontrol/src/QGCApplication.cc:409 - "Qt lib localization for "en_DK" is not present"
[E] at ../../qgroundcontrol/qgroundcontrol/src/QGCApplication.cc:414 - "Error loading source localization for "en_DK""
[E] at ../../qgroundcontrol/qgroundcontrol/src/QGCApplication.cc:419 - "Error loading json localization for "en_DK""
[E] at ../../qgroundcontrol/qgroundcontrol/src/FactSystem/FactMetaData.cc:718 - "Value does not exist in fact: QVariant(int, 4)"
[E] at ../../qgroundcontrol/qgroundcontrol/src/FactSystem/FactMetaData.cc:718 - "Value does not exist in fact: QVariant(int, 5)"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GStreamer.cc:122 - "Failed to change ranking of feature. Featuer does not exist: bcmdec"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:100 - "Starting "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4" , buffer -1"
[D] at ../../qgroundcontrol/qgroundcontrol/src/Vehicle/MAVLinkLogManager.cc:360 - "MAVLink logs directory: "/storage/emulated/0/QGroundControl Daily/Logs""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:265 - "Started "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/QtLocationPlugin/QGCMapEngine.cpp:164 - "Map Cache in: "/data/user/0/org.mavlink.qgroundcontrolbeta/files/QGCMapCache300" / "qgcMapCache.db""
[!] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:1412 - "gst_element_link_pads() failed"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:965 - "Streaming started "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/MissionManager/MissionController.cc:2370 - "setCurrentPlanViewSeqNum"
[D] at ../../qgroundcontrol/qgroundcontrol/src/MissionManager/MissionController.cc:2370 - "setCurrentPlanViewSeqNum"
[E] at qrc:/toolbar/GPSRTKIndicator.qml:93 - "qrc:/toolbar/GPSRTKIndicator.qml:93: TypeError: Cannot read property 'active' of null"
[E] at qrc:/toolbar/GPSRTKIndicator.qml:105 - "qrc:/toolbar/GPSRTKIndicator.qml:105: TypeError: Cannot read property 'numSatellites' of null"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:386 - "Starting decoding "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:444 - "Decoding started "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[!] at ../sys/androidmedia/gstamcvideodec.c:1985 - "<amcvideodec-omxqcomvideodecoderavc0> Codec only supports GL output but downstream does not"
[!] at :0 - "(NULL) co located POCs unavailable"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:994 - "_onNewDecoderPad "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:1137 - "Decoding started"
[D] at qrc:/qml/QGroundControl/FlightMap/PhotoVideoControl.qml:103 - "toggleShooting true"
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:496 - "Starting recording "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:514 - "New video file: "/storage/emulated/0/QGroundControl Daily/Video/2022-10-12_18.19.24.mkv" "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:562 - "Recording started "Rtsp://wowzaec2demo.streamlock.net/vod/MP4:BigBuckBunny_115k.mp4""
[D] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:1676 - "Got keyframe, stop dropping buffers"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
[E] at ../../qgroundcontrol/qgroundcontrol/src/VideoManager/SubtitleWriter.cc:111 - "Attempting to capture fact data with no active vehicle!"
Thanks for testing on Android and writing the detailed test report! Unfortunately you have tested a version from the Pull Request #10396 which now only addresses some problems on MacOS. I have moved out all non MacOS parts to a separate PR #10420. The flickering problem is addressed in #10420. The RTSP problem that the video is sometimes not shown as you also noticed was fixed in #10409 which is merged already. I rebased #10420 to include the RTSP fix.
Can you try with the Android builds https://github.com/mavlink/qgroundcontrol/actions/runs/3237541415 from PR #10420?
Maybe you can report your test results then in PR #10420?
This was fixed recently, (Again?)
Expected Behavior
RTSP video recording not working I think the problem is the wrong choice of video codec h265/264. Perhaps you need to add a field with the choice of codec to the settings for rtsp: sinkCaps = gst_caps_from_string("video/x-h264,stream-format=avc"); sinkCaps = gst_caps_from_string("video/x-h265,stream-format=hvc1");
Current Behavior
[D] at qrc:/qml/QGroundControl/FlightMap/PhotoVideoControl.qml:103 - "toggleShooting true" [!] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:531 - "Failed to link valve and file sink "rtsp://192.168.144.25:8554/ch01.264""
Steps to Reproduce:
System Information
When posting bug reports, include the following information
Detailed Description
I think the problem is the wrong choice of video codec h265/264. Perhaps you need to add a field with the choice of codec to the settings for rtsp: sinkCaps = gst_caps_from_string("video/x-h264,stream-format=avc"); sinkCaps = gst_caps_from_string("video/x-h265,stream-format=hvc1");
Log Files and Screenshots
[D] at qrc:/qml/QGroundControl/FlightMap/PhotoVideoControl.qml:103 - "toggleShooting true" [!] at ../../qgroundcontrol/qgroundcontrol/src/VideoReceiver/GstVideoReceiver.cc:531 - "Failed to link valve and file sink "rtsp://192.168.144.25:8554/ch01.264""