Log in

View Full Version : Divx & YV12 colospace


varunb
15th December 2006, 15:02
I have been trying to encode my videos using Divx 6.4 codec in YV12 colorspace but i fail everytime. Even setting color depth as YV12 in virtualdub & avisynth didn't help me either. Is it possible to encode in YV12 colorspace using Divx ?

Guest
15th December 2006, 15:06
Works fine for me. Deliver YV12 from your AVS script into VirtualDub and then use Fast Recompress.

You should also open the Codec Configuration Utility and set "Output YUV 4:2:0 when supported". Otherwise, the encoded DivX AVI may be in YV12 but gets converted to YUY2 or RGB when played back or opened in VirtualDub.

varunb
16th December 2006, 10:34
Thanx for replying neuron 2 but i hav already tried the steps u hav mentioned. I did use fast recompress, converttoyv12() & pixel_type="yv12" but it didn't work. Even the 'Output 4:2:0 when supported' option was checked.

scharfis_brain
16th December 2006, 12:57
what means 'didn't work'?
crashes? error messages? etc.

be more precise!

varunb
16th December 2006, 14:14
Well what i am trying to say is that whenever i view the properties of the output divx avi, it shows that the 'video sample size' is 24 bit instead of showing 12 bit. i had already performed the steps that neuron 2 posted before even posting here. I dont understand where i am going wrong ??

Guest
16th December 2006, 15:05
Check your encoded output DivX properties like this:

AviSource("file.avi")
Info()

Then serve that into VirtualDub and see what it says for color space.

scharfis_brain
16th December 2006, 15:05
don't trust the explorer properties! it uses some directshow decoder to determine its properties. but these usually aren't correct.
use gspot for such examinations.


btw.: yv12 is the only format supported by divx!

varunb
16th December 2006, 16:34
use gspot for such examinations.

I cant find any tab in Gspot that shows what the color depth of the video is.

don't trust the explorer properties!

I encoded the same video using XVID, folllowing the same procedure, but the explorer is showing 12 bit for this video. MAN! I AM REALLY CONFUSED NOW !!

Guest
16th December 2006, 20:42
Try the method I gave you!

http://forum.doom9.org/showthread.php?p=917909#post917909

varunb
17th December 2006, 07:40
Check your encoded output DivX properties like this:

AviSource("file.avi")
Info()

Then serve that into VirtualDub and see what it says for color space.

Thanx neuron 2! Sorry i never saw see this reply of urs before.
But anyways, my prob is solved. Thanx to u ! :)

varunb
17th December 2006, 07:50
Hey wait, there's another question i wanted to ask u. I had encoded an avi(using xvid codec) from a dvd, few days ago, using the ConvertToRGB32(matrix="rec709") command in avisynth & frameserved it to TMPGEnc 3.0 Xpress. I had even turned off the 'encode & decode in YUV' option in Xpress before encoding. Now when i just checked the info of the avi, using the method u posted here, in virtualdub, it shows colorspace='YV12'. How is this possible ? It is supposed to show RGB32.

Blue_MiSfit
17th December 2006, 09:07
TMPGEnc wants RGB32 input. That's what you gave it using ConvertToRGB32. XviD uses YV12, no matter what it's given, and in this case, you are going from YV12 on the DVD's MPEG2, to RGB32 in AviSynth feeding TMPGEnc, and then back to YV12 for XviD. A slow and lossy colorspace conversion.

No matter what you use to encode XviD the result will always be YV12 (4:2:0) MPEG-4. Windows Explorer might tell you otherwise, but it's always YV12 MPEG-4. So basically, converting to RGB32 and using TMPGenc is a waste of time IMO, because the color space conversion is slow and can introduce artifacts. Keping it as YV12 the whole time will net you the best results - this is what Fast Recompress mode does in virtual dub.

Doing an RGB32 conversion does enable you to use VirtualDub filters, and options in TMPGenc, but equivalent functionality can be had with AviSynth and a pure YV12 workflow. This method will also be faster.

~MiSfit

varunb
17th December 2006, 14:12
No matter what you use to encode XviD the result will always be YV12 (4:2:0) MPEG-4.

That i didn't know. Thanx Misfit !