-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Fix UHD BD Dolby Vision dual layer streams #17186
Conversation
wrong. id can be any pid of a broadcasting service, i.e. a tv channel |
Had no idea about live tv. This would only be triggered for bluray/uhd-bluray content. |
Exclusive to UHD BD, Dolby has a second video layer that is mistaken by a 1080p HEVC/AVC stream causing a green screen when played.
@FernetMenta better? |
yes |
@FernetMenta is this good enough to merge? |
I think this got Fernets approval so merging it for now, can always fix if I misunderstood. |
Fix UHD BD Dolby Vision dual layer streams
Fix UHD BD Dolby Vision dual layer streams
Fix UHD BD Dolby Vision dual layer streams
Fix UHD BD Dolby Vision dual layer streams
Fix UHD BD Dolby Vision dual layer streams
Description
When playing any container (mkv, mp4...) that has a Dolby Vision idependent layer stream will show up as 1080p HEVC/AVC stream resulting in a solid green screen.
This is not a big problem when playing idependent files like mkv/mp4 because you are able to select the video stream. This is a big problem when playing UHD BD in Disc Navigation mode that changing the video streams during the menus cause the menu to end and the movie to start.
This also results in menus that are not readable or watchable because of the solid green screen on top.
Exclusive to UHD BD, Dolby made a second layer called the enhancement layer.
This layer is merged by the player during playback and uses proprietary Dolby software to do so.
Discarding this layer has no effect on Apple TV, or Nvidia Shield of Xbox One S/X because
those can only play Dolby Vision single layer tracks that is embended into the first video stream.
Dolby Vision documentation:
https://www.dolby.com/us/en/technologies/dolby-vision/dolby-vision-white-paper.pdf
Motivation and Context
The if statement might seem unspecific and could cause wrong streams to be removed by mistake.
This is NOT the case here.
The streamID 0x1015 is exclusive to the Dolby Vision enhancement layer that Kodi cannot play in any way or form.
The only possible scenario as it would by mistaken by another track is if the video container had 5 video tracks, since those are made in sequence 0x1011 being the first.
Audio starts at 0x1100 and subtitles at 0x12A0.
FFMpeg uses the following method to check for DV streams:
FFmpeg/FFmpeg@6ebe88f
Identification using the codec_tag as identified by ffmpeg is not possible for two reasons:
https://pastebin.com/spCfL2FQ
Those tracks are also mistaken by MediaInfo as can be seen here:
https://pastebin.com/Zv2fndLF
How Has This Been Tested?
This has been tested in a Windows x64 enviroment with DVDs, Blurays and UHD BDs.
This has been tested with 3 titles that have Dolby Vision enhancement layer: 2001 Space Odyssey, The Shining and The Hereditary.
This causes no harm to dolby vision playback on Nvidia Shield or Apple TV because the first layer, which is the only layer that those players can identify and play is embended into the first video stream, so removing the second one causes no harm.
Screenshots (if appropriate):
Types of change
Checklist: