View Full Version : Xvid CLI


IgorC
7th July 2005, 19:53
I tried to search some info about cli version but without success.
I want to encode Xvid directly to native mp4 container and see if there are some speed improvements or/and additional settings to play with.

I supose Mencoder has xvid codec (version of xvid?). But I didn't find information how to encode via mencoder. Right now investigating Megui.

Kurtnoise
7th July 2005, 20:00
yep...you can find some infos in MeGUI thread or in mplayer/mencoder guides/FAQ.

Otherwise, you can try avs2avi to encode and mp4box to mux your stream in the mp4 container.

IgorC
7th July 2005, 20:24
mp4box is alternative way. But is it possible to encode with Xvid like x264 via CLI ? It results very comfortable and without any GUI and/or mp4box. Indeed , GUI helps much when there are too many setings and automized process of multipass,container etc.

Btw , what version of Xvid has last mplayer http://www.aziendeassociate.it/cd.asp?dir=/mplayer (28 of june) ?

Doom9
7th July 2005, 20:35
the closest equivalent to x264.exe is encraw.exe.. you won't find it compiled almost anywhere, and it's like the early x264.exe versions: no avisynth input, only raw output, and feature limited. I'd much appreciate if you could extend it though ;)

Sirber
7th July 2005, 21:21
I would be interrested by a x264.exe-like xvid CLI with AVS input.

Kurtnoise
7th July 2005, 22:21
the closest equivalent to x264.exe is encraw.exe...
there is also xvidenc from mpeg4ip tools...Only yuv as input but mp4 as output. The xvid options are also very limited. Unfortunately, I never succeeded to compile myself this tool.

If anybody is interested : http://cvs.sourceforge.net/viewcvs.py/mpeg4ip/mpeg4ip/server/util/xvidenc/

Sharktooth
8th July 2005, 12:43
xvid encraw was updated yesterday with the addition of -vhqmode switch.
still encraw is not on par with VFW...

bond
8th July 2005, 13:49
there is also xvidenc from mpeg4ip tools...Only yuv as input but mp4 as output. The xvid options are also very limited. Unfortunately, I never succeeded to compile myself this tool.

If anybody is interested : http://cvs.sourceforge.net/viewcvs.py/mpeg4ip/mpeg4ip/server/util/xvidenc/
would be great if someone can try to compile this!

Sharktooth
8th July 2005, 13:51
uhm...

bond
8th July 2005, 14:25
seems xvidenc is only supposed to output a raw mpeg-4 stream, also its not possible to set any xvid options

Doom9
8th July 2005, 14:37
as I said.. encraw seems the most promising approach but it takes somebody with serious C knowledge to add the additional input and output types and somebody with good xvid knowledge to expose the additional options. The additional zone types seem especially challenging because you have to check them for each frame and force certain frame type decision (like greyscale, or make the first zone frame an i-frame, etc).

If there was a really good C IDE (akin VS, showing contents of variables not addresses is already a good start), and I had time (which I do not.. MeGUI takes precedence and I have some interesting ideas for the future), I'd do it myself but since I can use mencoder it's not a priority. As a little encouragement I promise to fully support an enhanced encraw in MeGUI.

Sirber
8th July 2005, 14:42
As a little encouragement I promise to fully support an enhanced encraw in MeGUI.
Same here.

madoka
10th July 2005, 13:15
While a bit round-about, but in theory by using VirutalDub one could encode XviD using just CLI. Basically, some front-end program constructs a job file and pass it to vdub.exe.

VirtualDub's job file format is well documented, so the only sticky bit would be to decipher the opaque portion that's passed to the XviD codec:
void SetCompData(int length, string data);

Sets the private codec data for the video compressor that is modified
when you click Configure in the Video Compression dialog. This data
is opaque to VirtualDub and is used only by the video codec. length
is the length of the data block in bytes, and the data is the data
block encoded in MIME BASE64.En/de-coding base64 is not difficult either; command-line tools that do so are readiliy available (e.g. this (http://www.fourmilab.ch/webtools/base64/)).

After looking at some job files generated by VirtualDub and referencing XviD's code briefly, it appears that the data passed is simply the CONFIG structure (defined in config.h and vfwext.h).

In summary, with VirtualDub's help, all that's required to encode XviD is a front-end program that:

Reads command-line switches, and generated the appropriate CONFIG structure.
Encodes the data in base64 (possibly using an external helper program).
Writes it into a job file.
Calls vdub.exe, passing the job file as its argument.


Anyone want to volunteer? :sly:

Doom9
10th July 2005, 13:27
but in theory by using VirutalDub one could encode XviD using just CLI. Basically, some front-end program constructs a job file and pass it to vdub.exe.That's what is being done by tools like GKnot, AutoGK and DVX. The idea here is to have a non VfW dependant solution with direct MP4 output.

IgorC
14th July 2005, 13:45
There is precompiled Mencoder binaries - XviD 1.1.x branch - x264 svn on Sherpya's site. http://oss.netfarm.it/mplayer-win32.php
I Didn't test it yet. Any documentation?

Doom9
14th July 2005, 13:49
IgorC: we've been using that for a long while.. but mencoder's xvid support is limited.. it doesn't offer all the xvid features, and it's a huge app for the task that does a lot more in other areas that is not really needed, and it's mp4 output is worthless.

But that has all been said already..