https://bugs.kde.org/show_bug.cgi?id=527882

            Bug ID: 527882
           Summary: Dragon Player does not play videos AV1 videos on
                    Fedora KDE 45 Pre-final.
    Classification: Applications
           Product: dragonplayer
      Version First 26.08.2
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---

I have been trying to play an AV1 video that I have created on the very same VM
running Fedora 45 KDE fully updated.

The script to create the video is:

```
#!/bin/bash
# This creates an example playtest video containing several still images of
basic colors and shapes

# create images
magick -size 1024x768 xc:pink -fill blue -draw "polygon 512,184 312,584
712,584" triangle.png
magick -size 1024x768 xc:pink -fill green -draw "rectangle 362,234 662,534"
square.png
magick -size 1024x768 xc:pink -fill red -draw "circle 512,384 512,234"
circle.png

# create video from those images
ffmpeg -framerate 30 -loop 1 -t 10 -i triangle.png \
       -framerate 30 -loop 1 -t 10 -i square.png \
       -framerate 30 -loop 1 -t 10 -i circle.png \
       -filter_complex "[0:v][1:v][2:v]concat=n=3:v=1:a=0,format=yuv420p[v]" \
       -map "[v]" \
       -c:v libsvtav1 -crf 30 \
       -an video.mkv
```

When the script is run on a fresh installation of KDE, it produces a 30 seconds
long video that I can play normally using Firefox or ffplay. 

Instead of the video, a black screen is opened and the position slider is moved
to the final position on the stream so it looks like it has been already
played. Returning the slider back does not do much, as the locator skips back
to the final position.

