Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-103565

QML MediaPlayer fails to playback rtsp media properly.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.6
    • Multimedia
    • None
    • Android

    Description

      I am developing an application, that streams video over rtsp from a web camera, or more precisely, from Axis P7304 Video Encoder. The application runs as intended on my development environment (Desktop Qt 5.15.6 GCC 64bit on Ubuntu), but when run on Android (Galaxy Tab Active3, running Android 11), there are two problems.

      First, if the rtsp stream needs authentication, the Android version of MediaPlayer component fails to authenticate. Attached are text logs captured with wireshark both from Ubuntu and Android.

      If the rtsp authentication is bypassed from the encoder, then the video playback starts, but there is a significant (~4 seconds) lag in the stream on Android. On Ubuntu it's much shorter, perhaps one second or less. It seems that it is an issue of initial buffering, after which the playback starts and thus the stream is permanently lagging. Rtp packets start flowing immediately after rtsp negotiation, so there is no any extra delay for the application to start receiving the datastream, but it's the several seconds buffer that causes the delay. This is a showstopper for the application, since the video stream is needed for visually detecting situations needing emergency stop.

      There is no API to control the buffering in QML MediaPlayer. It seems that some people have found a work-around for the same issue in here: https://stackoverflow.com/questions/69806233/qtqmediaplayer-how-to-disable-frame-buffering-to-reduce-the-rtsp-streaming-de

      But it doesn't help with Android, as it seems that there is no playbackrate property there.

      For the purpose of this bug report, the latter issue (buffering latency) is of higher priority. Perhaps it would be possible to expose the playback rate property also in Andoid to have at least a workaround for this issue?

       

      Related bug report for Qt 6.2.4 is here: https://bugreports.qt.io/browse/QTBUG-103567

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            sampo.huttunen Sampo Huttunen
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes