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

[Bug]: HDR10+ is cancer #832

Open
KyleSanderson opened this issue Feb 24, 2023 · 20 comments
Open

[Bug]: HDR10+ is cancer #832

KyleSanderson opened this issue Feb 24, 2023 · 20 comments
Assignees
Labels
bug Something isn't working

Comments

@KyleSanderson
Copy link

Problem description

Playback HDR10+ results in a dead screen.

Steps to reproduce the issue

HDR10+ dual encode with Dolby Vision.

Expected behavior

Screen shows picture.
These patches work well in contrast https://github.com/quietvoid/xbmc/releases/tag/v21-dovi

Your phone/tablet/androidTV model

Firestick 4K Max

Operating system version

Yes

Application version and app store

GitHub

Additional system information

No response

Debug logs

No response

@KyleSanderson KyleSanderson added the bug Something isn't working label Feb 24, 2023
@phhusson
Copy link
Contributor

phhusson commented Apr 4, 2023

Got a sample?

@courville
Copy link
Contributor

To complement the request: can you please share a sample KO with nova and OK with kodi-dovi on same device (with spec of device and tv setup used)?

@KyleSanderson
Copy link
Author

It's specific to the Firestick unfortunately

@courville
Copy link
Contributor

@KyleSanderson, thx and what are the capabilities of your TV, is the firestick plugged directly to the TV or via an AV receiver? A sample will help too.

@KyleSanderson
Copy link
Author

My panel supports both - it's a Firestick hardware bug. https://forum.kodi.tv/showthread.php?tid=371557&pid=3146377#pid3146377

@phhusson
Copy link
Contributor

phhusson commented Apr 4, 2023

I'm expecting they are far from being the only ones with that bug. Can you share a sample?

@KyleSanderson
Copy link
Author

I'm expecting they are far from being the only ones with that bug. Can you share a sample?

Flipped you a note for a file I found that reproduces it to the email on your GH profile.

@phhusson
Copy link
Contributor

phhusson commented Apr 5, 2023

Got it, thanks.

@daf0x
Copy link

daf0x commented Sep 17, 2023

My panel supports both - it's a Firestick hardware bug. forum.kodi.tv/showthread.php?tid=371557&pid=3146377#pid3146377

I'm not reading anything in that thread about it being a hardware bug, could you please clarify where it says it's a hardware bug?

What I am reading in that thread appears to be a number of fixes and workarounds, like the ability to select either DV or HDR10 (by selectively disabling one or the other), as well as some on-the-fly DV profile conversion. Is there any chance of implementing the same fixes in Nova?

FWIW I found that Nova has a setting "Disable Dolby Vision", but it doesn't seem to do anything. (Some?) files with both DV and HDR10 still play with a black screen (with the TV briefly showing the Dolby Vision logo), and DV-only files still play as normal (i.e. no weird colours due to disabled DV). This is on org.courville.nova-2574680-6.2.25-20230908.0819-universal-release.apk / FireTV 4k Max.

@courville
Copy link
Contributor

courville commented Sep 17, 2023

Nova relies on ffmpeg for this dovi fixes using patches from quietvoid (the one commenting kodi forum thread): https://github.com/quietvoid/FFmpeg/commits/4.4-MatroskaBlockAdd
When looking at https://github.com/quietvoid/FFmpeg/branches, it seems that there are other branches active perhaps addressing the thread comments. What would be good it to find the ones needed and included in kodi, i.e. to be analyzed...

EDIT: https://github.com/quietvoid/FFmpeg/commits/dovi_dm_data contains latest additions and https://github.com/quietvoid/FFmpeg/commits/dovi_dmv1 is still WIP

EDIT2: xbmc/xbmc@e6d107d

EDIT3: seems that this is the one for firestick xbmc/xbmc#23079 on kodi side

@courville courville self-assigned this Sep 17, 2023
courville added a commit to nova-video-player/aos-Video that referenced this issue Sep 20, 2023
@courville
Copy link
Contributor

I found an issue with the disable Dolby Vision switch that is fixed in 6.2.26 https://github.com/nova-video-player/aos-AVP/releases
Can you please retest with this release?

@daf0x
Copy link

daf0x commented Sep 22, 2023

Thanks for the update! With 6.2.26 the behaviour is still the same, whether the setting is on or off the screen remains black except for the TVs Dolby Vision logo at the start. I also tested these files on MX player and on the TV built-in player and they both do play, albeit in 'plain' HDR (no Dolby Vision).

An additional thing to note is that while the screen is black during playback, also Nova's UI is not visible. So this setting (if it would work) would need to be toggled from the main settings, which is not convenient.

