Log in

View Full Version : darker colors in x264


tungsten
1st December 2005, 03:01
I searched but couldn't find information on this anywhere. I encoded a movie to x264 using the PSP profile and compared it to the original vob file. The x264 file has darker colors than the original. Does anyone know why this is happening? I encoded the same file to xvid and the colors are the same as the original.

Sharktooth
1st December 2005, 04:40
can you please post comparative screenshots?

TheBashar
1st December 2005, 09:07
If you hadn't said that the xvid encode was the same as the original, I would think that you were seeing the results of different coefficients used by the avisynth color conversion routines. I had this trouble until I started using ColorMatrix. See this thread: http://forum.doom9.org/showthread.php?s=&threadid=82217

But, if you not mistaken and the xvid encodes do not also suffer from this color shift, this is probably not your issue.

tungsten
2nd December 2005, 23:30
Original:
http://img215.imageshack.us/img215/3782/original6td.th.png (http://img215.imageshack.us/my.php?image=original6td.png)

x264:
(http://img234.imageshack.us/my.php?image=psp3qf.png)

xvid:
[IMG]http://img215.imageshack.us/img215/7909/xvid8hu.th.png (http://img215.imageshack.us/my.php?image=xvid8hu.png)

Original:
http://img229.imageshack.us/img229/4166/original23mx.th.png (http://img229.imageshack.us/my.php?image=original23mx.png)

x264:
(http://img229.imageshack.us/my.php?image=psp28vz.png)

xvid:
[IMG]http://img206.imageshack.us/img206/2281/xvid22re.th.png (http://img206.imageshack.us/my.php?image=xvid22re.png)

Sirber
3rd December 2005, 02:38
image with same rez would be cool... ;)

Sharktooth
3rd December 2005, 04:40
Yep but the issue is both in xvid and x264.
Use ColorMatrix() avisynth filter and it should fix it.

tungsten
3rd December 2005, 19:47
okay thanks for the help.

IgorC
19th March 2006, 17:21
If my source is DVD MPEG-2 -> x264 then what is preferible to do ? :
1. ColorMatrix () . By default is ok without any parameters?
2. x264's --colormatrix

Shoud it to be used 1 or 2 or 1&2?

Screenshots :
Original
http://img235.imageshack.us/img235/4173/originalcomun5vk.png

Original colormatrix() . Seems more natural on screenshots? But during playback there is too much red colour. It isn't natural.
http://img82.imageshack.us/img82/8537/colormatrix3fu.png

x264 approx. 800 kbit/s (without colormatrix)
http://img235.imageshack.us/img235/8972/x4670ad.png
Maybe it's not noticeble on sreenshots but it's only slightly on playback.

if x264 approximates (compress) more chroma than luma then it is ok for me. I'm satisfited by result of 800 kbit/s x264.

the question is there possiblity to correct colours by colormatrix.

Sharktooth
19th March 2006, 19:30
2. does not exists.

IgorC
19th March 2006, 19:34
does not exist? Setting is here. :)

Oline 61
19th March 2006, 21:38
Video Usability Info (Annex E):
The VUI settings are not used by the encoder but are merely suggestions to
the playback equipment. See doc/vui.txt for details. Use at your own risk.

--sar width:height Specify Sample Aspect Ratio
--overscan <string> Specify crop overscan setting ["undef"]
- undef, show, crop
--videoformat <string> Specify video format ["undef"]
- component, pal, ntsc, secam, mac, undef
--fullrange <string> Specify full range samples setting ["off"]
- off, on
--colorprim <string> Specify color primaries ["undef"]
- undef, bt709, bt470m, bt470bg
smpte170m, smpte240m, film
--transfer <string> Specify transfer characteristics ["undef"]
- undef, bt709, bt470m, bt470bg, linear,
log100, log316, smpte170m, smpte240m
--colormatrix <string> Specify color matrix setting ["undef"]
- undef, bt709, fcc, bt470bg
smpte170m, smpte240m, GBR, YCgCo
--chromaloc <integer> Specify chroma sample location (0 to 5) [0]
That is from x264 commandline. It just specifies a recommended colormatrix. It doesn't affect the video stream.

You need ColorMatrix() for AVISynth.

Sharktooth
19th March 2006, 22:03
The VUI settings are not used by the encoder but are merely suggestions to the playback equipment.
the --colormatrix option doent affect the encoding and it must be supported by the decoder to be "applied" at decoding time.
While colormatrix() filter for avisynth does affect the encoding...

IgorC
20th March 2006, 01:04
ok. It's clear now. Thank you all.

I would probe --colormatrix without touching yv12 DVD. It should be better

foxyshadis
20th March 2006, 01:33
It would reduce the potential for banding or spikes in the histogram, but it requires player support. By all means, I'd love to know if coreavc/ffdshow/nero/ateme support it!

I suppose I could find out, I just don't know anything about colorometry so I don't know which colors change or by how much, so I'm not sure what scenes to check.