Log in

View Full Version : XviD Settings Proggy


Pages : [1] 2

Emp3r0r
28th October 2002, 23:45
I created a proggy that will read the registry for your xvid settings and then output them to either xml or html, or text based upon a stylesheet (xsl). There is no exception handling so beware.

Command Line Version : Source and EXE (http://jvance.com/files/xvidset.zip) (Warning: .NET Framework required!)

<edit> newer GUI version below </edit>

example: xvidset -o vbpost.txt -s vbforum.xsl

when pasting content of vbpost.txt into this forum results in below:
Settings for XviD (10/7/2002 9:29:49 AM) Mode: 2 Pass - 2nd pass Int., Dummy 2nd Pass: OFF, Desired Size: 734851KB, I-frame Boost: 0%, Below I-frame Distance: 10%, I-frame Bitrate Reduction: 30%, Curve Compression: Payback with Bias, Bitrate Payback Delay: 250frames, High Bitrate Scenes: 25%, Low Bitrate Scenes: 10%, Hinted Motion Estimation: OFF, Alternative Curve System: ON, Curve Aggression: High, High Distance from Average: 25%, Low Distance from Average: 10%, Automatic Minimum Relative Quality: ON, Strength: 30, Automatic Bonus Bias Calculation: ON, Motion Search Precision: 6 - Ultra, Quantization Type: MPEG Custom, FourCC Used: XVID, Max I-frame Interval: 300, Min I-frame Interval: 1, Lumimasking: ON, Interlacing: OFF, Greyscale: OFF, Max B-frames: 2, B-frames Quantizer Ratio: 200%, Packed Bitstream: OFF, DX50 B-VOP Compatibility: ON, Print debug info on each frame: OFF, Min I-frame Quantizer: 2, Max I-frame Quantizer: 31, Min P-frame Quantizer: 2, Max P-frame Quantizer: 31, Max Bitrate: 10000kbps, Max Overflow Improvement: 60%, Max Overflow Degradation: 60%, Start Credits: OFF, End Credits: 182500-184500, Encode credits in greyscale: ON, Credits I-frame Quantizer: 24, Credits P-frame Quantizer: 20,

If you make a better stylesheet (or find errors) than the vbforum.xsl that I created, please share with the rest of us. Enjoy and keep testing XviD!

Didée
29th October 2002, 09:15
Very good idea, Emp3r0r!

In fact, I had a similar idea some time ago, when I noticed I would like to keep trace of what settings I used for my past encodings, and that I'm too lazy to write or type all that stuff manually.
(But, honestly, often when I think "should I suggest this or that", I finally decide to keep quiet - most of my ideas result out of a sudden "brainstorm" and are often not useful at all, and so even some good ideas might get lost.)

However, I'm glad to see you had this idea and realized it.

Thank you!

Koepi
29th October 2002, 10:14
Emperor,

that's really a good idea!

But I've 2 proposals:

1) can you make it a GUI so it's noob friendly? We could include that into our builds then and if a problem occurs, the user just would use the startmenu shortcut, choose output format and filename/directory and gets a nice file with the settings...

2) the output as is now is really nice, but it's hard to read. Can you try making it a "simple" text-table, e.g.:

Mode: 2pass 1st pass
Dummy 1st pass: on
Dummy 2nd pass: off
Desired size: ...

and so on, so have some more lines of it's own? (like for nandub reports if you can remember them). You could condense 2 options on a line or so, but some more cr/lfs would help readability much.

Thank you for this nice program!

Regards
Koepi

Emp3r0r
29th October 2002, 21:06
@koepi: Sure, I'll go ahead and modify the XSL stylesheet to produce columns of settings. In fact, My first stylesheet did that but there are so many settings it took up lots of room. The GUI will take 5 seconds but as far as including it with XviD, that may cause too many problems because it requires XP SP1 or .NET framework (everyone got that yet?). Although, I do think it would be a valuable addition to benefit developers and users/testers (such as iago ;)).

If anyone has a vision of exactly how the output should look for here in the forum, I'll create a stylesheet for you. Show me some examples please!

Emp3r0r
1st November 2002, 20:18
Ok, I finally found 5 secs to create that GUI you asked for.

Newer Version Available (look further down)

There is a visual studio.net project included with sources if you wish to peek. Sorry for no comments.

I modified the stylesheet too. I wish others would make stylesheets because I think XSL is easy to understand. Enjoy.

