Log in

View Full Version : How to get rid of gray areas in black scenes?


Reginald0
4th June 2008, 04:00
Hi, folks!

Is there some way to get rid of that ugly gray areas on black scenes when converting videos to Xvid format?
I convert mostly musical DVD's to Xvid, and as almost all of these videos are Rock 'n' Roll concerts, the frames are always dark and there is a predominance of the black color, so the result is a lot of grey areas where they don't supposed to be.
I use the combo DGDecode+AviSynth+VirtualDub+Xvid, encoding with default settings.
If anyone have a solution, please let me know.
Thanks in advance,

Reginald0

HymnToLife
4th June 2008, 05:29
Too high compression, most likely. What's the resolution of the video, and what bitrate are you encoding it at?

Irakli
4th June 2008, 17:06
It might be too high compression as HymnToLife suggested. However, you might want to try VAQ-enabled XviD build and see if that solves your problem.

Reginald0
4th June 2008, 18:54
The resolution I always encode is 640x480 (4:3) or 640x360 (16:9) using the default Xvid compression setting (quantizer Q4). I'll try to just lower the quantizer without change no other setting to see what happens and post the result later.

HymnToLife
4th June 2008, 20:21
You really should try a two-pass encode, then.

Reginald0
5th June 2008, 02:25
I did some tests with most popular codecs (Xvid, DivX, x264) but the result was the same: with compression, the ugly gray areas appear, even with high quality quantizer (Q2). The only way I can get completely rid of that is setting quantizer to Q1 (maximum quality, almost lossless), but the file size grows more than four times than when using default setting (Q4), reaching nearly the original file size, so it's not worth the gain.
Two-pass encode didn't make any difference, at least visually, so I think I'll stick with the way I'm already doing, Xvid one-pass quantizer Q4, which gives me reasonable quality with fairly file size, and get used to those annoying gray areas.
Anyway, thanks for your attention.

Reginald0

cdanddvdpublisher
5th June 2008, 18:55
I'd say that it definitely seems like a compression issue, but I'm not sure of what the remedy would be.

Dr.Khron
5th June 2008, 19:46
Maybe try some extra-heavy noise filtering/smoothing?

Irakli
5th June 2008, 21:11
@ Reginald0

Can you post some screenshots please?

Reginald0
6th June 2008, 04:20
I put 3 screenshots from the same video, first from the beginning, second from the middle and third from the end, just to exemplify what I'm talking about.
As the video is 640x360, the defects will just be visible in full screen mode in your picture viewer.

Thanks again...

Atak_Snajpera
6th June 2008, 07:08
Force HQ-RGB32 in FFDShow

Reginald0
6th June 2008, 13:38
Atak, I prefer to use the proper Xvid decoder, that was programmed only for this purpose. Besides, my Xvid videos are not RGB, but YUV (the original colorspace from DVD). Also, I don't like to set improvements on the decoder side, preferring to correct all the imperfections on encoding time, using AviSynth filters and encoder settings, something like "source quality over output quality".

Zwitterion
6th June 2008, 17:08
That correction is always done by the decoder, except when you encode to RGB in the first place which is not recommended.
The reason why your DVD is black is that your MPEG2 decoder does that correction.
Set the output colorspace of the Xvid decoder to RGB32, that will solve the problem.

Or use the overlay renderer.

Reginald0
7th June 2008, 03:06
Zwitterion, I have tested all the Xvid output colorspaces, and the one I really notice some visual differences was YV12 (more smooth frames, but also a little bit blurry), and this is the original colorspace from DVD (correcting my own statement above).
I didn't understand when you said "use overlay renderer", cause the only option available in Xvid config is "Compatibility Renderer", but also didn't make any visual difference.

Zwitterion
7th June 2008, 07:24
If you use Media Player Classic, you can change the renderer in the options menu under Playback - Output.
I don't see anything wrong with the screenshots you posted unless you are talking about normal Xvid encoding artifacts. Could you circle the problematic areas, please?

Reginald0
7th June 2008, 14:11
I have tried MPC with overlay renderer, but once again, no visual difference. About the screenshots, it's impossible to see the defects just looking at the posted images, cause they're in original size (640x360). Try to save the first image (the worst scenario) and see it in full screen mode in your picture viewer (I suggest IrfanView ;-)), then you could clearly see how grayed blocks appear at dark areas.
I'm beginning to suspect that there's no solution for this problem with compressed encoding, as above said, they seem to be normal encoding artifacts, no matter what decoding trick I use.