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

VideoOutput+QVideoSink renders videos slowly

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.6.3, 6.7.2
    • Multimedia

      I need to achieve low-latency real-time video streaming playback. In my software, I use the win11 system, qt6.6.3 or 6.7.2, VideoOutput+QVideoSink to play the existing YUV420 video data, and I find that the rendering speed is slow, but

      Set at the beginning of main

      QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL); 

      Then the rendering is very fast, 80~100ms faster. The decoding layer will not affect this delay, because I use ffmpeg to implement decoding alone, and Qt only participates in rendering.

      This can be tested simply using the QML Video Recorder in the case.

      The following picture is on a dual-screen PC. The left side shows the timing on the other screen in real time.

      1. Enable OpenGL globally

      2. not use OpenGL

      Enabling OpenGL will make the rendering faster. I know that Qt6 uses d3d11 for rendering globally in win11, which can be known by using QQuickWindow::graphicsApi();. But why is d3d11 not as fast as opengl in rendering videos? Is there any problem when QRHI uses d3d11 to render videos?

        1. image-2024-06-21-11-12-39-821.png
          125 kB
          xiaofan tian
        2. image-2024-06-21-11-16-13-546.png
          131 kB
          xiaofan tian
        3. image-2024-06-21-17-43-20-879.png
          104 kB
          xiaofan tian
        4. image-2024-06-21-17-45-50-333.png
          180 kB
          xiaofan tian
        5. image-2024-06-21-22-18-57-431.png
          268 kB
          xiaofan tian
        6. openglvsd3d11.png
          18 kB
          Jøger Hansegård
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtmultimediateam Qt Multimedia Team
            tianxiaofan xiaofan tian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes