Nevcairiel / LAVFilters

LAV Filters - Open-Source DirectShow Media Splitter and Decoders
GNU General Public License v2.0
7.41k stars 787 forks source link

Old BLZ0 / DivX 5.0.1 video files play in black and white in Warcraft 3 Classic, but color in media player #529

Closed Kuiriel closed 1 year ago

Kuiriel commented 1 year ago

Sorry if this is the wrong place to ask this, I'm totally stumped.

Is there any reason a cinematic in game would play in shades of grey only on Windows 11?

Cinematics in Warcraft 3 Classic were showing up as black screens with audio after I upgraded to Windows 11. They work fine on three different Windows 10 machines. So I installed LAVFilters, and the cinematics now played - but they only play in black and white, or shades of gray, rather.

The cinematics work perfectly fine and look normal if opened separately in VLC Media Player. Nothing out of the ordinary under Nvidia Adjust Video Color Settings or Manage 3D Settings.

I have tried:

If I look at the movie files with Gspot, I can see that the Codec is BLZ0, the name is DivX 5.0.1, with the status that codecs are installed as long as I have registered blizzard.ax (even though no video plays) or K-Lite or LAV (then shades of gray only).

clsid2 commented 1 year ago

It is likely an issue with the video renderer. Basic DirectShow applications use the old Video Mixing Renderer 7. This has some issues on Windows 10/11 that can give black video in certain cases.

A possible solution is to increase the merit of Video Mixing Renderer 9 so that it because the system default renderer. For example GraphStudioNext has the ability to easily modify filter merits.

Kuiriel commented 1 year ago

Thank you. I am bonking brain against wall to understand merits let alone how to use GraphStudioNext but hope to get there eventually with enough white belt google fu.

One rabbit hole explaining merits mentioned using GSpot as a place for right clicking on Divx Decoder Filter to set merits, which sounded a bit less confusing, but I am going cross eyed with fever so can't see it yet lol. I did however see some interesting looking buttons on the bottom left - 1, 2, and 3, which progressively become ungrayed when clicked. And I got an interesting little error.

Video Render OK. Use [3] to play. Src > A > AVI Splitter > B > LAV Video Decoder > C > Microsoft MPEG 2 Encoder > D > MainConcept MPEG Demultiplexer > E > DivX for Blizzard Decoder Filter > F > Video Renderer Failed to Create Instance of Microsoft MPEG-2 Encoder. CoCreateInstance() Failed. Error 0x80040154: [unknown].

And voila, black video in GSpot too. Audio worked fine.

Interestingly enough it only gave me this error with LAV installed. When I uninstalled LAV I still had black screen in GSpot, but I didn't have the failed to create instance error, above.

Relaunched as admin after a couple of false starts, figuring out that I can find things via GSpot > System > List Codecs And Filters > Video Mixing Renderer 9, make sure to remember existing value, okay, it's at 0x200000 'MERIT_DO_NOT_USE'

Lets see, filters accepting BLZ0 as Input... that's MainConcept MP4 Demultiplexer at top, then MainConcept MPEG Demultiplexer, then Video Renderer, then the two DIVX for Blizzard Decoder Filter. I can see Video Mixing Renderer down there, lets bring it up past... 0x880000.

Successfully changed. Ach, awesome, the video plays in game now, and it's in colour too! Thank you for being super clever ^_^

Small query, then, if it's easy - do you also know why in VLC Media Player and GSpot the video plays with nice crisp blacks, but in-game the cinematic seems to have a much higher gamma or brightness?

I see many folk mentioning uninstalling/unregistering the old Blizzard.ax and using LAV, which only worked after I did the filter merit change as you advised. No change, still quite bright/gamma high. I'm attaching the list of filters for BLZ0 incase there's something else there which is obvious to you.

BLZ0 Filters

It's got colour though, it's no longer totally skipped or in greys, so thank you.

clsid2 commented 1 year ago

Washed out color is due to wrong luminance range (limited instead of full) being used. It is not a decoder issue, but GPU related.

Possible solution: NVIDIA Control Panel -> Video -> Adjust video color settings -> Select "With the NVIDIA settings" -> Advanced tab -> Set Dynamic Range to "Full (0-255)". Then you can select "With Application Settings" again.

For AMD/Intel you need to find similar option yourself.

Kuiriel commented 1 year ago

Yup that was it. I had set it many times before while trying to solve it, including following your process. But when I just leave it with the Nvidia > Video > Adjust Video Color Settings > Checkmark [With the Nvidia Settings] it's all good now, so YAY THANK YOU

Kuiriel commented 1 year ago

Thank you again. This worked on a second Windows 11 pc that had the same issue, in both parts.