--- update

I tried removing the HDR10+ meta data from one of these files using DDVT Tool, and after removal the file now plays fine in Nova, as well as other players:

  • Nova Player: Plays as Dolby Vision
  • MX Player: Plays as HDR
  • TV built-in: Plays as HDR

So it looks like the in the above-mentioned thread option of stripping the HDR10 meta data would be the ideal solution. I.e. perhaps even the profile conversion is not needed for most files, and just on-the-fly converting hybrid files to dolby-vision-only already fixes 90% of files?

@KyleSanderson
Copy link
Author

I found an issue with the disable Dolby Vision switch that is fixed in 6.2.26 https://github.com/nova-video-player/aos-AVP/releases Can you please retest with this release?

The metadata can't be present in the bitstream, otherwise the hardware bug kicks on. This is the patch you're looking for quietvoid/xbmc@20a46b2

@phhusson
Copy link
Contributor

I'm repeating what you all said, just to be sure I understood it all:

On Firestick 4K Max, if we send DoVi + HDR10+ to the video decoder (no matter whether it is the dolby vision decoder or the normal decoder), on a HDR10+ television, the video decoder will try to send Dolby Vision which will simply fail because the video pipeline can't transform Dolby Vision to HDR10+.

Is my understanding correct so far?

And so the suggested fix by @KyleSanderson is to filter out Dolby Vision NALs, so that the decoder receives HDR10+ and sends HDR10+ to the TV. Is that correct?

Thanks

@daf0x
Copy link

daf0x commented Sep 25, 2023

It's great to see this issue gaining some traction :)

My understanding so far is that if you send both DV and HDR10 then it fails, and the workaround is to make sure to send either DV or HDR10.

But I am no expert at this, I just would like to make sure the solution is not moving towards supporting only HDR10, as the problem does not appear to be that the TV (or firestick?) doesn't understand DV, only the combination causes issues. See also my test above where manually selecting only DV fixed playback.

@KyleSanderson could you please help us understand the solution?

@phhusson
Copy link
Contributor

I'm pretty sure Dolby Vision "EL" variants (which contain both HDR10 and Dolby Vision) require the HDR10 part to be sent to decoder. Maybe you're confusing HDR10 with HDR10+? (which are largely unrelated)

@KyleSanderson
Copy link
Author

I'm pretty sure Dolby Vision "EL" variants (which contain both HDR10 and Dolby Vision) require the HDR10 part to be sent to decoder. Maybe you're confusing HDR10 with HDR10+? (which are largely unrelated)

The panel does not matter. It's a straight hardware decoder bug, confirmed by Dolby, and long ignored by Amazon. They do have a new set of Firesticks coming out in the next couple hours on a new FireOS so they may just be hoping this goes away.

See jellyfin/jellyfin-androidtv#2630 (comment) for more information (and check the comments from quietvoid).

@phhusson
Copy link
Contributor

So what you're saying is that this Amazon device doesn't support Dolby Vision EL (like what's included BluRay releases) at all? There is simply no way to support Dolby Vision EL on those devices?

@daf0x
Copy link

daf0x commented Sep 26, 2023

So what you're saying is that this Amazon device doesn't support Dolby Vision EL (like what's included BluRay releases) at all? There is simply no way to support Dolby Vision EL on those devices?

Sorry, I don't believe that is what @KyleSanderson is saying, as that is not my experience at all. I have a Fire TV Stick 4K Max (same as OP/@KyleSanderson) and I've been using Nova on it to play DV-only content for well over half a year now without issue. Additionally my above test I think should confirm that removing only HDR10+ meta-data prevents the black-screen issue and allows the file to play perfectly fine in Dolby Vision mode.

Further, I don't think that your conclusion is in line with what quietvoid says in the linked jellyfin thread:

The only workaround has been to strip the Dolby Vision or HDR10+ from bitstream before passing the bytes to the decoder.
jellyfin/jellyfin-androidtv#2630 (comment)

I.e. both and Dolby Vision and HDR10+ work just fine on Fire TV Stick 4K Max, it's just that there can be only one of the two present in per file.

@phhusson
Copy link
Contributor

I.e. both and Dolby Vision and HDR10+ work just fine on Fire TV Stick 4K Max, it's just that there can be only one of the two present in per file.

Ok thanks, that's finally some clear explanation. Does this device support HDR10+ to Dolby Vision and/or Dolby Vision to HDR10+ conversion? HDR10+ and DoVi to HDR10? ( = do we rely on display capabilities to filter-out, or do we need to be more clever)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants