Log in

View Full Version : Washed colors while encoding with x264 (MPEG2 576i source)


pepelugil
22nd May 2012, 15:03
Hello,

I'm trying to encode a series of MPEG2 576i videos (they are labeled as interlaced, but they are progressively encoded) with x264 in order to get AVC 576i bluray video. I'm using the following parameters:

x264-64.exe input.m2ts --bluray-compat --preset veryslow --tune film --force-cfr --b-pyramid strict --open-gop --level 4.0 --aud --nal-hrd vbr --pic-struct --sar 16:11 --vbv-bufsize 14500 --keyint 50 --ipratio 1.1 --vbv-maxrate 15000 --threads auto --slices 1 --thread-input --stats "d:\stats.stats" --output "output.264" --fps 25000/1000 --no-interlaced --fake-interlaced --crf 18

The resulting video stream is correctly imported in Scenarist, but its colors seem washed when comparing to original video:

Original MPEG2:
http://img51.imageshack.us/img51/972/thumnailimage2o.png (http://imageshack.us/photo/my-images/51/thumnailimage2o.png/)

x264:
http://img208.imageshack.us/img208/3733/thumnailimage2.png (http://imageshack.us/photo/my-images/208/thumnailimage2.png/)

I've also tried encoding adding --colorprim "bt470bg" --transfer "bt470bg" --colormatrix "bt470bg" to my parameters list, but the result is the same.

Could anybody please tell what am I doing wrong and what should I do to correct it?

Thanks

mandarinka
22nd May 2012, 16:21
This is usually a decoding issue during playback, because the encoder only works in yuv colourspace, while these level issues arise from improper conversion to rgb.

Your video renderer apparently treats the h.264 encode as if it was using pc levels (full range), while it in fact uses tv levels (limited range), same as the source mpeg2 video.
(One of possible reasons: opening two videos at once can cause the second one to be opened with a fallback renderer which can have different/wrong behaviour.)
In any case the actual encode should be fine.

nm
22nd May 2012, 16:27
I'm trying to encode a series of MPEG2 576i videos (they are labeled as interlaced, but they are progressively encoded)

Unrelated to the color level issue, but your sample image suggests that the source is actually interlaced while you're encoding it as progressive. That's not a good idea.

pepelugil
22nd May 2012, 20:00
@mandarinka: Thanks, the problem was in Scenarist Stillimage Output, when muxed resulting colors are the same as source.

@nm: Thanks to you too, the other videos from this collection where encoded as progressive, but this one is as you said interlaced.