example output
Settings for XviD (11/1/2002 6:13:49 AM)
Mode: 2 Pass - 1st pass
Discard 1st Pass: OFF
Motion Search Precision: 6 - Ultra
Quantization Type: MPEG
FourCC Used: XVID
Max I-frame Interval: 240, Min I-frame Interval: 1
Lumimasking: OFF
Interlacing: OFF
Greyscale: OFF
B-frames: Disabled
Min I-frame Quantizer: 2, Max I-frame Quantizer: 31
Min P-frame Quantizer: 2, Max P-frame Quantizer: 31
Max Bitrate: 10000kbps, Max Overflow Improvement: 60%, Max Overflow Degradation: 60%
Start Credits: OFF, End Credits: 186190-196155
Encode credits in greyscale: OFF
Credits I-frame Quantizer: 23, Credits P-frame Quantizer: 21

[Toff]
1st November 2002, 21:01
I must be too fast or the link is broken ;)

Emp3r0r
1st November 2002, 21:09
link fixed, sorry about that.

Emp3r0r
1st November 2002, 21:40
@Koepi and Nic: Currently I am looking in the Windows system directory for xvid.dll and getting the creation time of that file to figure out the date of the build. So I have the date but I'm still lacking who built it. Maybe another registry entry named build would fix this problem. Then we could produce the following output:

