Log in

View Full Version : VDub xvid encoding?


3thman
15th September 2009, 15:04
In Vdub i encode my mpeg2 & ts vids by xvid mpeg4 codec , but there is a problem :
- when i nstalled the codec the first time i found 2 xvid codecs in compression menu ... the 1st differs from the other in FOURCC code ... one of them is " xvid " & the other is " yv12" ... i preferred the 2nd because it gives me higer quality & lower size , but the problem is when i installed the xvid again " after system changing " i found the 1st codec only.

- how can i get the 2nd "yv12" ? please illustrate the difference.

LoRd_MuldeR
15th September 2009, 18:41
The 'YV12' FourCC indicates uncompressed YUV 4:2:0 (http://en.wikipedia.org/wiki/Chroma_subsampling#Sampling_systems_and_ratios) data. That's exactly the same colorspace the Xvid codec (and any other MPEG-4 ASP codec) uses, just totally uncompressed ;)

Of course the uncompressed YV12 data has "better" quality than the MPEG-4 ASP compressed one. Uncompressed is always identical to the source, while MPEG-4 ASP is a lossy compression format.

However your claim that the uncompressed YV12 version was smaller than the MPEG-4 ASP version makes no sense. The uncompressed version should be bigger by several orders of magnitude!

3thman
16th September 2009, 18:53
The 'YV12' FourCC indicates uncompressed YUV 4:2:0 (http://en.wikipedia.org/wiki/Chroma_subsampling#Sampling_systems_and_ratios) data. That's exactly the same colorspace the Xvid codec (and any other MPEG-4 ASP codec) uses, just totally uncompressed ;)

Of course the uncompressed YV12 data has "better" quality than the MPEG-4 ASP compressed one. Uncompressed is always identical to the source, while MPEG-4 ASP is a lossy compression format.

However your claim that the uncompressed YV12 version was smaller than the MPEG-4 ASP version makes no sense. The uncompressed version should be bigger by several orders of magnitude!
Thank u so much for response
I think i understand now but from where can i get the xvid lossless codec?

Inspector.Gadget
16th September 2009, 19:14
There's no such thing as an Xvid lossless codec. MPEG-4 ASP doesn't have a lossless function.

LoRd_MuldeR
16th September 2009, 19:26
If you really want/need lossless compression, there are much better ways than storing totally uncompressed YV12 data. The size would be extraordinary!

There are lossless Codecs, such as FFV1, HuffYUV and Lagarith. Also H.264 can do lossless and x264 does support a lossless mode.

While lossless compression will be significant smaller than uncompressed data, it will still yield a much bigger file than lossy compression (as e.g. Xvid would do).

For most purposes lossy compression is absolutely fine, if you only give it enough bitrate for "transparent" (visually lossless) quality...

MatLz
16th September 2009, 19:43
I have the same 'problem' (in fact there is not 'real' problem I think)
There is just ONLY 1 XVID INSTALLED, but I think virtualdub offers the possibility to change the fourcc.

Similar thread:
http://forum.doom9.org/showthread.php?p=1326512#post1326512

LoRd_MuldeR
16th September 2009, 19:48
I have the same 'problem' (in fact there is not 'real' problem I think)
There is just only 1 Xvid installed, but I think virtualdub offers the possibility to change the fourcc.

Yes, Xvid lets you choose between a couple of FourCC's that are all commonly used to indicate MPEG-4 ASP data. These include 'XVID', 'DIVX' and 'DX50'.

Xvid offers that option, because FourCC's aren't unambiguous! Various MPEG-4 ASP encoders (DivX, Xvid, etc) use their own "personal" FourCC codes to identify the stream :rolleyes:

Unfortunately some (hardware) players don't recognize 'XVID' as MPEG-4 ASP video, so for those players you will have more success with a 'DIVX' or 'DX50' FourCC.

Nonetheless Xvid would never identify its streams with a 'YV12' FourCC, because that FourCC clearly identifies uncompressed/raw YV12 (YUV 4:2:0) data...

MatLz
16th September 2009, 20:05
Unfortunately some (hardware) players don't recognize 'XVID' as MPEG-4 ASP video, so for those players you will have more success with a 'DIVX' or 'DX50' FourCC.

Why?.....just for not disturbing divx©£$¥ ?
We live in a corrupted world...

LoRd_MuldeR
16th September 2009, 20:26
Why?.....just for not disturbing divx©£$¥ ?
We live in a corrupted world...

...because the AVI container uses Codec-specific (and not Format-specific) FourCC's to identify the video streams!

Therefore different Codecs often use different "personalized" FourCC codes, even if they implement the same video compression standard and their outputs are 100% bitstream-compatible :rolleyes:

So every player needs to map the FourCC found in the AVI file to the corresponding video format in order to choose the proper decoder.

Of course various FourCC's may map to the same format. For example 'XVID', 'DIVX', 'DX50' and even more all map to the MPEG-4 ASP format. Still none of them is more (or less) "correct" ;)

Other containers, such as MP4, use pre-defined identifiers to identify the video/audio formats, so the problem of ambiguous Codec identifiers is avoided...

3thman
17th September 2009, 10:36
thank u som much ... I tried lagarith & ffvfw they give me very high sizes ... If possible , i want lossless codec gives low sizes as i dont like changing bitrates. (e.g 5min ==>25 mb ) " video without sound"
* the xvid with FOURCC code " yv12" gives me my request , but i cant find it.
* i read here that i can show yv12 , i should enter registery key to xvidvfw.dll. ... if possible how can i do so?

LoRd_MuldeR
17th September 2009, 19:17
thank u som much ... I tried lagarith & ffvfw they give me very high sizes ... If possible , i want lossless codec gives low sizes as i dont like changing bitrates. (e.g 5min ==>25 mb ) " video without sound"

Lossless compression will result in a MUCH bigger file than lossy compression for obvious reasons ;)

* the xvid with FOURCC code " yv12" gives me my request , but i cant find it.

There is no such thing.

* i read here that i can show yv12 , i should enter registery key to xvidvfw.dll. ... if possible how can i do so?

As said before, the 'YV12' FourCC refers to uncompressed YUV 4:2:0 data. It's not related to the Xvid or any other MPEG-4 ASP encoder...

3thman
17th September 2009, 20:01
:)Thank u again LoRd_MuldeR .... any ways , i have to reduce the bit-rate , but i ve another 2 questions ... *Why cant i compress with h263 & h261 codecs
http://img529.imageshack.us/img529/9610/917200984856pm.png

