Jump to content

Dolby Vision in mpv


generiq

Recommended Posts

generiq
5 minutes ago, Luke said:

Is everything in mpv master at this point?

Yeah, that's what I build from. Just make sure that libplacebo is the latest. That's what vo=gpu-next uses. I imagine more adjustments will be coming, but it's working very well.

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...
JoeAverage92
On 5/10/2022 at 8:35 PM, generiq said:

Yeah, that's what I build from. Just make sure that libplacebo is the latest. That's what vo=gpu-next uses. I imagine more adjustments will be coming, but it's working very well.

Hi, how do you properly configure vo=gpu-next with emby theater? In emby theater and mpv.conf?

Link to comment
Share on other sites

5 hours ago, JoeAverage92 said:

Hi, how do you properly configure vo=gpu-next with emby theater? In emby theater and mpv.conf?

You can't yet. We need to put out a new release with a new mpv build.

  • Thanks 1
Link to comment
Share on other sites

AviatorBimmer
On 6/1/2022 at 1:03 PM, Luke said:

You can't yet. We need to put out a new release with a new mpv build.

New release of ET or Ember Server?

And will this new release then allow HDR metadata passthrough or I am all confused? lol

Link to comment
Share on other sites

JoeAverage92

Just to understand: what is the reason for Emby to use ExoPlayer instead of mpv on Android (shield)?

Link to comment
Share on other sites

generiq

Simply put, mpv for Android is not as capable. That said, once it catches up with the libplacebo developments, the possibilities could significantly expand. HDR passthrough might work with Vulkan and DRM. Audio passthrough is problem, also 

  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
RBeam6

Want to preface this by saying I have actually been working through the MPV learning curve as time permits. But my current 2016 model Samsung TVs, while technically HDR capable, are such an early/buggy implementation of it that I've just done tone-mapping on the player side exclusively for several years now.

Because of that I've mostly just skimmed over anything related to sending HDR10 or DV directly since it didn't apply to me.

Fast forward to last week and some significant impulse buying and I now have some big new TV toys arriving over the next several days that are HDR10 and DV capable with the contrast and brightness to take advantage of those formats. 

So I have been trying to re-read everything (including this thread) but hoping someone might be kind enough to answer just a couple of quick questions so I'd at least have a basic starting point and settings for the mpv.conf when they get here.

Windows 10 still on all the machines which are all pretty overkill just because I like building PCs. I can give more info if that matters. Using the current MPV dll so it has gpu-next and does 'recognize' dolby vision MKV files. I have a few that I used to test with and it seems to recognize and tone-map them fairly accurately to my current displays. 

First question: Seems like DV and HDR10 passthrough is possible with the current MPV builds .... right?

Second question: If the answer to the first is yes can someone suggest just some basic settings for the mpv.conf to enable it? Just something for me to use as a jumping off point.

Last question .. for now: Strictly for video playback does Windows 11 do anything better with HDR (or DV) compared to Windows 10? From the searches I've done seems like there is some advantage in gaming but that's not something I'm using these machine for ... at least for now.

Thanks in advance for any help.

 

Link to comment
Share on other sites

generiq

1. If you're still using Theater, you can't use gpu-next. So no support for DV. You'll need to use mpv as an external player. There is more complication with the answer to the rest of your question. DV metadata can be passed through, but with no dynamic metadata. So pretty much as HDR10, but with DV color grading. If your file has both DV and HDR10, it will use the HDR10 and pass the metadata to the display. If you truly want to test DV playback, use a file that is exclusively DV. Though, there is a way to cycle through the video tracks. I have not tested this with the double muxing of DV and HDR10. My guess is that it won't work.

2. If you use mpv externally, then I can provide an mpv.conf

3. Yes, Windows 11 has improvements for HDR media, but will depend heavily on your GPU and its current driver.

  • Thanks 1
Link to comment
Share on other sites

RBeam6
1 hour ago, generiq said:

