Emp3r0r
24th November 2004, 00:38
Here is a little .NET program to setup XviD from the command line. It works by changing the settings in the registry. It currently works for all settings except for inputing custom quant matrix. I plan to add a special parameter to handle this in the future.
some examples
Set to 1st pass, turn off qpel and set stats output file:
xvidset -mode 1 -qpel 0 -stats "c:\out.pass"
Set to 2nd pass and aim for 100000kb file:
xvidset -mode 2 -desired_size 100000
Set to 2nd pass and aim for file 15% of source file:
xvidset -mode 2 @calcfrom "C:\source.m2v" @ratio 0.15
The above example uses two special parameters that xvidset.exe can currently recognize. I use it to aim for a percent reduction in size for my hdtv mpeg2 files.
The "@" is used to denote special input parameters and the "-" will map the parameter directly to the xvid registry key. If the registry key doesn't exist, it will create it (useful for zones).
Enjoy
Download Binary (3KB) (http://jvance.com/files/xvidset.zip) requires .NET Framework
port66
24th November 2004, 17:17
w0w, why dont u jus do it the normal way,. :rolleyes:
Emp3r0r
24th November 2004, 21:14
Originally posted by port66
w0w, why dont u jus do it the normal way,. :rolleyes: Er, If I must answer this. I wrote a program called process queue that I use to process my HDTV files. It allows you to queue up many processes (like virtualdub jobs) but it accepts any command line program to queue'd. It's much like a dynamic batch file that you can keep adding commands to even after you've started.
For example, everytime I have a new HDTV file to process, I just import the following commands into process queue and it adds them to the bottom of the queue. The end result is usually an 800 meg file that looks very close to the 5.5 gig original.
<!DOCTYPE memo
[
<!ENTITY folder "J:\TV\CBS\CSI New York\">
<!ENTITY base "106 Outside Man.5">
]>
<queue name="&base;">
<process name="Index">
<file>E:\Programs\DGMPG\DGIndex.exe</file>
<args>-IA=3 -FO=0 -YR=1 -TN=1 -OM=1 -AIF=[&folder;&base;.mpv] -OF=[&folder;&base;] -exit</args>
</process>
<process name="Generate Script">
<file>E:\Programs\StringFormat.exe</file>
<args>"&folder;default.avs" "&folder;&base;.avs" "&folder;&base;.d2v"</args>
</process>
<process name="Set Compression 1st Pass">
<file>E:\Programs\XvidSet.exe</file>
<args>-mode 1 -stats "&folder;&base;.pass"</args>
</process>
<process name="Compress Video 1st Pass">
<file>C:\Windows\System32\Avs2Avi.exe</file>
<args>"&folder;&base;.avs" "&folder;&base;.avi" -c XVID -w</args>
</process>
<process name="Set Compression 2nd Pass">
<file>E:\Programs\XvidSet.exe</file>
<args>-mode 2 -stats "&folder;&base;.pass" @calcfrom "&folder;&base;.mpv" @ratio 0.15</args>
</process>
<process name="Compress Video 2nd Pass">
<file>C:\Windows\System32\Avs2Avi.exe</file>
<args>"&folder;&base;.avs" "&folder;&base;.avi" -c XVID -w</args>
</process>
<process name="Mux Audio and Video">
<file>E:\Programs\Matroska\mkvmerge.exe</file>
<args>-o "&folder;&base;.mkv" --command-line-charset UTF-8 --priority lower
--display-dimensions 0:1280x720 -d 0 -A -S "&folder;&base;.avi" --language 0:eng
--sync 0:0 -a 0 -D -S "&folder;&base;.ac3" --track-order 0:0,1:0</args>
</process>
</queue>
Poutnik
10th December 2004, 19:52
Originally posted by Emp3r0r
Here is a little .NET program to setup XviD from the command line. It works by changing the settings in the registry. It currently works for all settings except for inputing custom quant matrix. I plan to add a special parameter to handle this in the future.
I do it by "regedit /s xvidsetXYZ.reg". REG file is export from HKCU/software/gnu/xvid (hope it is right),when I have set it in Xvid settings dialogs. Irrelevant settings (e.g. if I am to change just sth) can be stripped away. It works even for custom matrixes, having their code in reg file.
Emp3r0r
10th December 2004, 22:14
Originally posted by Poutnik
I do it by "regedit /s xvidsetXYZ.reg". REG file is export from HKCU/software/gnu/xvidThis command seems incomplete to me. How does regedit know to export from HKCU/software/gnu/xvid if you don't tell it?
Emp3r0r
10th December 2004, 22:20
Ok, it looks like the actual command to save is:
regedit.exe /e xvidsettings.reg HKEY_CURRENT_USER\SOFTWARE\GNU\XVID
and to load is
regedit.exe /s xvidsettings.reg
Therefore to change settings you must modify xvidsettings.reg which is not as useful as xvidset.exe IMO.
Poutnik
10th December 2004, 23:39
I need to do it just several times... Exporting was intended just as to prepare some set of templates, which I can use as they are, or modify for later use, or keep just some settings that are changed often.
Then I do importing only - lists for special scenarios,
and some short ones for changing just several setting, letting other intact.
e.g. changing custom matrix:
REGEDIT4
[HKEY_USERS\libor\SOFTWARE\GNU\XviD]
"qmatrix_intra"=hex:08,11,12,13,15,17,19,1b,11,12,13,15,17,19,1b,1c,14,15,16,\
17,18,1a,1c,1e,15,16,17,18,1a,1c,1e,20,16,17,18,1a,1c,1e,20,23,17,18,1a,1c,\
1e,20,23,26,19,1a,1c,1e,20,23,26,29,1b,1c,1e,20,23,26,29,2d
"qmatrix_inter"=hex:10,11,12,13,14,15,16,17,11,12,13,14,15,16,17,18,12,13,14,\
15,16,17,18,19,13,14,15,16,17,18,1a,1b,14,15,16,17,19,1a,1b,1c,15,16,17,18,\
1a,1b,1c,1e,16,17,18,1a,1b,1c,1e,1f,17,18,19,1b,1c,1e,1f,21
I agree to set just several things Xvidset is more convenient.
But I must have .NET and can use it. I am not a programmer. I just did what I could having standard tools :-)
I made some 1000 lines program in DOS TurboPascal 5 15 years ago..
Some residual knowledge about JS and C..
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.