* is there a filter for MeGUI like the "region remove " filter in VDub?

LoRd_MuldeR
17th September 2009, 20:09
any ways , i have to reduce the bit-rate

Video encoders, such as DivX, Xvid or x264, let you specify the target bitrate. So simply specify the desired target bitrate and that's it :cool:

For target bitrate the "2-Pass" mode is highly recommend!

Why cant i compress with h263 & h261 codecs

VirtualDub already tells you the reason: The Codec either doesn't support the desired color format -or- the Codec is "locked" (aka "decode only"). And why in the world you want H.263/H.261 ???

BTW: In VirtualDub you can choose the color format under "Video" -> "Color Depth" ;)

3thman
17th September 2009, 20:25
For target bitrate the "2-Pass" mode is highly recommend!

it says " ca not fint stats file"

VirtualDub already tells you the reason: The Codec either doesn't support the desired color format -or- the Codec is "locked" (aka "decode only")

it is solved by changing the colour depth to 32 bit but it onlydecompresses the vid.

* u have a nice post explaining x264 in avidemux ... i installed x264 codec is it better than xvid? ... Is it available in Vdub?

LoRd_MuldeR
17th September 2009, 20:54
it says " ca not fint stats file"

As the name implies, 2-Pass requires two passes. In the first pass the stats file is created. In the second pass the stats file is read.

So you need to run and complete a first pass, before you can start a second pass ;)

* u have a nice post explaining x264 in avidemux ... i installed x264 codec is it better than xvid?

"Better" or "worse" are not the correct ways of thinking about this :eek:

As said before, Xvid is a MPEG-4 ASP (http://en.wikipedia.org/wiki/MPEG-4_Part_2) encoder, just like DivX. But x264 is a MPEG-4 AVC (http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC) (aka H.264) encoder. These are two different compression standards!

But in general H.264 compresses more efficient than MPEG-4 ASP. That means: At the same file size (or same bitrate) x264 should indeed deliver "better" visual quality than Xvid/DivX.

However be aware that you need a H.264 decoder to play x264-encoded footage, as apposes to DivX, Xvid and friends that need a MPEG-4 ASP decoder...

... Is it available in Vdub?

Hmm, yes. There is a VFW Codec of x264. But it's not supported by the x264 developers. It's highly recommended to not use x264 through VFW (that is: in VirtualDub & Co).

Use Avidemux, MeGUI, RipBot264 or one of the other x264 GUI's. There are plenty of them available. Look at the MPEG-4 Encoder GUIs (http://forum.doom9.org/forumdisplay.php?f=78) section!

3thman
18th September 2009, 10:39
with your help , u learned me how to think to solve a problem:).
I could manage the problems now... lol