1. If you're still using Theater, you can't use gpu-next. So no support for DV. You'll need to use mpv as an external player. There is more complication with the answer to the rest of your question. DV metadata can be passed through, but with no dynamic metadata. So pretty much as HDR10, but with DV color grading. If your file has both DV and HDR10, it will use the HDR10 and pass the metadata to the display. If you truly want to test DV playback, use a file that is exclusively DV. Though, there is a way to cycle through the video tracks. I have not tested this with the double muxing of DV and HDR10. My guess is that it won't work.

2. If you use mpv externally, then I can provide an mpv.conf

3. Yes, Windows 11 has improvements for HDR media, but will depend heavily on your GPU and its current driver.

Thanks for the reply.

I was poking around in the various files that theater uses a few months back and noticed that in the video.html file that populates video settings page in the theater app that the video output and hardware acceleration dropdowns seemed to just be passing the same values that you would if you were putting them in the mpv.conf file. So I just edited the html to include gpu-next and added a couple of the hardware acceleration options that weren't there. Then just dropped one of the mpv dlls from a weekly build in place of what came with emby theater.

Didn't necessarily have high hopes of anything good happening but it seems to work fine. I can select gpu-next from the dropdown in theater and see that it was loaded in the log file when I check. Also shows as the renderer in 'stats for nerds' (image attached).

Even if isn't full support of DV (only static) I'd love to see  a config file so I could at least play with it a little for now. I have a couple of the episodes of 'Foundation' with only a DV vid track and was able to test it a couple of weeks ago in my mildly tweaked version of emby theater. Just doing tone mapping. With the the renderer set to GPU it wasn't handling it at all but with it set to gpu-next the colors looked the same as the HDR10 version of the same episode. 

One of those new TVs was delivered on Friday and I've been playing with it over the weekend. HDR10 passthrough seems to be working after commenting out all of the tone-mapping options and adding target-colorspace-hint=yes. Before doing that it was obviously just tone mapped but after making the changes the Sony shows HDR10 in the input info and makes the HDR only settings options available. 

Is there anything else that should go along with that target-colorspace-hint=yes for doing HDR10 passthrough.

Thanks again!

BTW ... it's showing 60hz because I just pulled up theater on my work machine to grab the screenshot. I have refresh rate switching enabled on my media PCs.

 

 

StatsForNerds.jpg

Edited by RBeam6
added info
Link to comment
Share on other sites

RBeam6

forgot to reply to the windows 11 bullet.

Currently II'[m using the GTX 1080 ti on all of the machines but I've been thinking of getting something more current now that the prices have come down. What kind of GPU hardware do I need to be using to take advantage of what win 11 does better with HDR?

Link to comment
Share on other sites

generiq

Very cool! I just don't know what's happening between electron and mpv, when using vo=gpu-next. But it looks as though it's working ok. You shouldn't need much else. Using the color-space-hint with d3d11, should automatically set the colorspace. This however doesn't work so well with DV. DV is read as bt.709, and the target-peak is then set to 203. But with Windows in HDR, the peak is too low, making the picture too bright. A workaround for that is to create an auto-profile for bt.709 media, and set the target-peak higher. This in turn will make SDR media darker. You can adjust the peak to greater satisfaction, or try also adding inverse-tone-mapping. So something like this:

 

[DV and bt.709]
profile-cond=p["video-params/primaries"]=="bt.709"
target-peak=500
inverse-tone-mapping=yes

Haasn is looking into finding a property that is exclusive to DV. I asked for it.

  • Thanks 1
Link to comment
Share on other sites

generiq
1 hour ago, RBeam6 said:

forgot to reply to the windows 11 bullet.

Currently II'[m using the GTX 1080 ti on all of the machines but I've been thinking of getting something more current now that the prices have come down. What kind of GPU hardware do I need to be using to take advantage of what win 11 does better with HDR?

Damn it! I hit the wrong button :D

Anyway, it will be mostly be about the diver. I would suggest getting an RTX, as they support more formats.

Link to comment
Share on other sites

RBeam6
55 minutes ago, generiq said:

