colors are not correct when creating webp in encode mode
mpv 0.32.0-791-g73be20143e FFmpeg version: N-99820-g2ddd6afd30 vo=x11
What's wrong?
- the colors between png and webp are totally different.
- size of webp is equal even if lower "screenshot-webp-compression=6". It's seems the var has no influence.
- webp looks very bad, the size say all. it's not lossless.
mpv log file taking png screenshot https://0x0.st/ide1.log mpv log file taking webp screenshot https://0x0.st/idej.log
webp screenshot https://0x0.st/ideA.webp png screenshot https://0x0.st/idem.png
You don't have --screenshot-webp-lossless so it's obvious the webp would not be lossless.
Colorspace mismatch sounds like an actual bug though.
Sorry post wrong webp mpv log file.
even with --screenshot-webp-lossless mpv create the same small suspicious .webp
https://0x0.st/idew.log https://0x0.st/ideA.webp
There's another issue with your approach: You are not taking a screenshot. --o=0.00001.ts.png extracts a frame using the encoding mode, the screenshot options don't affect it.
If you want to encode a lossless webp use -ovc libwebp -ovcopts lossless=1.
It's actually worse than that. I noticed I was getting wrong colors on both gifs and webp when converting videos to them in ffmpeg. So I tried this filter:
-vf "libplacebo=color_primaries=bt709:color_trc=13:format=gbrp"
For gifs it corrects the color, but for webp it does absolutely nothing.
I think the problem is in ffmpeg.
If I recall correctly ffmpeg webp support was broken for many years until fairly recently, it just doesn't seem to get much attention.
As for mpv, it refused to play webps at all (I think webp support in ffplay might still be broken?).
This is the first time i hear about encoding in mpv but it seems like it's just done as a middleman for ffmpeg.