rocksdanister / lively

Free and open-source software that allows users to set animated desktop wallpapers and screensavers powered by WinUI 3.
https://rocksdanister.com/lively
GNU General Public License v3.0
15k stars 1.06k forks source link

Downloaded Wallpapers are too Dark/Muted using MPV but not VLC #2322

Open MelodicalVegetable opened 2 months ago

MelodicalVegetable commented 2 months ago

Describe the bug Custom/externally imported live wallpapers are too dark/dim. Pre-installed Lively wallpapers work with good brightness. Using VLC with/without GPU Decode fixes the issue, MPV w-w/o GPU creates the issue

To Reproduce

  1. Install Lively
  2. Activate a Default Installed Wallpaper (Works)
  3. Import an external Wall Paper Expected behavior To have correct brightness.

Settings i tried: In Monitor Display Settings:

In AMD display settings:

(when disabling some settings in AMD, the background would temporarily flash to the correct brightness). Another clue: When taking a screenshot the colours/brightness revert to what they should be

Screenshots/Video ~MPV - GPU Decode OFF/ON - Pre-installed template: 'Music Tunnel' (works - brighter than shown in image)~ Unrelated, 'Music Tunnel' is a html wallpaper. MPV - GPU Decode OFF/ON - Imported Wallpaper (Dark) MPV_GPU_Decode_OFF VLC - GPU Decode FF/ON - Imported Wallpaper (works) VLC_GPU_Decode_ON-OFF

Desktop (please complete the following information):

Additional context

  1. I Tried multiple external Live Wallpapers from different sources. The one featured in the photos: Format Mp4/MPEG-4, coded mp42, 60fps, bit rate 10.7Mb/s, File size 32MiB, AVC, 1920x1080 4:2:0 8 bit [Removed]
  2. I Installed the VLC plugin by creating a file inside the Lively Install folder and copying the full VLC folder contents inside. When activating VLC inside lively, With or Without GPU Decode, it works correctly.

Is there some setting i would have to change for MPV for it to work? I tried installing MPV and dragging to %APPDATA% but it made no change.

Log file (Important) lively_log_20240722_232133.zip

rocksdanister commented 2 months ago

Are you sure the brightness setting is at 0? If so can you try changing it? image

MelodicalVegetable commented 2 months ago

Thanks for the reply, i just checked yeah all the settings inside Lively are set to 0. I can only assume this issue pertains to MPV, i saw a few other posts on the reddit that share this issue, I'll post my solution about using VLC. But i was hoping you had some clue about MPV (VLC render doesn't turn off during full-screen does it?) Besides that your App is dope! Liking it very much, thank you :) wdw

rocksdanister commented 2 months ago

@hooke007 Can you lend some help 😅, any idea whats happening here? I am not sending any color profile flag.

hooke007 commented 2 months ago

There is no mpv's full log file in the OP for me to check.

rocksdanister commented 2 months ago

@MelodicalVegetable Can you generate and share full log:

  1. Create directory in C:\Users\<UserName>\AppData\Local\Lively Wallpaper\Mpv\portable_config
  2. Create file mpv.conf with the content
    --log-file="D:\\output.txt"

    Change D:\\ to different driver letter as required (should be writable without admin rights.)

  3. Play a video wallpaper in Lively and reproduce the issue.
  4. Attach the output.txt file here.
MelodicalVegetable commented 2 months ago

I am unfamilar with MPV. I installed it separately in C:/Program Files to see if it would solve anything. Anyway using the portable installed MPV packaged with lively: I wasn't sure if i generated the output.txt correctly but here is what i got. What i did:

  1. Go to mpv.exe file directory inside Lively: C:\Program Files\Lively Wallpaper\Plugins\Mpv
  2. On the address bar, write cmd
  3. Enter mpv --log-file="D:\\output.txt"

    output.txt

I saw this in red- cmd: ~~Error parsing option sub-color (option requires parameter) C:\Users\Dutch\AppData\Roaming/mpv/mpv.conf:51: setting option sub-color='' failed. Error parsing option sub-border-color (option requires parameter) C:\Users\Dutch\AppData\Roaming/mpv/mpv.conf:52: setting option sub-border-color='' failed. Error parsing option sub-shadow-color (option requires parameter) C:\Users\Dutch\AppData\Roaming/mpv/mpv.conf:55: setting option sub-shadow-color='' failed. C:\Users\Dutch\AppData\Roaming/mpv/mpv.conf:69: fixed-length quoting expected - put "quotes" around the option value if you did not intend to use this, but your option value starts with '%'~~

