View Full Version : How to write a VirtualDub.jobs file?
DVD
26th November 2002, 21:28
Hi...
i am trying to code a little programm with Delphi.
No I want to know how you write such a VDubJob-file. In fact there must be written all the settings of the DivX-Codec, which should be used by encoding...
Do you understand (sorry my englich is not so good)?
Thank You very much...
DVD
stax76
28th November 2002, 15:03
why not write the codec settings in the registry, DVX does it this way, DVX is the only tool that works with all XviD builds/versions ;)
jonny
19th December 2002, 12:52
This link should be useful:
http://www.virtualdub.org/docs/vdscript.txt
ldivx
4th January 2003, 14:02
the dificult for write a virtualdub jobs is this line.
VirtualDub.video.SetCompData(319,"GAEAABDxCAC4CwAACgAAA ....
which are encoded in nime base64.
try to decode it
modify the result for put your options, and i dont know how to set new parameters in this chaine
and transform it to base64
I give you a little vbs programme to encode and decode nimebase64
i wish, it help you(transform txt to vbs)
if anyone can help us.
In french,
La difficulté pour écrire un jobs virtualdub est que les informations du codecs sont cachés. J'éssaie depuis 2 mois mais je trouve pas la description de la chaine en binaire pour modifier les options.
je joint un programme en esperant que cela poura t'aider.
DaveEL
7th January 2003, 20:01
As your looking for delphi code ive just uploaded the code to my quick2pass xvid encoder (its out of date and wont work with the current codecs and is full of bugs and the source is a mess but it contains code for doing virtualdub.jobs files).
http://www.ecs.soton.ac.uk/~del100/q2psrc.zip
DaveEL
llemor
10th January 2003, 00:51
Here's a little VB class that encapsulates the job script creation for VirtualDub encoding. It sets DivX5 parameters into encoded compression data.
The MIME Base64 decoding/encoding is based on Jonny's algorithm, which is originally written in Perl.;)
Hope this little proggy will help you.
jonny
10th January 2003, 15:38
@ldivx:
I've downloaded essaifunc.txt
chainereferance="GAEAAAAAAADQBwAACgAAABQAAAD6AAAADAAAAAIAAAAFAAAAAgAAACgAAAAAAAAAAAAAAAAAAABkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAyAAAAAAAAAAAAAACamZmZmZnJP5qZmZmZmck/QAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAIACAADgAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOA/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAD/////AQAAAHRtcFxkaXZ4ZW5jLmxvZwBjOlx0ZXN0LmRpdngAdG1wXG12aW5mby5iaW4A"
This is basically:
-b21 0 -key 250 -log "tmp\divxenc.log" -mv "tmp\mvinfo.bin" -dr 12,2,2000,10,20 -sc 50 -pq 5
Using this reference string (it decodes to 324 bytes), as you can see, the only thing you have to change to make a base 2-pass is the bitrate and the mode (-b22) for the second pass (it's clear in the DivX5Enc source, just ignore the other settings if you want to make a very simple 2-pass); of course, you must create the "tmp" dir in the current directory of your app.
Your encoding and decoding routines seems good, but ONLY if you use this reference string.
The other reference strings
chainefirstpass="GAEAABDxCAC4CwAACgAAABQAAAD6AAAABAAAAAIAAAAFAAAAAgAAACgAAAAAAAAAAAAAAEBxLwVkAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAyAAAAAAAAAAAAAAAAAACgmZnJPwAAAKCZmck/QAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAIACAADgAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOA/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAMAAAD/////AQAAAGM6XGRpdngubG9nAGM6XHRlc3QuZGl2eABjOlxtdmluZm8uYmluAA=="
chaineseconpass="GAEAABDxCAC4CwAACgAAABQAAAD6AAAABAAAAAIAAAAFAAAAAwAAACgAAAAAAAAAAAAAAEBxLwVkAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAyAAAAAAAAAAAAAAAAAACgmZnJPwAAAKCZmck/QAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAIACAADgAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOA/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAMAAAD/////AQAAAGM6XGRpdngubG9nAGM6XHRlc3QuZGl2eABjOlxtdmluZm8uYmluAA=="
terminate with "==". "=" is a padding char and is not handled by DivX5Enc routines (it's not needed because the data length is 324 and 324 % 3 == 0), so be careful about this.
The last thing, DivX 5 Enc is licensed under GNU GENERAL PUBLIC LICENSE, so be sure to read and respect the license.
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
ldivx
10th January 2003, 17:28
thanks Jonny.
Sorry
i just use your code for know how virtualdubworks and for help anyone. but it's to more difficult for me for make a program who create virttual jobs.
jonny
10th January 2003, 18:15
No problem, the only thing needed is that you notify the code was traslated from DivX5Enc.
(hypothetically, if you release a program, at least the traslated parts must be released under GNU GPL)
To set parameters you must encode the number in binary (32 bit) and put it in the good position after encoding in mime64 (you can find positions for paremeters in D5E source)
I think you are very near to make it work :).
blue_pixel
14th January 2003, 04:46
@llemor:
Where's the VB class? No attached file? ;)
llemor
14th January 2003, 11:12
Hmm...it requires moderator approval, but already 4 days have passed since I posted it.:confused:
Anyway, pm me your e-mail address and I'll send it to you.;)
jonny
15th January 2003, 17:35
Hi llemor!
Please take a look at the latest divx5enc sources.
In VirtualDub 1.4.11 a bug regarding the mime64 encoding was solved (you can see this in the VDub change log).
So i've noticed that i was cutting out the last byte of the codec parameters (anyway this byte is always 0, it's the termination of one of the log file names).
Surely this thing have no bad effects to the encode (divx5enc had always worked well), anyway i think it's better to take into account this.
(i have modified the reference string to reflect this since divx5enc v1.07)
cu
jonny
DaveEL
15th January 2003, 18:03
Originally posted by llemor
Hmm...it requires moderator approval, but already 4 days have passed since I posted it.:confused:
Yeah the old moderator was inactive it seems so ive taken over the job. We shouldnt't have this problem again. Im checking every day for new attachments but if i miss one for more then a day or so feel free to send me an e-mail me about it (if i missed the attachment it probably means ive not visited the board so private message will do no good).
DaveEL
jonny
15th January 2003, 18:14
DaveEL, Nice to see you Mod :)
llemor
15th January 2003, 23:17
@jonny:
Thanks for the info. I'll check it out.:)
Regards,
stax76
19th January 2003, 19:36
if you want to be compatible with future XviD builds
without changing code if new settings appear, forget
about encodings strings. You can check out my code
to see how it works, it's quite simple
100% reliable to all XviD build, even future ones!
http://www.planetdvb.net/board/index.php?act=ST&f=22&t=31
'Dolemite
Beave
15th April 2003, 12:12
@ llemor
Do you know, how to integrate your DLL in a VBScript?
Or is there any EXE Program that takes a Bitrate as an Argument and a settings file to produce that MIME BASE64 code for DivX5.XX?
@Jonny
Is it possible to use DivX5Enc over the Commandline with your setting file, yet? Something like:
DivX5Enc.exe -f <Settingsfile>
jonny
15th April 2003, 12:33
Sorry Beave :(
I remember i've promised you this some time ago, but i think i'll no more work on DivX5Enc.
I'm spending my free time on Enc now (and, as you can see, i no more deal "directly" to the codec settings).
Updating DivX5Enc every time a new version of the codec is out is a long, boring work.
I prefer to concentrate my work over an application that is codec indipendent now.
Sorry again
jonny
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.