ChiDragon
3rd February 2006, 01:02
I spent a few hours trying to find out how the heck I could set "SetCompData" in Sylia without having to initiate the XviD codec settings dialogue, and with the help of some posts on these forums and others I figured out what I needed to do, and did a few text and binary file comparisons to figure out the particular settings I needed to change. :)
The hardest part of my solution involved creating an AutoIt script that converts a given bitrate into the Base64 used in SetCompData (this is one of those times I wish I knew some C). Binary string support is only available in the beta versions of AutoIt; one of those are required if you want to use the .au3. The _ToBase64 AutoIt UDF doesn't work for binary input yet due to a limitation in AutoIt itself, so my script creates a temp binary file which a GPL command-line app simply called base64.exe reads and converts to a temp text file, which is then read back into AutoIt and then displayed in a popup text box. I figured someone else might have some use for this, so I'm attaching it. Note that base64.exe has to be in the same directory as BitrateBase64_Beta.exe for the conversion to work.
The first four Base64 letters are "AQAA" for the first pass and "AgAA" for the second pass (01 and 02 in hex, with some zeros on the end). Then comes the 4-letter/digit bitrate string mentioned above, then the rest of the options. I left some stuff commented-out in the .au3 that might be useful if you want to find the place to edit for cartoon mode and for keyframe interval, like I did (but the rest of the string after bitrate will be different than mine unless you happen to have the exact same options setup).
I'm using Koepi's build, XviD-1.1.0-30122005, and I imagine the pass and bitrate info is stored in the same place for other versions, but the additional info probably isn't correct for older and possibly future builds.
Here's the URL for the base64.exe (source is there): http://www.rtner.de/software/base64.html
The hardest part of my solution involved creating an AutoIt script that converts a given bitrate into the Base64 used in SetCompData (this is one of those times I wish I knew some C). Binary string support is only available in the beta versions of AutoIt; one of those are required if you want to use the .au3. The _ToBase64 AutoIt UDF doesn't work for binary input yet due to a limitation in AutoIt itself, so my script creates a temp binary file which a GPL command-line app simply called base64.exe reads and converts to a temp text file, which is then read back into AutoIt and then displayed in a popup text box. I figured someone else might have some use for this, so I'm attaching it. Note that base64.exe has to be in the same directory as BitrateBase64_Beta.exe for the conversion to work.
The first four Base64 letters are "AQAA" for the first pass and "AgAA" for the second pass (01 and 02 in hex, with some zeros on the end). Then comes the 4-letter/digit bitrate string mentioned above, then the rest of the options. I left some stuff commented-out in the .au3 that might be useful if you want to find the place to edit for cartoon mode and for keyframe interval, like I did (but the rest of the string after bitrate will be different than mine unless you happen to have the exact same options setup).
I'm using Koepi's build, XviD-1.1.0-30122005, and I imagine the pass and bitrate info is stored in the same place for other versions, but the additional info probably isn't correct for older and possibly future builds.
Here's the URL for the base64.exe (source is there): http://www.rtner.de/software/base64.html