XviD Settings (Koepi's Build 11/1/2002 6:13:49 AM) or
XviD Settings (Nic's Build 11/1/2002 6:13:49 AM)

ookzDVD
2nd November 2002, 04:26
@Emp3r0r,

Thank you for your useful program, but I still can not run the program
since I don't have .Net framework installed on my machine.

I think I have to download that .NET framework from MS which its size is about ~21MB big :( That's BIG!. :(

Is that possible to port it to stand-alone .exe ?

Emp3r0r
2nd November 2002, 08:39
Yes I know it is big, but look how small the exe is. In the long run it will be more efficient but for PRE-Service Pack 1 XP machines it is not. Sorry.

ivan_alias
19th November 2002, 13:40
is the link down again?

Koepi
19th November 2002, 14:45
It should be possible to link a standalone binary like with VS98: "link MFC statically". increases binary size quite a bit (e.g. from 8kb to 200kb), but links in all necessary functions.

I hope this helps

Regards
Koepi

bond
19th November 2002, 17:49
There seems to be a problem with the hitme.aspx redirector (or whatever this thing is good for)!

You can download the files here (from the official download source but without redirection):

Source and EXE (http://jvance.com/files/xvidset.zip)
GUI Binary (http://jvance.com/files/WinXviDSet.zip)
GUI Binary and Source (http://jvance.com/files/WinXviDSetandSources.zip)

Krajensky
20th November 2002, 06:07
Actually it's not made in VC...it's made in C#. Which requires the wondrous Monster That Is Called The Framework. You have no choice but to install the framework - it's like that Windows Scripting Host, only more powerful. Yup, you read it right, the thingie that 90% of the viruses last year were written in, only it's bigger and better now :)

Krajensky

Wuntvor
20th November 2002, 14:57
Hi!
Since Emp3r0rs version demands the .NET framework, i decided to do a VB version of the settings proggy.
Its not exactly the same, it uses a .xsl file, but it only displays the result in a textbox, so you can cutnpaste.

It requeirs vb runtime and msxml20 , I think both are installed by default but im not sure.

I included the vbforum.xsl file in the package I hope you dont mind?

Anyway here is a zip with source and a small .exe

This is meant as a complement , not a competitor, if anyone likes it please use the source in anyway you like.

Regards
/Wuntvor

[Toff]
20th November 2002, 17:44
What about a simple C version without XML, but just a simple template format ?
Something like :
Mode: %MODE%
Quantizer : %QUANT%
...
(it's just an example)

Sure it's less powerfull, but it can be easily integrated in XviD.

stax76
20th November 2002, 18:58
Yes I know it is big, but look how small the exe is. In the long run it will be more efficient

you are right, DVX is only about 100 KB, if I had coded it with Delphi/VCL, it would be 10 to 20 times bigger

Emp3r0r
21st November 2002, 22:53
I included the vbforum.xsl file in the package I hope you dont mind? I don't mind at all and encourage someone to update it as I don't have time. I know the stylesheet is missing a few things such as New ModHQ from Koepi and GMC, Chroma hints and whatever else has happened in the last month but thats what makes the stylesheet so powerful because the program never needs to be updated, just the stylesheet.

[UPDATE] my trivial hit counter should be working now even though it isn't thread safe yet, sorry for the problems.
[UPDATE2] now it is thread safe so click away
[UPDATE3] seems I found the time, see below ;)

Emp3r0r
22nd November 2002, 00:06
I updated the stylesheet to correspond to Today's build. That means I added qpel, gmc, b-frame quant offset, and also updated the quant type to handle Modulated HQ. Grab the new stylesheet below:

http://www.jvance.com/files/vbforum.xsl

TIP If you want pure XML output from the program, do not give it a path to the stylesheet.

Emp3r0r
25th November 2002, 03:42
TIP You can paste the address of the stylesheet such as http://www.jvance.com/files/vbforum.xsl directly into the program rather than having to download it.

Emp3r0r
25th November 2002, 03:48
example

kilg0r3
16th March 2003, 13:29
Hi Enp3r0r,

it would be very nice of you, if could update the xsl-file. i have already made a short attempt, but failed.

Emp3r0r
17th March 2003, 05:41
Sorry I've been away and busy lately, but I'd love to do that for you... If you point my program to the address http://jvance.com/files/vbforum.xsl like explained above, it should use the new stylesheet

PS: as soon as I update and upload it ;)

Emp3r0r
17th March 2003, 06:08
testing update that should be available now

Settings for XviD (3/16/2003 6:47:38 AM)
Mode: 2 Pass - 2nd pass Int.
Dummy 2nd Pass: OFF
Desired Size: 570000KB
I-frame Boost: 0%
Below I-frame Distance: 10%
I-frame Bitrate Reduction: 20%
Curve Compression: Payback with Bias, Bitrate Payback Delay: 250frames
High Bitrate Scenes: 0%, Low Bitrate Scenes: 0%
Hinted Motion Estimation: OFF
Alternative Curve System: OFF,
Motion Search Precision: 6 - Ultra
Quantization Type: H.263
FourCC Used: XVID
VHQ Mode: 2 - Limited Search
Max I-frame Interval: 240, Min I-frame Interval: 1
Lumimasking: OFF
Interlacing: OFF
Greyscale: OFF
Quarterpel: OFF
Global Motion Compensation: OFF
Chroma Motion: ON Optimizer Enabled
Max B-frames: 1
B-frames Quantizer Ratio: 150%
B-frames Quantizer Offset: 100
Packed Bitstream: OFF
DX50 B-VOP Compatibility: ON
Print debug info on each frame: OFF
Min I-frame Quantizer: 2, Max I-frame Quantizer: 31
Min P-frame Quantizer: 2, Max P-frame Quantizer: 31
Max Bitrate: 10000kbps, Max Overflow Improvement: 60%, Max Overflow Degradation: 60%
Start Credits: OFF, End Credits: 155914-161046
Encode credits in greyscale: ON
Credits Rate Reduction: 20%,

kilg0r3
17th March 2003, 10:06
hey emp3r0r! thank you very much!

regarding the line of chroma motion, i'd say, that the chroma optimizer should not be presented as if it were related to chroma motion. (sometimes my english is simply great;))

Emp3r0r
17th March 2003, 19:22
Sorry for my ignorance with the newer XviD development features... let me know if the updated stylesheet is OK

of course, it is still available at
http://jvance.com/files/vbforum.xsl

ssjkakaroto
18th March 2003, 23:37
hi emperor it seems the new xsl does not output Max Overflow Improvement and Max Overflow Degradation
Max Bitrate: 10000kbps, Max Overflow Improvement: %, Max Overflow Degradation: %

this is a excellent program, keep up the good work :D

Emp3r0r
19th March 2003, 01:19
@ssjkakaroto: it is working fine for me with my Nic's build from 3/16/2003 6:47:38 AM, which build are you using?

ssjkakaroto
19th March 2003, 02:43
i'm using koepi's build from 2/17/2003 17:26:07

ssjkakaroto
19th March 2003, 15:01
hi emperor, it seens it was a problem with the vb version of Wuntvor, after i installed the .net framework and got your version it's showing the results correctly

kilg0r3
20th March 2003, 16:14
how does one enter something like <br> in xml?

Emp3r0r
20th March 2003, 19:44
XML is very very easy to understand. All you need to realize is that XML must have a root, and that every start tag has a matching end tag. So you can write <br> as <br></br> or even better yet <br />

kilg0r3
25th March 2003, 13:06
@Emp3r0r

Do you use a special editor for your xml files, or just a simple text editor?

Emp3r0r
25th March 2003, 19:33
I'm using Visual Studio.NET to edit my XML files. It colors the tags, and completes the tags for you. It can also auto-complete if it knows how to find a schema for the XML you are editing. Sometimes I use notepad too.

mf
25th March 2003, 19:44
Maybe this could be integrated into the forum, so that you can simply do setting1=property setting2=property etc=etc and that the forum parses it into a table with all the xvid settings :p.

Emp3r0r
1st April 2003, 00:26
Plain Text : http://jvance.com/files/text.xsl
XHTML : http://jvance.com/files/xhtml.xsl

I also uploaded a new version which addresses the buggy temporary file creation and allows easier access to the new stylesheets. You can get it below

Newer Version Available (further down)

drebel
1st April 2003, 20:10
Unhandled exception here : " SystemXmlXmlException: ';' character, hexademical value 0x3B cannot be included in a name"
Win2000SP3,.NET+SP1 :(

ssjkakaroto
2nd April 2003, 04:00
the new version doesn't seem to be able to get the builds date with any format, here's a example with the latest vbforum.xsl

previous version:
Settings for XviD (3/30/2003 9:02:45 AM)[size=1]
Mode: 2 Pass - 2nd pass Int.
.
.
.

v1.0.1185.31011
Settings for XviD ()[size=1]
Mode: 2 Pass - 2nd pass Int.
.
.
.

Emp3r0r
3rd April 2003, 23:09
Newer Version Available (further down)

Updated a few things here and there, enjoy.

@drebel: new version work better?
@ssjkakaroto: new stylesheet ok?

wotef
3rd April 2003, 23:54
this is a very nice proggy - can you add indicators for qpel + use chroma motion?

drebel
4th April 2003, 10:24
@drebel: new version work better?

...nope :(

************** Exception Text **************
System.Xml.XmlException: The ';' character, hexadecimal value 0x3B, cannot be included in a name.
at System.Xml.XmlDocument.CheckName(String name)
at System.Xml.XmlElement..ctor(XmlName name, Boolean empty, XmlDocument doc)
at System.Xml.XmlDocument.CreateElement(String prefix, String localName, String namespaceURI)
at System.Xml.XmlDocument.CreateElement(String name)
at WinXviDSet.frmMain.Refresh()
at WinXviDSet.frmMain.frmMain_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

ssjkakaroto
4th April 2003, 17:52
i'll try it as soon as i get home emperor

edit: just tested it, it's working fine now, great job emperor :D

Emp3r0r
4th April 2003, 19:13
@drebel: can you look in the registry @ HKEY_CURRENT_USER\Software\GNU\XviD and tell me if any of your keys have a ";" and if there is a key that has a semicolon can you tell me the name of that key, thanks. In the meantime I compiled a new version which watches for exceptional registry keys.

Download New WinXviDSet (1.0.1189.21851) binary (http://jvance.com/files/WinXviDSet (1.0.1189.21851).zip) (24 KB)

drebel
4th April 2003, 21:33
Thx for the new version.Works fine now(and looks great ,btw).I had a registry value 43;0 mode,5.Strange...

kilg0r3
8th April 2003, 10:51
Hi Emp3r0r

If i am not entirely mistaken, the information provided by the latest two versions is in complete. e.g. bframe offset value is not outputted.

Settings for XviD (05.04.2003 18:17:50)
Mode: 2 Pass - 1st pass
Discard 1st Pass: OFF
Motion Search Precision: 6 - Ultra
Quantization Type: MPEG
FourCC Used: XVID
Max I-frame Interval: 400, Min I-frame Interval: 1
Lumimasking: ON
Interlacing: OFF
Greyscale: OFF
Max B-frames: 3
B-frames Quantizer Ratio: 126%
Packed Bitstream: ON
DX50 B-VOP Compatibility: OFF
Print debug info on each frame: OFF
Min I-frame Quantizer: 2, Max I-frame Quantizer: 31
Min P-frame Quantizer: 2, Max P-frame Quantizer: 31
Max Bitrate: 10000kbps, Max Overflow Improvement: 60%, Max Overflow Degradation: 60%
Start Credits: OFF, End Credits: OFF,

Emp3r0r
8th April 2003, 15:15
@kilg0r3: I noticed this too and I havn't fixed it because I was hard at work on a new html stylesheet. Once I finalize this stylesheet I'll update the vbforum stylesheet with the new features. If you would like a preview, check out

http://jvance.com/files/XviDSettings.html

ps: above output is 98% complete ;)

Selur
9th April 2003, 16:22
could someone make a non-.Net version of this,.. ? :D
(sorry, I really don't like .Net)

Cu Selur

Emp3r0r
9th April 2003, 17:56
You better start liking it because it is here to stay and you shouldn't be surprised when (in time) most software is written (in any language) for the common language runtime. Get over it bud. Better yet, install the .NET framework SDK and start learning to program, it is very cool and there are thousands of examples... or don't cause it will eventually be forced upon you. :sly:

Selur
9th April 2003, 19:08
I know C# (&some other .Net stuff) and I can program with it, but that doesn't mean I have to like it ;)

Cu Selur

OBcecado
29th May 2003, 20:58
Hi, as I think this program useful is there any chance somebody update it?
There has been some new functions in XviD.

Thanks in forward.