po5 / thumbfast

High-performance on-the-fly thumbnailer script for mpv
Mozilla Public License 2.0
760 stars 34 forks source link

Remove tonemapping #24

Closed dyphire closed 1 year ago

dyphire commented 1 year ago

Ref: https://github.com/po5/thumbfast/issues/13#issuecomment-1255863875, The tone-mapping does not actually work. This pr can get more appropriate thumbnails for hdr video.

dyphire commented 1 year ago

Before: After:

This pr does not really implement tone mapping, but it is currently an acceptable mitigation method.

po5 commented 1 year ago

This doesn't fix tonemapping, your thumbnail looks like it doesn't have any tonemapping applied.
We need to match the user's current tonemapping settings. #13 is unrelated to this issue, it's to support older mpv versions.

dyphire commented 1 year ago

This doesn't fix tonemapping, your thumbnail looks like it doesn't have any tonemapping applied. We need to match the user's current tonemapping settings. #13 is unrelated to this issue, it's to support older mpv versions.

I tried all the hdr related options of mpv, but couldn't apply tonemapping to thumbnails. This may be a limitation of mpv. Unless we find a way to solve it, this pr is the only thing we can do.

natural-harmonia-gropius commented 1 year ago

[ 0.003][v][cplayer] Setting option 'vo' = 'lavc' (flags = 4) vo=lavc from log, I don't think we can support the tonemapping equivalent of vo=gpu. the only way is use vf=libplacebo. But I think that is too costly. At least when we disabled zimg, the swscale make the thumbnails viewable.

so that dither=no and hdr-compute-peak=no can be removed, they did nothing.

Edit: maybe we can ask to mpv-team, let them support osd's colorspace hint, that they did colorspace conversion for osd. image

dyphire commented 1 year ago

so that dither=no and hdr-compute-peak=no can be removed, they did nothing.

I'll do it later.

Edit: done.