View Full Version : ? Dulled Colors on Convert to XviD
Synetech
13th May 2008, 19:44
Hi,
I have noticed that when I convert a video to XviD, the result is that the colors get noticibly dulled, as though someone turned down the contrast. Here are screenshots of the original and converted videos:
http://img179.imageshack.us/img179/5044/xvidencodedcf9.th.jpg (http://img179.imageshack.us/my.php?image=xvidencodedcf9.jpg) http://img179.imageshack.us/img179/3433/originalnr0.th.jpg (http://img179.imageshack.us/my.php?image=originalnr0.jpg)
You’ll notice that the XviD one is decidedly duller, and even more confusing, it has an extra line at the bottom that the original does not seem to display.
I encoded it using XviD’s default settings (Q4, etc.). I understand that if you encode a video badly, you could encouter degredation (which there seems to be very little of in this case), but I did not realize that the colors could get so dulled.
Any idea on what happened and how to avoid it?
Thanks.
Synetech
14th May 2008, 00:22
(There are supposed to be two thumbnails which lead to imageshack’s page where the full 1024x768 pics are stored (but for some reason the board is not displaying them anymore). I also uploaded them as attachments.)
I’ll answer a few questions that are likely to come up.
I converted it like so: I open the video in VirtualDub, select Video->Full Compression, Video->Compression->Xvid MPEG-4 Codec (there are two in there, one has a FOURCC code of xvid, the other yv12), Save as AVI. I tried using the Load Defaults option with the same results. I’ve got GraphEdit if that can help narrow it down.
Someone is bound to mention the overlay. You can’t take screenshots of the overlay surface, so I figured that it would be obvious that I had made sure to occupy the overlay beforehand. ;) I use Karsten Sperling’s great Alpha program which not only provides a cool feature, it is an easy way to both test for overlay usage (it gives an error if it’s in use) as well as occupying it for testing purposes.
I compared them by using MPC to load the two videos and seeking to the same frame, then taking a screenshot, then flipping between the caps with IrfanView. The pics are of the monitor because that’s what the video is of: a video of the monitor.
henryho_hk
15th May 2008, 13:04
How do the images compare if you save a frame (both source and xvid) inside Virtualdub?
Koppel
15th May 2008, 16:57
I have the exact same problem, sort of.
http://priits.com/Koppel/xvid_badcolor.png
The original is a TGA sequence and Xvid is a single pass 1000Kbps.
The left one is print screen form VirtualDub and right one is "File > Save Image..." from Media Player Classic.
The Xvid-s colors look bad in VLC, Media Player Classic, Windows Media Player
When doing lossless compressing with Lagarith the colors are good.
Strange thing is when opening the Xvid file in VirtualDub the colors are like in the original.
Xvid ver: Xvid-1.1.3-28062007
MPC: 6.4.9.0
VirtualDubMod 1.5.10.2 (build 2540)
Irakli
15th May 2008, 20:48
Well, my guess is that this is either:
1) levels issue (0 - 255 vs 16 - 235), or
2) colorimetry issue (e.g. bt709 vs bt601)
Synetech
15th May 2008, 22:16
How do the images compare if you save a frame (both source and xvid) inside Virtualdub?
Interesting. They look the same in VDub. I checked them in VLC and WMP as well and it seems that the colors of an XviD encoded video are dulled on playback.
Well, my guess is that this is either:
1) levels issue (0 - 255 vs 16 - 235), or
2) colorimetry issue (e.g. bt709 vs bt601)
Someone else suggested that the problem is due to a difference between the matrix in the internal MJPG decoder that VDub uses and the one that the players use, resulting in different black-values. I suppose that’s kind of like what you said. I’m going to try some of the suggestions today or tomorrow and report back.
*UPDATE*
I’ve got a solution. It was suggested to me to try Avidemux since it uses an internal MJPG decoder that uses the same matrix as the video player. I tried it out and it worked like a charm (and is nice and easy—and quick).
Koppel
20th May 2008, 13:14
Synetech, I don't know if its a solution, more of a workaround.
I'd still like to know why isn't the black with Xvid true black?
xbox360
20th May 2008, 14:58
This topic is awesome I was wondering these same things. Any solution or workaround to it ?
raeltheimperialaerosolkid
20th May 2008, 15:44
Did I understand correctly? The issue is on the "decoder" side and not in the encoder?
I use Xvid to encode clips that need to be played by SAPs and I was wondering if there's something I can do to address this problem in the encoding process.
henryho_hk
20th May 2008, 16:35
If I follow the replies correctly,
[Step 1] MJPG --> (decode by Virtualdub's internal decoder) --> Intermediate Video
[Step 2] Intermediate Video --> (encode by XviD) --> XviD AVI
the problem is in [Step 1]. I suppose using AVS script and a proper MJPG VFW decoder will solve the problem completely.
neuron2
20th May 2008, 19:20
The screenshots clearly show that the source file is a downloaded torrent and thus a rule 6 violation. Thread closed.
MythBusters.S05E24.WS.DSR.XviD-SYS.avi
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.