I believe this is because i manually added a mpv.conf as i was guided to in a youtube video on independantly installing MPV. I did this After experiencing the issue in lively. I deleted that config file that was in AppData\Roaming. Issue still exists. I ran it again.

output.txt

rocksdanister commented 2 months ago

On the address bar, write cmd

This is not the require log, you want the mpv log when Lively is using it.

I believe this is because i manually added a mpv.conf as i was guided to in a youtube video on independantly installing MPV. I did this After experiencing the issue in lively. I deleted that config file that was in AppData\Roaming. Issue still exists.

The Mpv player bundled with Lively is set --no-config to ignore external config files unless it is in in <Lively install location>\plugins\mpv\portable_config\ or C:\Users\<UserName>\AppData\Local\Lively Wallpaper\Mpv\portable_config\

Follow this instruction to get the correct file https://github.com/rocksdanister/lively/issues/2322#issuecomment-2244186137

MelodicalVegetable commented 2 months ago

Yep, i did that i put the file in there with --log-file="D:\\output.txt" (removing the mpv from the front).

  1. Exit and re-ran Lively
  2. change wall paper to a working one, then change to imported wallpaper
  3. no log generated Is there another step i need to actually generate the output?
rocksdanister commented 2 months ago

That should do it. Make sure the file extension is .conf

This is the relevant code for reference: https://github.com/rocksdanister/lively/blob/d5ca68c17663242c15580b55962364ac4061f89e/src/Lively/Lively/Core/Wallpapers/VideoMpvPlayer.cs#L130

https://github.com/rocksdanister/lively/blob/d5ca68c17663242c15580b55962364ac4061f89e/src/Lively/Lively/Core/Wallpapers/VideoMpvPlayer.cs#L161-L171

MelodicalVegetable commented 2 months ago

Okay figured it out. It wasn't generating anything when i made the output.txt file inside the C:\Users\<UserName>\AppData\Local\Lively Wallpaper\Mpv\portable_config\ ... location

I had to copy it to the <Lively install location>\plugins\mpv\portable_config\ (Admin permission) Here it is: output.txt

  1. Hardware Acc off
  2. MPV selected
  3. Exit
  4. Deleted output.txt
  5. Opened to Pre-installed theme (Fluids)
  6. Changed to custom wallapaper (howls-moving-castle-1-moewalls-com)
  7. Output.txt
hooke007 commented 2 months ago

It selected the hdr swapchain.

[   0.120][v][vo/gpu/d3d11] Queried output: \\.\DISPLAY1, 3840x2160 @ 8 bits, colorspace: RGB_FULL_G2084_NONE_P2020 (12)
hooke007 commented 2 months ago

Do you enable the option Automatically manage color for apps ? Maybe a bug from Microsoft win11 ref https://github.com/mpv-player/mpv/issues/14567

MelodicalVegetable commented 2 months ago

Yep it was HDR. When i was testing values i didn't realise that i had to exit and restart Lively for any monitor settings (via windows) to take effect on the wallpaper. The AMD graphics settings changed live without restart.

HDR works when HDMI and/or DP is put into motherboard. But not when plugged into graphics card. Obviously that isn't great to use the iGPU instead of GPU.

I managed to configure it manually plugged into my GPU, i had to: Set everything neutral: monitor brightness at 50% (on physical monitor) -> Set Enable HDR -> Set SDR content brightness to 50% -> Use microsoft HDR calibration (barely helps lol) -> Inside AMD go Settings-Display and turn on Custom Color -> Modify brightness (-55) Modify Contrast (163) -> Now Change SDR Content brightness and then physical monitor brightness to fine tune it.

Hassle for anyone else that comes across this this is the option to manually configure, or disable HDR, or use VLC instead of MPV. Why the fact that VLC works without these customisations and MPV needs this configs idk.

hooke007 commented 2 months ago

mpv automatically selects the 'correct' swapchain that system told. Not sure which update from Windows recently breaks something. Which makes it choose the BT2020 now. You can manually force to stay in SDR swapchain by the option https://mpv.io/manual/master/#options-d3d11-output-csp