PDA

View Full Version : Mpeg2 -> AVC (h.264 Nero Digital) - why I am losing vividness of color?


kozak
3rd October 2007, 22:17
Mpeg2 -> AVC (h.264 Nero Digital) - why I am losing vividness of color?

I'm using Nero Recode to encode some Mpeg2 clips and DVDs to mp4 files using h.264 AVC codec. Nero version 7.10.1.0 (2.5.5.0). All settings maxed out for Nero Digital AVC / Standard AVC profiles (also tried HDTV AVC profile). 2-pass encoding, deblocking -2. About 1000 kbps for video, crop and resize disabled (preserving original resolution).

Overall I get satisfactory results (to my eye) except one:
comparing original mpeg2 video with avc encoded, there is one fairly significant difference: some kind of shift in color, such that mp4 colors are somewhat washed out. What used to be bright vivid red, for example, becomes somewhat darker and not as vivid, and so on. Face color changes somewhat to less natural and so on. I mostly use VLC player to compare, but get the same result with Powerdvd. Note that the end result is still satisfactory, i.e. it is hard to notice this effect unless the resulting AVC file is compared to original side by side. Still, I consider this a fairly significant quality loss subjectively.

I haven't tried some other application yet, but trying to learn Megui and compare. Also, from the past experience, I remember using SimpleDivx for Divx/Xvid encoding and getting about the same effect. But Divx/Xvid never really cut it for me, and I never got serious about using them.

Questions:

1. Is the color distortion that I describe a pretty much universal problem of xvid/divx/avc, a necessary consequence of trying to compress video to a fairly extreme extent? Or is it a problem of Nero Recode, or the settings that I pick?

2. If so, are there perhaps any settings in Nero Recode to alleviate this (at least in theory) - perhaps deblocking value?

3. If so, perhaps other apps like Megui are better than Nero Recode in this particular respect?

4. Unrelated. I remember in the past using dvd -> divx/xvid avi conversion it was necessary to either resize the original video resolution to proper aspect ratio say 4x3 (i.e. 740x480 -> 740x556), or having the encode played incorrectly (i.e. squeezed vertically). It seems this is not necessary anymore. Is there perhaps a byte in mp4 file that sets the proper resize to happen dynamically by VLC when the clip is played? If so, how can I see this parameter? For example I do not see anything useful in GSpot. For a clip 720x480 it shows SAR = DAR = 1.5.

Thanks in advance for any comments.

Dark Shikari
3rd October 2007, 22:41
Sounds like an improper PC->TV color conversion or vice versa.

RaynQuist
3rd October 2007, 22:47
Sounds like a ColorMatrix (http://forum.doom9.org/showthread.php?s=&threadid=82217) problem.

Ranguvar
4th October 2007, 00:00
Sounds like a ColorMatrix (http://forum.doom9.org/showthread.php?s=&threadid=82217) problem.I second that.

I'd advise ripping with DVD Shrink, no file split. Then making a D2V with DGIndex. Then making an AVS to open that and use ColorMatrix.

Example:

DGDecode_mpeg2source("c:\DVD.d2v",info=3)
ColorMatrix(hints=true, interlaced=true)

danielkun
4th October 2007, 17:52
Actually I see that problem too, and I ALWAYS use colormatrix. I think that the decoders (I use purevideo software to play mpeg) do some post processing with the color, since the video seems more saturated and overall looks nicer than when decoded with dgdecode. That may be artificial but looks way nicer to be honest.

I haven't tried using directshowsource in avisynth to see if there's any difference (or disabling colormatrix), I guess I should disable hardware deinterlacing in order to apply a better deinterlacing algorithm, I'll try that later.

Also I have tried using coreavc differnt PC->TV colors, etc. I use VMR9 renderless for playing videos, with CoreAVC in auto it chooses TV color leves for input and PC color levels for output (since it uses vmr9), and I see some nice difference in color, but it also shows some artifacts that just aren't there, like some purple blocking.

Also, when decoding with libavccodec, the colors seems the same as when I use TV output levels in coreavc. If I use the levels option in ffdshow and select autolevels, then the image is horrible, has way too high contrast, I'm not sure what is the correct option there.

The Image definitely looks more pleasant to the eye with coreavc TV->PC colors, but as I said shows some horrible color artifacts sometimes, which is annoying, I'm not sure how to deal with that.

How could I know the correct input and output levels? I guess that could be useful for everybody.

Ranguvar
4th October 2007, 21:00
Then how about using Tweak() to restore it?

http://neuron2.net/tweak/tweak.html
http://avisynth.org/mediawiki/Tweak

Atak_Snajpera
6th October 2007, 23:33
I suggest to use HQ-RGB32 in ffdshow

Sagekilla
6th October 2007, 23:48
Well, if you're ripping from DVD, then doing straight encoding to x264 or whatever it is, it's still using the TV scale (which is RGB 12-234 I believe) and not utilizing the full color space. You need to remap to PC levels if you're watching this video on your PC and not TV to the full RGB 0-255.

Unfortunately, I have no idea how you can have it do the PC-->TV Levels conversion and then send to Nero Digital. Unless you use an avs + VirtualDub to a lossless format, then feed it to Nero Digital I have absolutely no clue what you can do.