Very cool! I just don't know what's happening between electron and mpv, when using vo=gpu-next. But it looks as though it's working ok. You shouldn't need much else. Using the color-space-hint with d3d11, should automatically set the colorspace. This however doesn't work so well with DV. DV is read as bt.709, and the target-peak is then set to 203. But with Windows in HDR, the peak is too low, making the picture too bright. A workaround for that is to create an auto-profile for bt.709 media, and set the target-peak higher. This in turn will make SDR media darker. You can adjust the peak to greater satisfaction, or try also adding inverse-tone-mapping. So something like this:

 


[DV and bt.709]
profile-cond=p["video-params/primaries"]=="bt.709"
target-peak=500
inverse-tone-mapping=yes

Haasn is looking into finding a property that is exclusive to DV. I asked for it.

I know nothing about electron other than what it is. Was just poking around and got lucky. But after I saw it appeared to be working in theater did some basic tests running the same settings in the standalone MPV and seemed to behave the same as it did within theater with the same settings. I've been dropping the newest weekly build of the dll in since then and haven't had any issues yet. Seems like some of the ones from the last month-ish have fixed a few things. At least with tone-mapping. For a while, when using gpu-next, it was obviously adjusting the brightness based on the content but way too often so it was very noticeable and distracting. Tried adding hdr-compute-peak=no but it would have no effect ... had to switch back to using gpu as rendered to make it stop. That hasn't been a problem for about a month now. 

So is DV with dynamic metadata something that will eventually be added? I've done a lot of searching but the information about the development is so spread all over the place it's kinda  tough to figure out what is going on. Not even any kind of release notes with the weeklies so I've just been dropping them in as they come. 

Whilst doing my searching I think I saw thread where someone, I think it might have been you, was asking about getting something to use to identify DV for conditionals in the config file. 

Is there much benefit to DV vs HDR10 if it's not using the dynamic metadata? Other than just being able to play DV files with some level of goodness if you have them? 

 

 

 

Link to comment
Share on other sites

RBeam6

When I ran those tests with the couple of DV files I have I did notice the 'stats for nerds' was reporting the colorspace as bt.709 and had wondered about that. 

Link to comment
Share on other sites

generiq
On 7/24/2022 at 7:08 PM, RBeam6 said:

Whilst doing my searching I think I saw thread where someone, I think it might have been you, was asking about getting something to use to identify DV for conditionals in the config file.

That was me.

On 7/24/2022 at 7:08 PM, RBeam6 said:

I know nothing about electron other than what it is.

Electron is the software Emby uses for the overlay. It is a layer on top of the video. It doesn't work well with vo=gpu and and worse with vo=libmpv

On 7/24/2022 at 7:08 PM, RBeam6 said:

So is DV with dynamic metadata something that will eventually be added? I've done a lot of searching but the information about the development is so spread all over the place it's kinda  tough to figure out what is going on. Not even any kind of release notes with the weeklies so I've just been dropping them in as they come. 

DV only uses dynamic metadata. This is just like HDR10+, which is also dynamic metadata. Dynamic metadata allows the change in peak luminance/contrast per scene/frame. HDR10 uses the same value for every scene/frame (static metadata). There was a patch for ffmpeg to support dynamic metadata in HDR10+, but I don't know of its current status ( maybe @softworkz can answer that), but the mapping of DV metadata is very recent, and I have not seen anything to support dynamic metadata in DV. DV is more complicated, in that it has multiple versions (5, 7 and 8.1, I believe are the current).

On 7/24/2022 at 7:08 PM, RBeam6 said:

Is there much benefit to DV vs HDR10 if it's not using the dynamic metadata? Other than just being able to play DV files with some level of goodness if you have them? 

This is a topic with some contention. Being able to visually perceive the difference(s) between static and dynamic metadata, truly comes down to how good your tech is, how well the media was mastered and how good your visual cortex/brain is. Personally, I think when most people say 'wow DV is so much better', it's psychosomatic. They want it, so they believe it. I would say that there are improvements, but not greatly.

On 7/24/2022 at 7:12 PM, RBeam6 said:

