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

Dolby Vision Profile 5 does not play correctly (DirectPlay) #1772

Open
kaysond opened this issue Apr 10, 2024 · 16 comments
Open

Dolby Vision Profile 5 does not play correctly (DirectPlay) #1772

kaysond opened this issue Apr 10, 2024 · 16 comments
Labels
bug Something isn't working

Comments

@kaysond
Copy link

kaysond commented Apr 10, 2024

Software Versions

  • Jellyfin Server Version: nightly (10.9.0; also happens with 10.8.13)
  • Roku Client Version: 2.0 build 5

Describe the bug

When playing a video with the following profile, the colors have a green/purple hue, as if the setup does not actually support HDR, when it in fact does.

Video
Title: 4K HEVC HDR
Codec: HEVC
Profile: Main 10
Level: 150
Resolution: 3840x2160
Aspect ratio: 16:9
Interlaced: No
Framerate: 24
Bitrate: 16373 kbps
Bit depth: 10 bit
Video range: HDR
Video range type: DOVI
DV title: DV Profile 5
DV version major: 1
DV version minor: 0
DV profile: 5
DV level: 6
DV rpu preset flag: 1
DV el preset flag: 0
DV bl preset flag: 1
DV bl signal compatibility id: 0
Pixel format: yuv420p10le
Ref frames: 1

How To Reproduce

  1. Find video with above profile
  2. Play it without Transcoding

Expected behavior

Video should play as HDR

Logs

Server debug log: https://hastebin.com/share/omiqezupev.yaml

Screenshots

Connection Information

Local over https

Additional context

I'm playing this on a Roku 4800X which supports the above video profile. If I use Roku Media Player to play the file, it works just fine, and my TV shows "HDR". With Jellyfin, "HDR" does not show up, and I get the incorrect colors. I suspect the Roku is trying to play it as SDR. Maybe there's some kind of hint that has to be given to the player API to decode it as HDR?

@kaysond kaysond added the bug Something isn't working label Apr 10, 2024
@kaysond
Copy link
Author

kaysond commented Apr 16, 2024

Bump. I'm happy to help debug and/or fix this if someone can help point me in the right direction.

@cewert
Copy link
Member

cewert commented Apr 16, 2024

Nothing jumps out to me that could be causing this but I also don't use HDR. Note that your device has two versions, Roku Ultra and Roku Ultra LT. The Roku Ultra LT also supports HDR10+.

Here's the docs for HEVC - https://developer.roku.com/en-ca/docs/specs/media/streaming-specifications.md#supported-video-codecs

A good first step when debugging video files, is to see if roku's own media player can play the file correctly. If that can't play the file, then neither can our app.

@kaysond
Copy link
Author

kaysond commented Apr 16, 2024

@cewert - I have the non-LT. I mentioned this in the "Additional Context", but Roku Media Player can play the video files just fine.

My theory is that for some reason in the Jellyfin app, it's trying to play the video as non-HDR, so it's decoding the colors incorrectly. I believe that the HDMI link has to specify the color range, so maybe there's some command that sets the Roku into an HDR mode?

@kaysond
Copy link
Author

kaysond commented Apr 16, 2024

Yeah I think I'm on the right track.

Here's my receiver's video info when playing on Jellyfin:
20240416_112600

And when playing on RMP:
20240416_112746

I did a quick search through the Roku dev docs, and the only mention I could find of HDR was the downloadedSegment property of the TrickPlay fields on a video media playback node. It says it only applies to DASH/HLS, but maybe it's taking a cue from there as to how to set up the HDMI link?

@cewert
Copy link
Member

cewert commented Apr 16, 2024

There's no HDR flag to toggle that I'm aware of.

Thanks for the testing info. That explains why your colors are off but I'm not sure what the fix is at this time.

@kaysond
Copy link
Author

kaysond commented Apr 16, 2024

There's no HDR flag to toggle that I'm aware of.

Thanks for the testing info. That explains why your colors are off but I'm not sure what the fix is at this time.

Can you give me a rough idea where in the code the video player is set up? I'll try messing around with it and see if I can get anywhere.

@kaysond
Copy link
Author

kaysond commented Aug 13, 2024

Bumping. I made a slightly interesting discovery today - this issue doesn't impact regular HDR videos. Just DoVi. No idea why but maybe that helps narrow things down.

@jimdogx
Copy link
Contributor

jimdogx commented Aug 13, 2024

Just triple checking, does the server indicate that it's direct playing? Or is it transcoding / remuxing by chance?

@kaysond
Copy link
Author

kaysond commented Aug 14, 2024

Direct play

@kaysond
Copy link
Author

kaysond commented Sep 13, 2024

@cewert - are you ok with me putting a bounty on this?

@cewert
Copy link
Member

cewert commented Sep 30, 2024

@kaysond Maybe #1919 would fix this?

@kaysond
Copy link
Author

kaysond commented Sep 30, 2024

@kaysond Maybe #1919 would fix this?

Definitely will give it a shot and let you know

@kaysond
Copy link
Author

kaysond commented Oct 3, 2024

@cewert - #1919 doesn't fix it. It looks like these profiles are sent to the jellyfin server to determine valid codecs? That's not relevant for this issue because it's already directplay. The problem is in how the roku player is being set up to play dovi.

@kaysond
Copy link
Author

kaysond commented Oct 3, 2024

I'll try to dig in a bit more now that I've got the dev stuff set up, but in the meantime - I'm going to put up $100 for anyone who can fix this (with permission of maintainers)

@cewert
Copy link
Member

cewert commented Oct 3, 2024

@kaysond what does it say under roku settings -> Display type?

@kaysond
Copy link
Author

kaysond commented Oct 3, 2024

@kaysond what does it say under roku settings -> Display type?

Automatic 4k Dolby Vision

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

3 participants