Log in

View Full Version : VirtualDub Job Control question


zcsuros
27th August 2003, 08:51
Hi Everybody,

I would like to ask your help.
I deal with programming in Delphi and video processing in my freetime. I capture some movies from my TV and encode to a DivX avi file. It works perfectly with GordianKnot and VirtualDub programs, but if I have many files, it is a very boring and many-step (in VirtualDub I need to do about 20 step) task. To make easier this I write a small application in Delphi, which joins the files to one file for the VirtualDub via AVS-script. I can solve everything except one thing. Namely the creation VIRTUAL.JOBS file. In the job file is a line e.g.

VirtualDub.video.SetCompData(356,"MAEAAAAAAAADAAAAgIQeAKOb………”

My problem is that I don't know how the last sequence ("MAEAAAAAAAADAAAAgIQeAKOb………") is generated. How can I code in Delphi? I should greatly appreciate it if anybody can give a good tip or a simple and understandable sourcecode part to solve this.

I looked at the downloadable source of the GordianKnot, the VnandubJobFile.pas file, but I can't understand this. In my program the data (audio and video bitrate) have been already. I always use mp3 CBR for audio and DivX 2-pass for video with different bitrate. The part which creates the "virtualdub.jobs" file is already complete, and it starts the VirtualDub.
So I have a almost finished application, but I miss this one line from my program.

I look forward to your quick help and thank you in advance.

Bye

Zoltan

from Hungary
zcsuros@freemail.hu

DaveEL
27th August 2003, 18:17
This has been asked many many times before try the search function to come up with answers such as

http://forum.doom9.org/showthread.php?s=&threadid=56055
http://forum.doom9.org/showthread.php?s=&threadid=39077


DaveEL

zcsuros
1st September 2003, 10:11
Hi,

Thank you for help. It was good for me, but I have one more question.
As I think about it, the DivX 5 codec stores the necessary parameters anywhere when the coding is started and I encode these information with MIME64 coding.

Where can I find these stored information?

DaveEL
1st September 2003, 12:15
Originally posted by zcsuros
Hi,

Thank you for help. It was good for me, but I have one more question.
As I think about it, the DivX 5 codec stores the necessary parameters anywhere when the coding is started and I encode these information with MIME64 coding.

Where can I find these stored information?


Well like it said ever codec is different in this respect and even every version can be. You have a few options

1) Info for current versions is floating around these forums ive seen it but couldn't tell you where exactly, but a lot of searching will eventually find it.

2) Try lots of stuff and reverse engineer the results shouldn't be very hard to do just unmime the strings from vdub shove them in a file and set a hex editor on it should be able to produce the struct the for codec without too much trouble.

3) Forget about mime encoding the stuff and just change values in the registry instead if divx/xvid are not initalised with any compression data they will read the registry values.

DaveEL

jonny
1st September 2003, 14:24
Yep like Dave says if you want to go for the mime way, you have to find out the position of every parameter.

The best way is to save the settings, change one parameter, resave the settings. At this point you can find where the parameter is encoded with a simple compare (after mime-decoding of course).

If you choose this way i can post a little proggy that help you to find the parameters (let me know).

zcsuros
1st September 2003, 14:36
Hi Jonny,

Can you send me your proggy to zcsuros@freemail.hu ?

jonny
1st September 2003, 14:39
Give me only the time to return @home and find it ^^

jonny
1st September 2003, 19:36
Ok the app is here: http://jonny.leffe.dnsalias.com/doom9/codec/codec_1_00_b05.rar
A little tut here: http://jonny.leffe.dnsalias.com/doom9/codec/

Basically you can manage different codec setting files and compare one file with each other.
It's not user friendly but once you get used of it, you'll find the parameters really fast.

Some notes:
- Some parameters are float or double, so you don't see the real value in the window.
- The majority of the params are stored in dwords.
- In general the best way is to use starting set of settings (stored in a file or hardcoded your app) and change only the values you need (after this you encode it in base64 and ... bingo ^^).

And for other questions... i'm here ^^

zcsuros
2nd September 2003, 11:28
Thanks Jonny!