Author Topic: [Solved] Avisynth/MPlayer resizers mute colors below 576p  (Read 3703 times)

Sartre

  • Newbie
  • *
  • Posts: 16
[Solved] Avisynth/MPlayer resizers mute colors below 576p
« on: June 04, 2013, 12:18:51 AM »
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.

« Last Edit: October 22, 2013, 07:54:28 PM by Sartre »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
Re: MPlayer resize dulls colors
« Reply #1 on: June 04, 2013, 05:53:15 AM »
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

  • Newbie
  • *
  • Posts: 16
Re: MPlayer resize dulls colors
« Reply #2 on: June 04, 2013, 10:30:33 PM »
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

  • Hero Member
  • *****
  • Posts: 6060
Re: MPlayer resize dulls colors
« Reply #3 on: June 05, 2013, 05:11:15 AM »
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:
« Last Edit: June 05, 2013, 05:16:45 AM by Jan Gruuthuse »

Sartre

  • Newbie
  • *
  • Posts: 16
Re: MPlayer resize dulls colors
« Reply #4 on: June 08, 2013, 12:24:32 AM »
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

  • Hero Member
  • *****
  • Posts: 6060
Re: MPlayer resize dulls colors
« Reply #5 on: June 08, 2013, 04:39:08 AM »
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
« Last Edit: June 08, 2013, 04:44:01 AM by Jan Gruuthuse »

Sartre

  • Newbie
  • *
  • Posts: 16
Re: MPlayer resize dulls colors
« Reply #6 on: June 08, 2013, 05:17:38 AM »
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

  • Hero Member
  • *****
  • Posts: 6060
Re: MPlayer resize dulls colors
« Reply #7 on: June 08, 2013, 06:21:34 AM »
Their different re-sizers, so different results. Nothing else I can do as user, just in case you don't get it.

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10971
Re: MPlayer resize dulls colors
« Reply #8 on: June 08, 2013, 07:04:09 AM »
It might a matrix option
There s some stuff about it in swscale but really poorly documented

Sartre

  • Newbie
  • *
  • Posts: 16
Re: MPlayer resize dulls colors
« Reply #9 on: June 10, 2013, 03:32:57 AM »
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.
« Last Edit: October 22, 2013, 07:55:02 PM by Sartre »