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:
![]()
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.
original.jpg
xvid_encoded.jpg
+ Reply to Thread
Results 1 to 18 of 18
-
-
While I have no answer for your problem I can offer this bit of advice. Those pictures of your computer screen are hard to see. You would be better off taking a screenshot.
Here is how to guide
Hopefully when you get some better screenshots ,so people can actually see what is going on, someone with experience encoding in xvid will be able to help you.Donadagohvi (Cherokee for "Until we meet again") -
Xvid doesn't dull the colors. You have a colorspace or black level problem somewhere along your conversion path. You will have to outline your procedure.
One other thing to consider: How did you compare the two? Opening both at the same time in media players (looks like VLC)? If you did, it's likely one player is using video overlay and the other isn't. Video overlay has it's own brightness, contrast, and color controls. So that could be the source of the differences. -
Originally Posted by freebird73717
Originally Posted by jagabo
Originally Posted by jagaboI use Karsten Sperling’s great Alpha program which not only provides a cool feature, but 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. -
What is hard to see is it looks like you took a digital camera and took a picture of your computer screen. You can get a shot of just the active window (i.e. what ever player you used to play the xvid) and it would be much easier to see details.
Have a look at the link I provided and you will see what I mean.
By the way I applaud you for at least trying to give screen shots. Lots of people don't even try.Donadagohvi (Cherokee for "Until we meet again") -
It looks like the EXACT same photo to me....
Just one was dulled a little more... overall, not just the little video window on the desktop..... -
To tell the truth, I didn't know what part of your sample images I was supposed to be looking at. Beyond that, photographing the screen isn't a good technique because it's hard to control what the camera does. In your samples, the desktop background is lighter in one of the pictures too.
To grab a frame in VirtualDub navigate to the frame of interest and select Video -> Copy Source Frame To Clipboard. Then open a paint program, paste the data into an image, and save it.
The procedure you described to convert your video with VirtualDub sounds correct. One possible problem I see is in colorspace conversions. I believe VirtualDub always uses the rec.601 matrix to convert YUV video to RGB. MPG files (I don't think you said what your source was) can specify whether the video is rec.601 or rec.709. This would cause color shifts but not black level problems. HD video usually uses rec.709. The difference is usually very subtle. Note the differences in the red background:
There could be decoding issues within MPC. It can use internal decoders or external decoders. It's possible the different decoders are handling the two codecs differently (rec.601 vs pc.601 for example). -
Originally Posted by freebird73717
It looks like that because that’s what the video is of, a video of the screen. I played the video back with MPC and took a screenshot of the full-screen frame.
Originally Posted by Noahtuck
Originally Posted by jagabo
Originally Posted by jagabo
Originally Posted by jagabo -
Originally Posted by Synetech
Originally Posted by Synetech -
Originally Posted by jagabo
Originally Posted by jagabo
Code:MJPG MEDIATYPE_Video {73646976-0000-0010-8000-00aa00389b71} MEDIASUBTYPE_MJPG {47504a4d-0000-0010-8000-00aa00389b71} -------------------- DSH MJPG MJPEG Decompressor {301056D0-6DFF-11D2-9EEB-006008039E37} 0x00600000 quartz.dll - - Type DSH - - Function Decoder DSH 4CC MJPG DSH Friendly Name MJPEG Decompressor DSH DirectShow CLSID CLSID_MjpegDec {301056D0-6DFF-11D2-9EEB-006008039E37} REG Driver File C:\WINDOWS\System32\quartz.dll REG Merit 0x00600000 -------------------- DSH MJPG AVI Draw {A888DF60-1E90-11CF-AC98-00AA004C0FA9} 0x00600064 quartz.dll - - Type DSH - - Function Other DSH 4CC MJPG DSH Friendly Name AVI Draw DSH DirectShow CLSID CLSID_AVIDraw {A888DF60-1E90-11CF-AC98-00AA004C0FA9} REG Driver File C:\WINDOWS\System32\quartz.dll REG Merit 0x00600064
-
VirtualDub's internal MJPEG decoder uses a PC.601 matrix to convert to RGB. That results in a higher black level than the rec.601 matrix used for most video. You can verify that VirtualDub is using its internal MJPEG decoder by selecting File -> File Information after opening your MJPEG file.
You can get around the PC.601 issue by using an MJPEG decoder that outputs RGB converted with the rec.601 matrix. Or you can use AviSynth to open the file with:
DirectShowSource("filename.avi")
ConvertToRGB() #default is rec.601
Or you can just use VirtualDub's Levels filter to do the contrast stretch.
Another issue is which matrix is right. Your "original" sample contains blacks near zero and whites over 240. So VirtualDub PC.601 matrix may be correct. Even if it is, you may want to adjust the contrast to your liking. -
Originally Posted by jagabo
Originally Posted by jagabo
Originally Posted by jagabo
Originally Posted by jagabo
Originally Posted by jagabo
If it is an incompatibility between the matrix used to decode the MJPG video, then it should not be a problem if I re-encode other videos like DivX or MPEG with VDub right? I was worrying that all the videos I had compressed to XviD with VDub were duller. -
Originally Posted by Synetech
Originally Posted by Synetech
Originally Posted by Synetech
Originally Posted by Synetech
Originally Posted by Synetech
Here's a thread about the same problem:
https://www.videohelp.com/forum/archive/mjpeg-to-mpg2-color-issue-t342710.html
And lastly, try using AviDemux. It has it's own built in MJPEG decoder and uses the rec.601 matrix (or passes the YUV data directly to the encoder). -
Originally Posted by jagabo
Thanks for the suggestions. I haven’t used Avidemux for a month or two, so I forgot to try that out. Hopefully that will be an easy way to handle these camera videos.
I’m sure it fits with your analysis, but it seems that the difference is only present when played back (it’s the same in VLC and WMP as in MPC), because they look the same when I load the original and XviD versions into VDub.
*UPDATE*
I just encoded it with Avidemux and it was perfect. The results looked the same in media players as in VDub. The only issue was that the resulting video from Avidemux was 64% larger than the one from VDub (also, it used Q4 even though I set it to Q1, it won’t seem to accept Q1). At first I thought the problem was that I can’t figure out how to encode a video with no audio in Avidemux, so the extra space was due to the audio, but that turned out to be very small (less than a 1MB). GSpot shows that it has a higher bitrate than the VDub encode. I tried another encode, specifically setting it to Q4 and it still ended up 64% bigger.
I was converting a DVD clip to AVI today, so since I had AutoGK running, I gave it a go at this video. I suppose it’s not a shock that it resulted in a dulled video since it uses VDubMod.
Thanks a lot. Avidemux is a nice, easy solution to compressing the videos from this camera, and I learned some useful information. -
Originally Posted by Synetech
Similar Threads
-
Convert Vc1 to xvid via AviSynth -> colors slipped ??
By housemusic in forum Video ConversionReplies: 0Last Post: 24th Sep 2010, 13:36 -
How do I convert xvid framerate 23,967 to xvid framerate 25.000?
By QuickstartDK in forum Newbie / General discussionsReplies: 16Last Post: 4th Nov 2009, 17:57 -
Convert Xvid versions to Xvid 1.1.2
By mdavenport in forum Video ConversionReplies: 23Last Post: 11th May 2008, 18:01 -
convert 2cd Xvid to 1cd xvid Avi
By mehargags in forum Video ConversionReplies: 6Last Post: 14th Apr 2008, 10:55 -
How to convert XVid v1.1.2 to XVid v1.0.3 ?
By cornelius in forum Video ConversionReplies: 4Last Post: 5th Sep 2007, 01:36