farmdve
21st September 2009, 14:59
As the name implies, 2-Pass requires two passes. In the first pass the stats file is created. In the second pass the stats file is read.

So you need to run and complete a first pass, before you can start a second pass ;)



"Better" or "worse" are not the correct ways of thinking about this :eek:

As said before, Xvid is a MPEG-4 ASP (http://en.wikipedia.org/wiki/MPEG-4_Part_2) encoder, just like DivX. But x264 is a MPEG-4 AVC (http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC) (aka H.264) encoder. These are two different compression standards!

But in general H.264 compresses more efficient than MPEG-4 ASP. That means: At the same file size (or same bitrate) x264 should indeed deliver "better" visual quality than Xvid/DivX.

However be aware that you need a H.264 decoder to play x264-encoded footage, as apposes to DivX, Xvid and friends that need a MPEG-4 ASP decoder...



Hmm, yes. There is a VFW Codec of x264. But it's not supported by the x264 developers. It's highly recommended to not use x264 through VFW (that is: in VirtualDub & Co).

Use Avidemux, MeGUI, RipBot264 or one of the other x264 GUI's. There are plenty of them available. Look at the MPEG-4 Encoder GUIs (http://forum.doom9.org/forumdisplay.php?f=78) section!
True we can use megui but its way too complex than vdub.
Let me explain all the things i dont know in vdub(global for any encoding soft) and megui.

I DON'T know:
What VHQ mode is!
What QPel is.
What GMC is.
What Quantization type means.
What Packed bitstream is.
What bvop is.
What Trellis Quant is.
What adaptive quantization is.
What a keyframe is.
What a b-frame is.
What Chroma motion is.
What this GOP is.
What this CABAC is.
What these Zone options are in vdubmod
What these profiles do in vdubmod
What these reaction delay factors are in xvid codec in vdub.

And this aint 0.1% of them. But i experiment and change them to see what happens. And megui is trice(triple) complex

Inspector.Gadget
21st September 2009, 15:01
Are you afraid to use Google?

farmdve
21st September 2009, 15:15
@Inspector.Gadget

That is not necessarily the case.
Even if i search the definitions of those stuff, i'd need definitions OF the definitions. And even if i translate the stuff to my own language i still won't know what they mean. I am not american so it is difficult to understand those stuff

Example: Wiki gives this for Qpel: "Quarter pixel (also known as Q-pel or Qpel) refers to a quarter of a standard pixel. It is used in many modern video encoding standards such as MPEG-4 ASP and H.264/AVC to refer to quarter pixel precision in motion estimation and motion compensation."
I didn't get it at all especially this part "quarter pixel precision".

Inspector.Gadget
21st September 2009, 16:04
What's your native language? In all likelihood the necessary translation and explanation has already been done somewhere on the internet.

farmdve
21st September 2009, 16:16
What's your native language? In all likelihood the necessary translation and explanation has already been done somewhere on the internet.
Well what i mean is that in order for me to grasp it, it must be explained for a moron which i don't want to call myself that but thats me.

Inspector.Gadget
21st September 2009, 16:22
Well, to keep things simplest, maybe the thing to do is consider the hardware platform you're encoding for and just follow those guidelines verbatim. If you're encoding for PC using Xvid, go ahead and use the most complex settings for all options - only very old PCs will have decoding trouble.

Chikuzen
30th May 2010, 10:43
I found Xvid yv12 codec.
It appeared on diarogbox before I am aware:eek:

http://img337.imageshack.us/img337/8957/xvidyv12.png

Xvid that I installed is 1.2.2(VAQ) downloaded from xvidvideo.ru (http://www.xvidvideo.ru/xvid-video-codec/xvid-1-2-2-x86-x64-stable-release-vaq.html).

Its output had neither Xvid1.2.2 nor the difference though I tried Xvid yv12.The only difference is that FourCC Description Code becomes yv12:p
http://img339.imageshack.us/img339/5856/pic004.png

sample is here (http://www.mediafire.com/download.php?woyn5z21in0).