These are several different ways to represent colors. For example: YUV and RGB colorspace. In YUV colorspace there is one component that represent lightness (luma) and two other components that represent color (chroma). As long as the luma is conveyed with full detail, detail in the chroma components can be reduced by subsampling (filtering, or averaging) which can be done in several ways (thus there are multiple formats for storing a picture in YUV colorspace). YV12 is such a format (where chroma is shared in every 2x2 pixel block) that is supported by AviSynth. Many important codecs stored the video in YV12: MPEG-4 (x264, XviD, DivX and many others), MPEG-2 on DVDs, MPEG-1 and MJPEG.
"AviSynth v2.57" (and more recent versions) can be downloaded here.
The latest DGIndex/DGDecode combo can be downloaded here.
The regular builds of Virtualdub (by Avery Lee) have YV12 support in fast
recompress mode since v1.5.6. There are also two another options for
encoding to DivX/XviD:
There is a modified version (called VirtualdubMod) which has YV12 support:
This modification (by pulco-citron, Suiryc and Belgabor) has OGM and
AVS-preview support. It can be downloaded from
here.
In order to use the YV12 support (without doing any color conversions) you
have to load your AVI in VirtualdubMod and select "fast recompress".
For easy (and fast) YV12 support, you can also try out the command line
utility AVS2AVI - compresses video from
an AviSynth script using any VFW codec, see also
here.
The MPEG-1/MPEG-2 encoders HC
and QuEnc also support (and
even require) YV12.
Using TMPGEnc you have to add the line "ConvertToRGB24" (with proper "interlaced" option) to your script, and for CCE SP you need to add the line "ConvertToYUY2" to your script, since Windows has no internal YV12 decompressor.
You can also install some YV12 decompressor (codec) which will decompress the YV12-AVI for you when loading the avi in TMPGEnc or CCE SP.
MPEG-2 encoders such as CCE, Procoder and TMPGEnc can't handle YV12 input directly. CCE and Procoder needs YUY2, and TMPGEnc RGB24. This only means that the last line of AviSynth must be a ConvertToYUY2 (for CCE/Procoder, or ConvertToRGB24 for TMPGEnc) call, and that you will not be able to take full advantage of YV12 colorspace. Still there are two advantages:
Just load your avs file in VirtualDub/VirtualdubMod and set the video on
"Fast recompress". In this mode the process will stay in YV12 (all the
necessary filtering has to be done in AviSynth itself). Under compression
select a codec which support YV12, like Xvid, DivX5, RealVideo (provided you
download the lastest binaries) or 3ivx D4 (provided you download the lastest
binaries). Note that DivX3/4 also supports YV12, except that PIV users could
experience crashes when encoding to DivX4 in YV12.
If you want to preview the video you also need a
YV12 decompressor.
In principal all internal filters support YV12 natively. Which color formats the filters support is specified in the documentation.
The plugins which are compiled for AviSynth v2.5 are given in External plugins. New plugins are listed in this sticky. Most of them support YV12 (see documentation).
To see which colorspace you are using at a given place in your script, add:
Info()
... and AviSynth will give you much information about colorspace amongst other things!
This happens due to a bug in old versions of DivX5. Download the latest binaries or use "SwapUV(clip)".
Your decoder is probably borked, try a ConvertToRGB() at the end of your script just to be sure and check whether the line has disappeared. Some application have trouble displaying YV12 clips where the width or height is not a multiple of 16.
There are several solutions to this problem:
Install a codec which supports YV12. DivX5 or one of the recent XviD builds or Helix YUV codec or some other (ffvfw, ffdshow). If that still doesn't work, modify your registry as explained in the next question.
Ok, apparently your video is not decompressed by DivX 5.02 (or Xvid). Try to use VCSwap utility for hot swapping video codecs.
Advanced user can also do it by hand. Go to your windows-dir and rename a file called MSYUV.DLL, or add the following to your registry file:
REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32] "VIDC.YV12"="divx.dll"
Replace "divx.dll" by "xvid.dll" for xvid v0.9 or "xvidvfw.dll" for xvid v1.0.
Capturing in YV12 is not recommended due to issues of interlacing and chroma; YUY2 will generally pose fewer problems. A lossless YV12 codec is more useful for saving intermediate files before a multi-pass encode, to avoid having to run a CPU-intensive script several times. There are several lossless YV12 codecs:
| Main Page | General Info | Loading Clips | Loading Scripts | Common Error Messages | Processing Different Content | Dealing with YV12 | Processing with Virtualdub Plugins |
$Date: 2008/07/02 20:56:38 $