I have also tried with a test video from the internet
(https://test-videos.co.uk/vids/sintel/mp4/av1/720/Sintel_720_10s_10MB.mp4)
with the same result; it was not playing.

This is in journal:

```

>From WebUI, 31 Seconds ago, written in Plain Text.
This paste will give up the ghost in 23 Hours.
URL https://paste.centos.org/view/a9a0ad3c
Embed Show code
Download Paste or View Raw

        Oct 27 09:17:42 localhost-live systemd[1140]: Started
app-org.kde.dragonplayer@321d59a461464bee8c52986bd8fad12e.service - Dragon
Player - Video Player.
        Oct 27 09:17:42 localhost-live dragon[2048]: MESA-EGL: warning: egl:
failed to create dri2 screen
        Oct 27 09:17:42 localhost-live dragon[2048]: MESA-EGL: warning: egl:
failed to create dri2 screen
        Oct 27 09:17:42 localhost-live dragon[2048]: Using Qt multimedia with
FFmpeg version 9.0.2 GPL version 3 or later
        Oct 27 09:17:42 localhost-live dragon[2048]: Failed to open VDPAU
backend libvdpau_nvidia.so: cannot open shared object file: No such file or
directory
        Oct 27 09:17:42 localhost-live dragon[2048]:
qrc:/qt/qml/org/kde/dragon/PlayerPage.qml:413:5: QML Shortcut: Shortcut: Only
binding to one of multiple key bindings associated with 70. Use 'sequences: [
<key> ]' to bind to all of them.
        Oct 27 09:17:42 localhost-live dragon[2048]: Input #0, matroska,webm,
from '/home/pchapa/video.mkv':
        Oct 27 09:17:42 localhost-live dragon[2048]:   Metadata:
        Oct 27 09:17:42 localhost-live dragon[2048]:     ENCODER         :
Lavf63.1.102
        Oct 27 09:17:42 localhost-live dragon[2048]:   Duration: 00:00:30.00,
start: 0.000000, bitrate: 17 kb/s
        Oct 27 09:17:42 localhost-live dragon[2048]:   Stream #0:0: Video: av1
(libdav1d) (Main), yuv420p(tv, unknown/bt709/unknown, progressive), 1024x768
[SAR 1:1 DAR 4:3], 30 fps, 30 tbr, 1k tbn
        Oct 27 09:17:42 localhost-live dragon[2048]:     Metadata:
        Oct 27 09:17:42 localhost-live dragon[2048]:       ENCODER         :
Lavc63.1.102 libsvtav1
        Oct 27 09:17:42 localhost-live dragon[2048]:       DURATION        :
00:00:30.000000000
        Oct 27 09:17:42 localhost-live dragon[2048]:
qrc:/qt/qml/org/kde/dragon/OverlayPopup.qml:58: TypeError: Cannot read property
'contentItem' of null
        Oct 27 09:17:42 localhost-live dragon[2048]:
qrc:/qt/qml/org/kde/dragon/OverlayPopup.qml:47: ReferenceError:
backgroundSource is not defined
        Oct 27 09:17:42 localhost-live dragon[2048]:
qrc:/qt/qml/org/kde/dragon/OverlayPopup.qml:58: TypeError: Cannot read property
'contentItem' of null
        Oct 27 09:17:42 localhost-live dragon[2048]:
qrc:/qt/qml/org/kde/dragon/OverlayPopup.qml:47: ReferenceError:
backgroundSource is not defined
        Oct 27 09:17:42 localhost-live dragon[2048]:
qrc:/qt/qml/org/kde/dragon/OverlayPopup.qml:58: TypeError: Cannot read property
'contentItem' of null
        Oct 27 09:17:42 localhost-live dragon[2048]:
qrc:/qt/qml/org/kde/dragon/OverlayPopup.qml:47: ReferenceError:
backgroundSource is not defined
        Oct 27 09:17:42 localhost-live dragon[2048]:
qrc:/qt/qml/org/kde/dragon/IconToolButton.qml:16:5: Unable to assign
[undefined] to QString
        Oct 27 09:17:42 localhost-live dragon[2048]:
qrc:/qt/qml/org/kde/dragon/IconToolButton.qml:16:5: Unable to assign
[undefined] to QString
        Oct 27 09:17:42 localhost-live dragon[2048]:
qrc:/qt/qml/org/kde/dragon/PlayerPage.qml:400: ReferenceError: audioOutput is
not defined
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Device does not support the VK_KHR_video_decode_queue extension!
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Failed setup for format vulkan: hwaccel initialisation returned error.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Your platform doesn't support hardware accelerated AV1 decoding.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Failed to get pixel format.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0] Get
current frame error
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Device does not support the VK_KHR_video_decode_queue extension!
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Failed setup for format vulkan: hwaccel initialisation returned error.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Your platform doesn't support hardware accelerated AV1 decoding.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Failed to get pixel format.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0] Get
current frame error
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Device does not support the VK_KHR_video_decode_queue extension!
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Failed setup for format vulkan: hwaccel initialisation returned error.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Your platform doesn't support hardware accelerated AV1 decoding.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Failed to get pixel format.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0] Get
current frame error
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Device does not support the VK_KHR_video_decode_queue extension!
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Failed setup for format vulkan: hwaccel initialisation returned error.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Your platform doesn't support hardware accelerated AV1 decoding.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Failed to get pixel format.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0] Get
current frame error
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Device does not support the VK_KHR_video_decode_queue extension!
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Failed setup for format vulkan: hwaccel initialisation returned error.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Your platform doesn't support hardware accelerated AV1 decoding.
        Oct 27 09:17:43 localhost-live dragon[2048]: [av1 @ 0x55cfd257eec0]
Failed to get pixel format.
```

Reproducible: Always

Steps to Reproduce:
1. Create the video using the script or download a test video (AV1)
2. Play it in Dragon Player

Actual Results:
Video is not playing

Expected Results:
Video should be playing

Additional Information:
When dragon player is invoked with an empty set of hardware decoders, the video
plays just fine using software rendering.


```
QT_FFMPEG_DECODING_HW_DEVICE_TYPES=, dragon /home/pchapa/video.mkv
```

SOFTWARE/OS VERSIONS
Operating System (available in the Info Center app, or by running `kinfo` in a
terminal window): Fedora Linux 45
KDE Plasma Version: 6.8.1
KDE Frameworks Version: 6.31.0
Qt Version: 6.11.2

Packages:
dragon-26.08.2-2.fc45.x86_64
qt6-qtmultimedia-6.11.2-2.fc45.x86_64
libavcodec-free-9.0.2-2.fc45.x86_64
libavformat-free-9.0.2-2.fc45.x86_64
libavutil-free-9.0.2-2.fc45.x86_64
libswresample-free-9.0.2-2.fc45.x86_64
libswscale-free-9.0.2-2.fc45.x86_64
ffmpeg-free-9.0.2-2.fc45.x86_64

ADDITIONAL INFORMATION

With the same dragon and ffmpeg-free versions, I can play these formats just
fine in a VM (without any GPU acceleration) with Dragon:
Theora, VP8, VP9, H264

The only problematic codec is AV1. It seems that Dragon insist on hardware
acceleration (through Vulkan or possibly also VA-API) and doesn't fall back to
software decoding when hw accel is not available. That's the case for the two
videos mentioned above. However, both these video play just fine with `ffplay`
instead of Dragon. So there's no codec problem, just Dragon most likely not
dealing with hw decoding error correctly.

On real hardware with AV1 decode capability (VA-API or Vulkan), I don't expect
the same problem to happen. But that would need additional testing.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to