natural-harmonia-gropius / hdr-toys

Componentized Rec.2100 to Rec.709 conversion shader for mpv-player, featuring dynamic curves and a uniform color space.
MIT License
119 stars 1 forks source link

A noob friendly tutorial on "HDR to SDR conversion"? #16

Closed BhaturaGuy closed 1 year ago

BhaturaGuy commented 1 year ago

Went through this hdr-toys. And copied the shaders and config as it is. and here's the result: mpv --no-config with hdr file. normal hdr

Hdr file with your config. hdr to sdr conversion using your config

Sdr version of a file run with mpv --no-config

normal sdr version

I wanna know maybe I did something wrong? Or this is the actual output expected through your config.

natural-harmonia-gropius commented 1 year ago

I will write a better document, but probably not recently.

this is the actual output expected through your config.

yes no

to get closer to SDR version, try to change this line glsl-shader=~~/shaders/hdr-toys/tone-mapping/bt2446c.glsl to glsl-shader=~~/shaders/hdr-toys/tone-mapping/hable2.glsl

EDIT: and the line of gamut-mapping, bt2407_matrix.glsl renamed to matrix, but I prefer to use compress glsl-shader=~~/shaders/hdr-toys/gamut-mapping/compress.glsl

natural-harmonia-gropius commented 1 year ago

https://github.com/Natural-Harmonia-Gropius/mpv_config/tree/main/portable_config/shaders/hdr-toys#readme

Hello, I have written a very simple document and I would like to know what kind of information would be good for "noob", I will add it.

BhaturaGuy commented 1 year ago

https://github.com/Natural-Harmonia-Gropius/mpv_config/tree/main/portable_config/shaders/hdr-toys#readme

Hello, I have written a very simple document and I would like to know what kind of information would be good for "noob", I will add it.

By that I meant written a format that anyone without an engineering degree would understand, and as it is right now it shouldn't require much I guess. Easy to understand now, though I guess mpv's learning curve is infinite.

pintassilgo commented 1 year ago

I'm also unable to get good results.

HDR example video: https://www.youtube.com/watch?v=hVvEISFw9w0

Firefox, HDR -> SDR done automatically by YouTube website: image

I downloaded the video and opened it in standalone Firefox tab without YouTube website filters: image

MPV default: image

MPV using your portable_config without any change or addition: image

I also tried replacing the glsl-shader=~~/shaders/hdr-toys/tone-mapping/bt2446c.glsl line by every other file in /shaders/hdr-toys/tone-mapping/, but none produced good results.

natural-harmonia-gropius commented 1 year ago

@pintassilgo I guess your mpv doesn't suppport vo=gpu-next. get newer version from https://github.com/shinchiro/mpv-winbuild-cmake/releases

pintassilgo commented 1 year ago

My mpv is 0.35, built from git 20221222 (commit 657fd280).

gpu-next works here. I use Linux.