[MPlayer-users] Screenshot color wrong

Polyphem polyphem at gmail.com
Mon Sep 7 17:11:14 EEST 2020

I did some further testing. Desiered output imho would be Red-255 both 
on screen an screenshot.

I used this PNG test-picture with a Red-255 block as reference (most 
right-hand 20px block on middle color band)

as background picture to create this test.mp4

with following settings:

Color Profile >
YUV Format: 4:2:0
Color Range: Compressed (16-235)
Color Depth: 8 Bit
Color Space: Automatic (ITU-R BT.709)

then tested following player/driver combos and took red value of the 
reference block with on-screen color picker:

mplayer.exe -vo direct3d -vf screenshot test.mp4
 > On-Screen = Red-255
 > Screenshot = Red-232

mplayer.exe -vo gl -vf screenshot test.mp4
 > On-Screen = Red-232
 > Screenshot = Red-232

vlc.exe with opengl output driver
 > On-Screen = Red-255
 > Screenshot = Red-232

mpv --vo=gpu test.mp4
 > On-Screen = Red-254 - Red-255
 > Screenshot = Red-255

mpv.com --vo=gpu --vf=format=colorlevels=limited test.mp4
 > On-Screen = Red-255
 > Screenshot = Red-255

mpv.com --vo=gpu --vf=format=colorlevels=full test.mp4
 > On-Screen = Red-240
 > Screenshot = Red-255

Available color ranges are:
auto:    automatic selection (normally limited range) (default)
limited:    limited range (16-235 for luma, 16-240 for chroma)
full:    full range (0-255 for both luma and chroma)

PotPlayer (Windows) with OpenGl output driver
 > On-Screen = Red-255
 > Screenshot = Red-255

Windows Media Player
 > On-Screen = Red-255

Additional readings found:

"When attempting to play limited TV video content on a PC that uses Full 
video levels (such is an HTPC), we can get undesirable results if we set 
our video levels incorrectly -- such as complete loss of shadow detail 
(aka crushed blacks) or conversely really washed out colors."

"YCbCr to RGB color conversion"

"Input is limited range, I want to output full range"

It seems as some players do and some don't perform a "YCbCr to RGB" 
conversion for movies with limited / compressed color range (16-235) for 
either screen or screenshot.

It would be great to have scale filter for screenshot (and maybe gl 
driver) to perform such a "YCbCr to RGB".

MPlayer colors on screen (with gl) and screenshot are of for me. 
Compared to source videos with full color range the difference is 
visilbe as a red-shift for gl, no difference visible with vo=direct3d.

Somehow "levelconv" param for gl sounds like the right switch, but 
changing it's value does not change output in any way.

Are there other linux media players to benchmark here?

Best Regards

More information about the MPlayer-users mailing list