Closed Doofussy2 closed 2 years ago
It's supported for any output target, so tone mapping is not a requirement. It can output PQ. The only differences with the Dolby Vision extension is that makes use of the dynamic metadata for tone mapping, which mpv doesn't as of now: https://github.com/mpv-player/mpv/issues/10091 Also depending on content, there may be a difference when decoding Dolby Vision: https://github.com/mpv-player/mpv/issues/9831
Nothing really changed wrt Dolby Vision playback since it was first added.
I know Windows 10 supports all HDR formats....but for Dolby Vision, in the past I've had to use the Dolby's actual decoder with the Windows player, to play them. The last time I tested DoVi in mpv, it tone-mapped, and the picture was notably different. I haven't tested since hardware acceleration was implemented, until now. And now it plays the same as Dolby's own plugin. My TV doesn't support DoVi. So that's why I'm asking. It looks like mpv now does what the Dolby plugin does. It's frickin awesome!
And check this out. Two screenshots. One with hardware decoding and one with software decoding.
Hardware
Software
You can see that with hardware decoding that the picture is the correct color but pallid, as you would expect without the metadata being applied. Software decoding is clearly wrong. So it looks like the metadata is being applied directly when played. This is astonishing!
Oh wait, my TV might actually support Dolby Vision. It's an older Vizio, and there's a general answer from Vizio saying that most of their Smartcast TVs do support Dolby Vision. I can't seem to find anything more definitive than that. So it looks like I'm getting DoVi passthrough. HUZZAH!
I don't really understand what you're comparing, since you keep jumping from mpv to Windows' app.
mpv has been decoding Dolby Vision with --vo=gpu-next
since January 2022, so anything else is expected to not support it.
I don't know if this is what you refer to as "hardware decoding".
As far as I know, Windows does not support Dolby Vision passthrough other than in games.
I don't really understand what you're comparing, since you keep jumping from mpv to Windows' app. mpv has been decoding Dolby Vision with
--vo=gpu-next
since January 2022, so anything else is expected to not support it. I don't know if this is what you refer to as "hardware decoding".As far as I know, Windows does not support Dolby Vision passthrough other than in games.
Windows 10 supports all forms of HDR, Dolby Vision included. That's why Dolby Labs were able make their plugin for Windows 10.
https://www.microsoft.com/en-us/p/app/9pltg1lwphlf?ranMID&activetab=pivot:overviewtab
When hassn added DoVi support, it was exclusively software decoded and tone-mapped. The picture output was very different to the Dolby Labs output. But now with the d3d11 implemented, it looks as though the metadata is being passed directly to the display, after being decoded. As I said, if I change the tone-mapping config in mpv, it has no effect. The picture is unchanged. mpv is acting the same as the Dolby Labs extension.
Haha! It isn't an issue. I'm just very surprised. I did not expect this to happen. I'm just happy that whatever video I click on, plays well.
The stats get blazed out though. If I lower the target peak, then they're fine. Doesn't seem to happen with HDR10 stuff.
As I said, if I change the tone-mapping config in mpv, it has no effect. The picture is unchanged. mpv is acting the same as the Dolby Labs extension.
What is your mpv config?
I don't need to share my config. The behavior is exactly the same as HDR10. I don't use any tone-mapping params. But if I add them, there is no effect. The picture matches the Dolby Labs picture, except the target peak is too high. I lower it ~700 and it's identical.
That doesn't help me reproduce your setup. Lowering target-peak implies tone mapping.
Try installing the Dolby Labs plugin and play DoVi file with the Windows Movies and TV app.
Try installing the Dolby Labs plugin and play DoVi file with the Windows Movies and TV app.
It doesn't work for me, all I get is a black screen. This has been the case for a while.
Anyways, I don't know what you're doing and this is just getting confusing for me. All I can get is regular HDR10 output from mpv, as expected.
If the Dolby plugin isn't working for you, then you may have bigger issues. In mpv I can play with pretty much no config and it matches the plugin. It's that simple.
The picture output was very different to the Dolby Labs output.
No, it was not. It always looked the same as now with HW decoding of hevc.
It doesn't work for me, all I get is a black screen. This has been the case for a while.
You need 3 extensions, 2 Dolby Vision ones and 3rd HEVC decoding, the HW one, not SW, the free one that is.
Last I checked, DoVi was only supported through tone-mapping.
That does not make any sense. At all. There are 3 levels, not only IPTPQc2, but also MMR and then all kind of metadata. On blu-ray you do not have IPTPQc2 but have MEL and FEL.
The moment d3d11 context was added, PQ surface was added so you must now target PQ and BT.2020 (that must be mentioned in the command line), that is not a NOP, because that would be linear RGB. HW decoding of hevc support was added later and has nothing to do with anything, that is completely separate. Nvdec does not work with d3d11va though. Only with vulkan and opengl.
You've misunderstood everything I have said.
This topic has been derailed. My query goes unanswered. So I'll close this.
This topic has been derailed. My query goes unanswered. So I'll close this.
I'm still not sure what you want to know. The last change to dolby vision was in January, when it was added (for --vo=gpu-next
).
This topic has been derailed. My query goes unanswered. So I'll close this.
I'm still not sure what you want to know. The last change to dolby vision was in January, when it was added (for
--vo=gpu-next
).
Hi @haasn, thanks for chiming in. When you first added Dolby Vision support, I tested it. It was a much appreciated addition. My results of the tone-mapping were good, but were very different from the output of using the Dolby Labs extension using the Windows 10 player. The picture was pretty flat and a very low peak, as you would expect from standard tone-mapping. The output from the Dolby Labs had HDR, rich color and all the attributes you would expect. Until now, I haven't had time to do any significant testing. D3D11 has been added since I last tested. And to my surprise, mpv's output now matches whatever the Dolby Labs extension puts out (this is completely non-technical (still have limited time)). So I was simply trying to ascertain what had been done to achieve this. And as I said earlier, if I use hable
or any of the other options, the picture is completely unaffected and remains the same. So it would seem to me, that no tone-mapping is occurring, and I was trying to get information to confirm my suspicion. The screenshots appear to confirm it, as I get the same result with HDR10, as the metadata gets passed to the display. So, the question is, is mpv somehow passing the metadata to the display, either by transforming to HDR10 or simply sending the metadata directly to the display. Which is what I assume the Dolby Labs extension does. I hope this clarifies my query.
The screenshots appear to confirm it, as
That is impossible. Static Metadata is applied on display, not in gpu.
Which is exactly what I said and am asking if this is happening.
Oh good grief! That isn't related....
I close the thread and it still gets polluted...
Someone shoot me....anyone....I promise I'm an easy target... :/
D3D11 has been added since I last tested. And to my surprise, mpv's output now matches whatever the Dolby Labs extension puts out (this is completely non-technical (still have limited time)). So I was simply trying to ascertain what had been done to achieve this.
I mean there's https://code.videolan.org/videolan/libplacebo/-/merge_requests/239 but it's not merged yet.
Well that's exciting, but obviously not what I'm referring to as iit sn't merged. I'm going to test more, today. I have a few ideas that I want to explore.
Now I'm convinced the metadata is being used by my display.
with:
no-config
target-trc=pq
target-prim=bt.2020
vo=gpu-next
I get a perfect picture and the screenshot is pallid, because the metadata is applied by the display.
with:
no-config
target-trc=pq
target-prim=bt.2020
vo=gpu-next
vf=format:dolbyvision=no
I get this. The color is not only pallid, but clearly the metadata is not being used by mpv and no tone-mapping is happening.
Just to dot the i and cross the t...
with:
no-config
vo=gpu-next
vf=format:dolbyvision=no
I get this:
So my conclusion is that my original perception is correct, and I have passthrough to the display.
So you're saying that the display is transforming it to SDR? That can't be. The peak luminance is above 750 nits. I've tested that too. And it's obvious that mpv isn't doing anything with tone-mapping. So if mpv isn't doing anything, then my display has to be. There's no other option.
And yes, I understand that you are saying that the swapchain is tone-mapping before it reaches the display.
Now I'm convinced the metadata is being used by my display.
with:
no-config target-trc=pq target-prim=bt.2020 vo=gpu-next
. . .
I tested your settings @Doofussy2 and I just use the vo=gpu-next
line. Here an example image showing the differences and my mpv.conf
settings:
# Subtitle Settings
sub-color='#FFFF00' #subtitle color in rgb
sub-shadow-color='#000000' #shadow color
sub-font='Arial, sans-serif, Noto Sans' #set font
#sub-bold=yes
sub-font-size=50
sub-pos=100 #subtitle position 5 percent above the bottom of the screen
# Dolby Vision
vo=gpu-next
# Continue movies from where one leaves
save-position-on-quit
Windows 10 doesn't properly support Dolby Vision. To properly render the content use either you TV's internal player or an Android TV box with Just Video Player. You should see a Dolby Vision notification when playing this content properly, otherwise it's tonemaped, most likely to SDR.
Um.... I've been preoccupied of late, and haven't kept current with all of the updates. Last I checked, DoVi was only supported through tone-mapping. Has something changed? I've been playing multiple DoVi files, and none of them appear to be tone-mapping. But instead appear to be being directly decoded. The playback I'm getting is, well, I can't tell the difference between the Dolby plugin and mpv. None of the variables I use in the .conf have any effect. I just get perfect playback. What did I miss?