Monday, September 04, 2006

Computing VirtualDub/VDubMod SetCompData string of XviD

Process of DV-2-XviD is very simple. It generate AVS(AviSynth) script first. The script conjoin video clips, load kerneldeint.dll to DeInterlace, load dvinfo.dll to add datetime code on screen, and LanczosResize the resolution. Then it generate three VCF(VirtualDub/VDubMod) scripts to split PCM audio that will be compressed by LAME-mp3 encoder, run XviD 2-pass compress.

The most difficult step of above is computing SetCompData string. The data structure depend on XviD's build version and must be computed for every special verion if we need control target file exactly. Now I just use a simple, unified function to compute it. It works under XviD 1.03/1.1.0-beat2/1.1.0/1.2.0-dev .

The function use Python's ctype module to load xvidvfw.dll, fetch default config from it. Now I want somebody that was accomplished in XviD compression to help me improving the program.

No comments: