Log in

View Full Version : DVD backup color issue


pieroxy
23rd March 2005, 09:59
Hi,

Whatever the guides and the method (DVD to SVCD, DVD to DivX, DVD to Xvid) I always end up with a backup where the black portions (think a scene in the night) are not black but dark gray with a bunch of artifacts.

The artifacts are inherents to MPEG (2/4) encoding and there is little one can do about it. They are even there in the original VOB, but somewhat, when I play the DVD on my set-top (or on my PC for that matter) the black are saturated and thus the artifacts invisible, because black.

Is this normal? What is the best way to avoid it? Just a filter in VDub?

pieroxy
1st April 2005, 09:20
bump

theReal
1st April 2005, 11:08
I guess the set top DVD player as well as software DVD players raise the black level and contrast (for instance PowerDVD has different presets such as "theatre" that make the picture look more brilliant with more contrast and brightness).

So I think all you need to do is play a little with black level/contrast /brightness - not necessarily before encoding. If you're using ffdshow for playback, you can perfectly adjust the image during playback.

adam
1st April 2005, 14:12
I don't believe these artifacts are in the original vob. The reason you see them is because you are analyzing them on your computer. Tvs use a narrower luminance range than what your pc supports. Your source is configured for tv playback. If you play the DVD back via software it will be expanded to your pc range, and look fine. But if you are analyzing these vobs through the various backup tools, then yes the black will appear more like grey. This is normal, but there is nothing wrong.

As for your problem, you are either overcompressing your luminance levels or hard clipping them. This is a problem introduced whenever you have colorspace conversions between YUV and RGB. Basically they support different ranges for luminance levels because YUV must leave headroom and footroom. When you convert from RGB to YUV the outer ranges are clipped (0-16 on low end and 255-235 on high end.) So you have to remap your values to 16 and 235 before clipping. There are two ways to do this. You can compress your scale to 16-235 and import into your encoder, setting its output to 0-255 which just clips the outer ranges (nothing is there since you compressed it). In simple terms, it leaves it how it is essentially. Or you can import your levels at 0-255 and set the encoder to 16-235 which will remap to 16-235 before clipping.

I realize it probably sounds like I'm speaking another language here. Basically, as a start you should just look in your encoder for an option to toggle 0-255 and 16-235. Using the opposite setting you are using now might solve your problem. More than likely you will have to analyze your entire process since its possible that your values are being clipped before you even get to your encoder. If you tell me what method and tools you are using it would be easier to problem solve.

P.S., I don't think this belongs in the general forum.

Didée
1st April 2005, 15:35
Originally posted by pieroxy
I always end up with a backup where the black portions (think a scene in the night) are not black but dark gray with a bunch of artifacts.
Check your monitor calibration.

Check your overlay settings.

If everything is set up "correctly", then the movie should appear *darker* on your PC monitor than on the TV set. Without additional correction, detail (and artefacts as well) in dark areas that is hardly-but-still visible on TV, should be invisible on the PC monitor. That's because of the different gamma responses of the respective display devices.

pieroxy
1st April 2005, 18:13
My process:
DVD -> Rip -> DVD2AVI -> vfapi_reader -> VirtualDub -> AVI

As for monitor calibration, this has to be a joke. I don't want ALL my blacks saturated! Overlay settings are the same: I will play a DivX fine, and then next to that my DVDs will appear darker and blacks will be twice as saturated!

Thanks adam, that wasn't another language. I did know there was not a 1 to 1 mapping btw YUV and RGB, but I didn't know what it was.

adam
1st April 2005, 22:27
Try this, in dvd2avi set output to RGB and then toggle between pc and tv scale. You should notice that on pc scale it will look correct and on tv scale it will appear more grey like you are experiencing, because you will be displaying a 16-235 source on your 0-255 setup. I would leave dvd2avi at RGB and pc scale and that should probably solve your problem. You can always use the levels filter in vdub to look at where your levels are at. Pick a scene with pure black in white, or if its letterboxed you'll always have pure black values. Look at the histogram and make sure your levels extend all the way to the outer edges. If they don't, then clip the area they don't extend to. Then encode to avi and your luminance levels should be correct.

This is definitely not a monitor/hardware problem if the source is fine and the backup isn't. This is clearly just a problem with your luminance levels not being set correctly.

Didée
2nd April 2005, 01:07
Originally posted by pieroxy
My process:
DVD -> Rip -> DVD2AVI -> vfapi_reader -> VirtualDub -> AVI
Well. The best way to reproduce the source as close to 1:1 as possible is, to leave it as much unchanged as possible.

You should really stop using vfapi.

The transformation RGB <--> YUV is always lossy. Mostly the difference is hard to see, but dark areas have low energy, and if the whole scene is dark then our eyes are extremely sensitive to minor value changes. An pixel error of +/- 1 is practically invisible in bright, high contrast areas. But in dark areas, an error of +/- 1 can already make the difference between "clean" and "b0rked".

The source is YUV12, the encoder will encode YV12. Why take the unavoidable errors of an intermediate RGB conversion, when it isn't necessary at all?
I strongly recommend to inform yourself about AviSynth.


So much about artefacting. Regarding brightness differences,
As for monitor calibration, this has to be a joke. I don't want ALL my blacks saturated! Overlay settings are the same: I will play a DivX fine, and then next to that my DVDs will appear darker and blacks will be twice as saturated! I am not sure if your backup really has wrong levels, or if is an user error. For example you cannot play a DevilX and a DVD side-by-side and make any color comparisons (LOL), if that's what you have meant with that quote.
You have to know about HardwareOverlays, SoftwareOverlays, and VMR, if there are overlay preferences in the *different players* you use, which filters are used for decoding the different formats, and how the filters are set up.

That's most of it, given for the issue of mpeg decoding standard to use, for which there is ColorMatrix.dll for AviSynth.

theReal
2nd April 2005, 09:44
I was just wondering where you get RGB from a DVD - but Didée has the explanation here.
And btw. avisynth is also faster because you don't need colorspace conversions!