When I ran those tests with the couple of DV files I have I did notice the 'stats for nerds' was reporting the colorspace as bt.709 and had wondered about that. 

Yeah, I suspect that more development on this is forthcoming... DV is a f**ked up piece of crap. Dolby screws with media, once again... 

Edited by generiq
Link to comment
Share on other sites

4 hours ago, generiq said:

DV only uses dynamic metadata

DV is not DV. There are multiple "profiles" which essentially do things in very different ways. Some are backward-compatible to HDR10, others are not and that's just a fraction of the story.

My best advice to solve this "problem" is: just avoid DV content!

Nobody needs that anyway.

  • Like 1
Link to comment
Share on other sites

generiq
17 minutes ago, softworkz said:

My best advice to solve this "problem" is: just avoid DV content!

Nobody needs that anyway.

Agreed.

But the query was, does ffmpeg now support the dynamic metadata in HDR10+ ? 

Link to comment
Share on other sites

2 minutes ago, generiq said:

Agreed.

But the query was, does ffmpeg now support the dynamic metadata in HDR10+ ? 

Not yet, but we're getting closer...

  • Like 2
Link to comment
Share on other sites

RBeam6

Thanks for the replies .... I think the way I phrased a couple of my questions wasn't very clear though.

I realize dynamic metadata is part of the Dolby Vision format (however much of a difference it does or doesn't make) but, best case scenario, MPV can't actually send DV with the dynamic metadata. At least not yet ... right?

And I'm definitely not buying into Dolby's hype and getting ready to switch over all of my content to DV. I just have TVs that support it now and wanted to fool around with it. 

On a related note. All of the Sonys I bought are the same model but the 85" for my 'big room' was delivered on Friday so I had the weekend to do some basic setup and watch some movies with my HTPC and emby theater as the source.

The two 75" arrived yesterday and I really only had time to get them unboxed so I could set them up in the middle of my living room and play some content using the emby app on the TVs just to make sure there weren't any issues with them. My router is only about 10 feet away from where they are so plenty of bandwidth and it was indicating direct play on the server dashboard. 

Not having used any version of the app in any meaningful way I know next to nothing about it or what formats it supports so was surprised to see all of the DV options 'light up' on the TV when I played that episode of Foundation. Also played Spider-Man: No Way Home which I hadn't previously realized is (according to MediaInfo) DV, HDR10 compatible. 

Looked good. Just me sitting on the floor about 4' away from a fairly large screen so not a critical viewing session. But I was impressed with how well the app on the  TV did considering the less than ideal viewing conditions. 

And apologies for my ignorance on some of this stuff. I haven't had the hardware to test these things previously so working my way through the learning curve. 

Link to comment
Share on other sites

generiq
2 hours ago, RBeam6 said:

I realize dynamic metadata is part of the Dolby Vision format (however much of a difference it does or doesn't make) but, best case scenario, MPV can't actually send DV with the dynamic metadata. At least not yet ... right?

mpv is built on ffmpeg, that's why I was asking Softworkz. But mpv also uses libplacebo, which is what vo=gpu-next uses. Haas has recently done a lot of development on libplacebo and the support of DV media. It does forward the metadata (there is also an option to disable that), but it's reduced to static metadata. Whether the dynamic metadata in DV will ever be supported, is a question best answered by the developers. My sense is that it isn't a priority. HDR10+ support would be great, though.

  • Thanks 2
Link to comment
Share on other sites

  • 3 weeks later...
horstepipe
On 7/26/2022 at 11:46 AM, softworkz said:

My best advice to solve this "problem" is: just avoid DV content!

Nobody needs that anyway.

 

I'm getting more and more DV files which are causing a green / purple tint on the client TVs.

But just avoiding DV content in general honestly doesn't feel right lol.

I'm wondering whether that issue only occurs on TVs which do not support DV, or does this happen also on TVs which support DV?

@softworkz

so bringing sample and log files for the problematic files doesn't make sense at this time, as there are other technically barriers which need to be fixed by the player devs (mpv, exo...)?

 

best regards

Edited by horstepipe
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...