[Solved] Avisynth/MPlayer resizers mute colors below 576p

Started by Sartre, June 04, 2013, 12:18:51 AM

Previous topic - Next topic

Sartre

Whenever you use the MPlayer resize filter, the colors get slightly darker and duller. It's especially noticable with bright reds. I used to think it was an x264 quirk but after trying the regular resize filter, it's obvious that the MPlayer resize filter is at fault.

SWSResize filter is still fubar in 2.6 so if you need to do resizing, v2.5 with the regular resize filter is the only choice.



EDIT: title changed to reflect actual problem. Both resizers noticably mute certain colors and increase contrast when the video height is resized to 576p or below. Screenshots below...

EDIT2: It's actually a problem with media players in Windows. Windows uses the Rec.601 color standard for playing SD video (<=576) vs Rec.709 for HD video (>576) which results in a significant difference in the on-screen image.

Some discussion of this phenomenon here:


http://forum.doom9.org/showthread.php?p=1501845
http://forum.doom9.org/showthread.php?t=161281

A solution, in MPC-HC at least, is to add the Rec.601->Rec.709 shader in the shaders list.


Jan Gruuthuse

if linux and nvidia videocard: vdpau resize. When you have opengl support, enable opengl support and try opengl resize.
Also check settings in preferences: [Video]:
Default Postprocessing: unmark H V deblocking and Deringing.

Sartre

I'm in Windows with an ATI card and there's no opengl filter included in the windows distribution. I always turn off the video postprocessing.

Do these resize filters work in a different color space?

Jan Gruuthuse

#3
I don't know if these work in another color space or not. Check quality setting of codec, think it has more to do with compression then with resize. But both will play a role. This is best noticed when creating an image with a color gradation in red.

Click on picture to see full size:


Click on picture to see video:
Using above picture as a frame and without resizing you can already see the influence of compression by codec:

Sartre

It happens using the same CRF value - the only difference is the resizer. The difference varies with source material, but it's noticable with most everything I've tried.

Jan Gruuthuse

#5
with 1 minute selection of video try another setting in:
Mplayer Resize: Change Resize Method from Bilinear to Lanzcos3
If image improves but not enough, change setting for x264:
Rate control and lower the value in Quality to 20 in steps by 1(increasing picture quality) and see what works for you.
More info can be found here: Avidemux Wiki: Guide to encoding types

Sartre

I'm not sure if you're getting it. It doesn't matter what CRF value I use; there's a visible difference between the two resizers at the same settings. Besides, going down to 20 isn't an option if I need to use 23.

Also,  I always use Lanczos for resizing.

Jan Gruuthuse

Their different re-sizers, so different results. Nothing else I can do as user, just in case you don't get it.

mean

It might a matrix option
There s some stuff about it in swscale but really poorly documented

Sartre

#9
EDIT: It's actually a problem with media players in Windows. Windows uses the Rec.601 color standard for playing SD video (<=576) vs Rec.709 for HD video (>576) which results in a significant difference in the on-screen image.

Some discussion of this phenomenon here:

http://forum.doom9.org/showthread.php?p=1501845
http://forum.doom9.org/showthread.php?t=161281

A solution, in MPC-HC at least, is to add the Rec.601->Rec.709 shader in the shaders list.


-----------------------------------------------------------------------------------


After doing a few test encodes, I've narrowed it down to the video height being resized to 576 or below, in either resizer.

These are grabs of resized videos at fullscreen. All vids at same CRF 21 setting.

1400x598
http://img703.imageshack.us/img703/7699/1400x598.jpg

1300x554
http://img543.imageshack.us/img543/4731/1300x554.jpg


Another set at the threshold... note the change in the blue sky:

1356x578
http://img341.imageshack.us/img341/4646/1356578.jpg

1352x576
http://img833.imageshack.us/img833/51/1352576.jpg


The MPlayer resizer does slightly alter the color (removes some of the cast) even in the larger sizes but the worst effects only appear at 576p and below.