Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to playback AV1 HDR10 #421

Open
EverlastingOS opened this issue Apr 21, 2024 · 7 comments
Open

Unable to playback AV1 HDR10 #421

EverlastingOS opened this issue Apr 21, 2024 · 7 comments
Labels
GStreamer Issue with GStreamer

Comments

@EverlastingOS
Copy link

Trying to play a 4K file with HDR10 using the codec AV1, Clapper info HW vaav1dec with intel Xe graphic. Other content in SDR with same codecs works fine.
13

PC spec:

Fedora 39
Clapper: 0.5.2+git.100~51e1dd8-22.2

@Rafostar
Copy link
Owner

Can you play this file from command line successfully?

GST_PLUGIN_FEATURE_RANK=vaav1dec:300 gst-play-1.0 --videosink=glimagesink "video.mkv"

@EverlastingOS
Copy link
Author

EverlastingOS commented Apr 21, 2024

Can you play this file from command line successfully?

GST_PLUGIN_FEATURE_RANK=vaav1dec:300 gst-play-1.0 --videosink=glimagesink "video.mkv"

Nope, got this in the terminal:

Redistribute latency...
Redistribute latency...
ERROR Internal data stream error. for file:///home/test.mkv
ERROR debug information: ../gst/matroska/matroska-demux.c(6109): gst_matroska_demux_loop (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMatroskaDemux:matroskademux0:
streaming stopped, reason not-negotiated (-4)
warning: queue 0x7efd50000be0 destroyed while proxies still attached:
wl_seat@7 still attached
xdg_wm_base@6 still attached
wl_subcompositor@5 still attached
wl_compositor@4 still attached
wl_registry@2 still attached

@Rafostar Rafostar added the GStreamer Issue with GStreamer label Apr 21, 2024
@Rafostar
Copy link
Owner

Rafostar commented Apr 21, 2024

In your command line same error happens. So its not a Clapper bug.

ERROR Internal data stream error

What you should do is check if the same error continues with latest GStreamer version 1.24 (I think Fedora is still on 1.22) and if it does, please report it on their gitlab repo instead. There does not appear to be anything that can be fixed within Clapper to fix this.

As a workaround until fixed upstream, you can use software DAV1D decoder from GStreamer Rust plugins. Dunno if/what package Fedora has for it. You can also compile it from source. Once you have it installed you can override its rank from within Clapper preferences window, so it will be used instead of vaav1dec hardware decoder which seems to have problems.

FWIW, Clapper Flatpak Nightly builds here include both latest GStreamer code from git and are build with dav1d decoder. You can use that too if you want, just note that these are highly unstable.

@EverlastingOS
Copy link
Author

EverlastingOS commented Apr 21, 2024

dav1d

Oh, okey thanks! Did try out the Nightly build, it can now play the file! What value need i enable for dav1d to enable HRD->SDR conversion?

@Rafostar
Copy link
Owner

Rafostar commented Apr 21, 2024

Oh, okey thanks! Did try out the Nightly build, it can now play the file!

Does it play with vaav1dec or dav1ddec ?

For conversion support within GStreamer, there is already: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1631

Alternatively (assuming it now plays with vaav1dec) you can try (rs)dav1ddec for a fast software decoder. Chances are the legacy vaapi plugin (vaapidecodebin) might do HDR->SDR post-processing automatically too. You should try overriding their ranks and check what/if something works best for you.

Just note, that if you override (rs)dav1ddec it will affect only AV1 videos (since its AV1 decoder only), but overriding vaapidecodebin will result with legacy plugin being used for all media that your GPU can HW decode which is something you probably do not want.

@EverlastingOS
Copy link
Author

EverlastingOS commented Apr 22, 2024

vaav1dec

Hey, it does play with vaav1dec now. Is dav1ddec better? Is not HW decoder better the software?

@Rafostar
Copy link
Owner

Rafostar commented Apr 22, 2024

Hey, it does play with vaav1dec now. Is dav1ddec better? Is not HW decoder better the software?

vaav1dec is the best and newest decoder (performance-wise) you can currently get in GStreamer for your Intel GPU. The problem is that as in MR I linked earlier, GStreamer is in the middle of implementing HDR->SDR conversion. So I suggested trying either software or old (deprecated) vaapi decoder to check if you can somehow workaround lack of HDR<->SDR conversion until its implemented there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GStreamer Issue with GStreamer
Projects
None yet
Development

No branches or pull requests

2 participants