PDA

View Full Version : ECL Optimiser


mayhem2408
30th March 2004, 19:57
Not sure if anymore is interested in this. I have just finished writing for myself a small program to modify the REBUILDER.ECL and REBUILDER.INF files for use with jdobbs DVD-Rebuilder. It will load in the files and let you change the bitrates for different VTS parts. I'm not really explaining myself very well. As an example.
I have a movie where DVD-RB will re-encode VTS02 and VTS03.

02 (The main movie) having a total average bitrate of 2440kbits per second and
03(The Extras) having a total average bitrate of 2385kbits per second.

Using this program I am able to change the bitrates and the end result is
02 (The main movie) now has a total average bitrate of 3130kbits per second and
03(The Extras) now has a total average bitrate of 1505kbits per second.
and the total output size of all re-encoded files is still the same as at with the old bitrates.
So you can get an even better quality movie and less quality on the extras

I have giving the program a version of 0.1 alpha. It has no help files and no error checking and probably a lot of bugs. BE WARNED THIS SOFTWARE MAY NOT WORK IN ALL SITUATIONS.

I am also going to to the same thing with the REBUILDER.INF for that it will work with ReJig.

Have a look and please comment.

V0.1a First Release
V0.11a Added an option for half width
V0.12a Changed Text Boxes to dropdown box to select the VTS you want to modify and autoselects the VTS with the largest number of frames as the main movie.
V0.13a Changed from Memo to Listbox control. Improved GUI speed
V0.14a Added a DVD-RB Reduction Level box. Enter the Reduction Level reported by DVD-RB so you can now see the size in comparison to the original DVD.
V0.15a change bitrate realocation to be based on percentages instead of filesizes
V0.16a Added ;Modified line at the top of the saved ECL file so that a Modified ECL file can be easily identified
V0.17a Removed ;Modified line at the top of the saved ECL file as it caused DVD-RB to parse the file incorrectly
V0.18a Will Automatically read the .INF file to get the reduction level that DVD-RB has calculated
V0.19a Reorganised the User Interface to make reading the screen easier. Still not finished yet.
V0.20a (1/4/2004) Added the function to set the average bitrate of a VTS
V0.21a (1/4/2004) Saves the original REBUILDER.ECL file as REBUILDER.BAK
V0.30a (1/4/2004) Now handled ECL and INF files simultaneously.
Reduction= is updated in the INF file to match the Bitrates that where already updated in the ECL. So now ReJig can be used.
The ECL/INF loader now automatically reads the Reductions for each VTS. No need to enter manually.
V0.31a (2/4/2004) Added function to set a VTS to a new Percentage.
V0.32a (2/4/2004) Added Sliders for fast changing of BitRates and Percentages
V0.33a (2/4/2004) Added a function to Find the max bitrate of a VTS without
making other VTSs drop below a certin bitrate.
V0.34a (2/4/2004) Cosmetic Changes Only
V0.40a (2/4/2004) Started on the Command line interpreter
V0.41a (2/4/2004) Fixed a problem that would cause the Set_to_Max function
would cause the VTS selected to alternate between Min and Max values
if the min value was the same at the MinBitrate on the internal Calc page.
V0.42a (2/4/2004) Added Controls to lock VTS values so that they will not change.
V0.43a (3/4/2004) Some cosmetic reorganising
V0.44a (3/4/2004) Added an Edit Box for the ECL/INF Filename. If this box is
filled with a valid filename before the Load button is pressed, the
Open dialog box will not appear. If the Box does not contain a valid filename
The open dialog box will appear and put the filename in the edit box. Next
will be adding drag and drop capabilities to this edit box.
V0.45a (4/4/2004) Added a function to find the Max bitrate for a VTS without
putting other VTSs below a set percent of compression.

Changed /set_to_max commandline to /max_via_bitrate and
Addded command line option for /max_via_percent

/ecl= (Full path and FileName of ECL file)
/vts= (the VTS to perform the function of v01 v02 v03 ect)
/max_via_bitrate and /min= will find the maximum bitrate for to selected VTS
without putting other VTSs below the /min= bitrate
/max_via_percent and /min= will find the maximum bitrate for to selected VTS
without putting other VTSs below the /min= percent
/autosave will automatically save the ECL/INF files once completed.
/autoexit is automatically exit the program once completed.
/nogui does not load the GUI onscreen. It also sets /autoexit
V0.46a (5/4/2004) Started working on error checking.
Will check any bitrates that fall below a set minimum (Default 500) and
rise above a set maximum (Default 9000) and rise above 100% of the original
bitrate. Still testing and implementing the routines.
i.e. If you where to set the Bitrate for any VTS at 9000, it will automatically
set the bitrate for that VTS not letting any other VTS drop below the
set minimum.
Added a FrameCount column on the main screen so you can see easily which
VTS is the longest and most likely the main movie.
V0.47a (6/4/2004) Completely changed the internal data structure to support
Extended Floating points (20 decimal places) to increase accuracy.
Reorganised Source Code to made it easier to Follow and Increased Speed

V0.48a (7/4/2004) Rewrote the Find Max functions for Percent and Bitrate.
Now very fast and does not allow a VTS to drop below a minimum bitrare and
not above 100% of the original size.
V0.49a (8/4/2004) Changed the FrameCount to VTSLength and now shows the time in
Hours:Minutes:Second Frames instead of just a frame counter.
V0.50a (8/4/2004) Fixed a bug that was introduced a while ago when the Trackbars
and the Automatic finding of the Min and Max values for a VTS. It caused
the bitrates of the VTSs for extras to become the same instead of leaving
the percentages at the same as it is by default.
V0.51a (11/4/2004) Found a workaround to a bug in my compilers Floating point to integer conversion function. Trunc(87.3*10) = 872. Go figure. Anyway It is OK now. It did not cause any errors, only that when you first loaded the ECL/INF files, the bitrates and percentages would be out by 0.1 percent. The file sizes where still correct in the end result. Simply a cosmetic problem.
V0.52a (29/04/2004) Started working on CCE ECL Parameter modifiers. Still in very stages and many have some problems.
Found an accuracy problem what in introduced if the Apply Changes button is pressed to many times. Should have this sorted out in the next version. Added a VTS Details tab.
V0.53a (30/04/2004) Some UI changes and a few enhancements to some internal calculations.
V0.54a (30/04/2004) Some more UI changes.
V0.55a (10/05/2004) Fixed. Some Interger number where not integers. i.e. 54.9 * 10 = 549.0000000001. I am having some very strange error with truncating floating point numbers to Integers.

http://members.optusnet.com.au/jrevill/DVDRB_ECL_Optimiser_V0.55a.exe 564K
http://members.optusnet.com.au/jrevill/DVDRB_ECL_Optimiser_V0.55a.rar 228K

If you are experiencing any problems, please email your REBUILDER.ECL AND REBUILDER.INF files to the email address listed in the program.

wmansir
28th April 2004, 20:12
mayhem2408, I split this off from the main thread to give it more attention now that were in our own sub-forum. Great tool.

quantum
29th April 2004, 03:47
Yeah, no kidding. How in the heck did I not know about this? I hope the author comes back to take a bow. I think this would be the first DVD Rebuilder add on program. Fine work.

-JS-
29th April 2004, 04:10
Very. Nice. Indeed.

I will be giving this baby a try later...

mayhem2408
29th April 2004, 04:57
Thanks for the support. Didn't seem to get much of a responce to the tool before and the responce I did get was "Why bother?". If people are still interested in it, I'll keep developing it further.

quantum
29th April 2004, 05:11
Hey, there he is. Welcome back :)

Now on to some feedback :)

Is there a way to load a new ecl/inf without closing and restarting the program? I notice the "Load .ECL & .INF" button is grayed out after you load a file. Not a big deal.

On the Internal Calculations fields tab, the vts summary at the bottom, you can't adjust the column widths. Also, some of the numbers have unnecessary precision, like 500.1234565 kbytes. Personally, I'd like to see all numbers of this type without decimals and including thousand separators, example:
1,542 kbytes

lab-one
29th April 2004, 05:14
@mayhem2408

Thanks for the support. Didn't seem to get much of a responce to the tool before and the responce I did get was "Why bother?". If people are still interested in it, I'll keep developing it further.

I think it was totally lost in the moment. I have read most all of the posts since the beginning and I don't even recall seeing it. Don't take it personally, everything was quite overwhelming at that time.

Alex_Rowe
29th April 2004, 06:33
Thanks For This Great Tool! :cool:

Could you develop it further so it can change all the CCE setting after the PROCESS stage of dvd-rb, because it takes a lot of time to process again all the dvd in order to change a CCE setting, like BIAS.

Also I think itīs a good idea to let the user change the BIAS setting for each VTS according to the bitrate.

Some feautures that would be nice:

-Choose between full resolution and half resolution for specific vts/extras.
-Change the bias and quality setting for each vts (if possible with recomended presets)
-Maybe Enable ultra low vcd resolution for extras, like 352*240 and with 1000 bps bitrate...

Thanks!

quantum
29th April 2004, 18:12
Originally posted by Alex_Rowe
Some feautures that would be nice:
-Choose between full resolution and half resolution for specific vts/extras.
That appears to already be there. At the bottom of the main tab, set half_width..

mayhem2408
29th April 2004, 23:03
Originally posted by Alex_Rowe
Thanks For This Great Tool! :cool:

Could you develop it further so it can change all the CCE setting after the PROCESS stage of dvd-rb, because it takes a lot of time to process again all the dvd in order to change a CCE setting, like BIAS.

Also I think itīs a good idea to let the user change the BIAS setting for each VTS according to the bitrate.

Some feautures that would be nice:

-Choose between full resolution and half resolution for specific vts/extras.
-Change the bias and quality setting for each vts (if possible with recomended presets)
-Maybe Enable ultra low vcd resolution for extras, like 352*240 and with 1000 bps bitrate...

Thanks!

V0.52 now have a Modify CCE Encoding Parameters button where I will be adding different parameters to change.

-Choose between full resolution and half resolution for specific vts/extras.
It's now in V0.52a. Now you can set an entire VTS to Half or Full resolution. The option to change only cells that are less than a specified Bitrate is still there.

-Change the bias and quality setting for each vts (if possible with recomended presets)
I'll add an option to change it. However I don't understand what it actually does. I'll have to read up on it.

-Maybe Enable ultra low vcd resolution for extras, like 352*240 and with 1000 bps bitrate...
I don't know if this can be specified in the ECL file. If anyone knows, please let me know.

Joergen
29th April 2004, 23:12
Thanks for the great tool! I used it succesfully yesterday to drop the bitrate of some extras, and will use it often AT LEAST when I want to see what bitrates each VTS got with dynamic allocation and adjust it higher/lower if needed (sadly dvd-rb doesnt show bitrate info per VTS yet).

quantum
29th April 2004, 23:18
Is the ECL Parameter Modifier dialog deliberately transparent? :)

A minor suggestion: I had to experiment with the "set v01 bitrate to max" where others not less than.. to figure out what it does. When I figured it out, I realized it's a very nice feature.

I think the wording might be clearer this way:

"Set V01 bitrate to Max and others to 1850"

Wether or not it's exactly 1850 isn't important.

Nice job on the VTS Details tab. The summary info particularly for the VTS's at the bottom is good to have.

quantum
30th April 2004, 02:18
A very nice addition would be the ability to set the filters in CCE for each VTS.

Right now I believe these are turned off by DVD Rebuilder.

I just did The Simpsons, and it would have been nice to try the animation filter in CCE. I know the settings for CCE 2.5 are different, but I think 2.66+ are the same. You have:

low pass filter
effect restricted filter
dithered quantization
quantizer characteristics

Another benefit is you could soften the picture by decreasing the low pass filter, which allows you to lower the bitrate without having compression blocks.

wmansir
30th April 2004, 03:38
mayhem2408,

FYI, CCE 2.5 will freeze if you try to load a script with 2.66+ settings in it using EclCCE from the commandline, like DVD-RB does. 2.66+ are backwards compatible with 2.5 scripts, but newer settings might not be set properly. If your just modifying lines already present in the file it shouldn't be a problem though.

mayhem2408
30th April 2004, 07:34
Originally posted by wmansir
mayhem2408,

FYI, CCE 2.5 will freeze if you try to load a script with 2.66+ settings in it using EclCCE from the commandline, like DVD-RB does. 2.66+ are backwards compatible with 2.5 scripts, but newer settings might not be set properly. If your just modifying lines already present in the file it shouldn't be a problem though.

At this stage I simply alter Bitrate, Passes and Half_Width Values. I do not reorder any parameters in the file nor do it Add or Delete any parameters. So hopefully this will not be a problem.

mayhem2408
30th April 2004, 07:40
Originally posted by quantum
Is the ECL Parameter Modifier dialog deliberately transparent? :)

A minor suggestion: I had to experiment with the "set v01 bitrate to max" where others not less than.. to figure out what it does. When I figured it out, I realized it's a very nice feature.

I think the wording might be clearer this way:

"Set V01 bitrate to Max and others to 1850"

Wether or not it's exactly 1850 isn't important.

Nice job on the VTS Details tab. The summary info particularly for the VTS's at the bottom is good to have.

It's transparent deliberately. I'll have an option later to adjust the alpha value and be able to disable it. It's not high on my priority list though.

I've re-worded the setting as you suggested. It's easy for me to forget that while I know what a feature does, my descriptions may not be very clear.

jptheripper
3rd May 2004, 22:07
just stopping by to say kudos for a great addon tool

wmansir
3rd May 2004, 22:52
mayhem2408,

A couple of suggestions:

1. How about the ability to adjust an individual cell and lock it? This would be a good way to reduce the size of credits that are in there own cell.

2. Would it be possible to add a right click menu to the cell listings on the VTS Details page. You could have options like "View", to open the .avs in a viewer like VirtualDub or Media Player classic, and "Edit" to open the .avs file in text editor.

3. From my past experience with CCE's 'half_width' setting, the reduction method is of very low quality. Perhaps a better method would be to do what DVD-RB does now and put the resize command at the end of the .avs file and then change the 'width=' value in the .ecl (and modify the 'halfD1=' flag in Rebuilder.INF).

4. Under VTS Details, the Width column says FULL on material that DVD-RB converts to Half-D1. Is this column based on the 'half_width=' setting? It might be better to use the 'width=' setting since DVD-RB modifies that. Also, I think this column would go better on the main front page (if you think there is room) because a. You have to change whole VTS sets to half-D1, so it makes sense to present the setting as a whole VTS property and not per-cell, and b. that is where you can change VTS sets to Half-D1.

Also, I'm not sure if you are checking to make sure someone doesn't set a VTS to Half-D1 twice (once in DVD-RB, by resizing the video, and once in EclOpt, by using 'half_width'). Since the Width column says FUll on material DVD-RB has already Half-D1'd it might be an easy mistake.

mupps
5th May 2004, 01:01
very nice :) mayhem2408

just going to try it out ..

i would like to have more cce passes on the extras than the main film :)

but thank lee.

rayvt
10th May 2004, 00:32
Suggestion:
In the "Modify CCE encoding parameters", add a parameter for "set bitrate to ___ for segments smaller that ____ frames.

Hunt for Red October has 291 segments, and 276 of them are one frame. Everything is all in one VTS. DVDRB gives them bitrates anywhere from 400 to 9000. Give the bits saved proportionately to the other segments in that TS.

Joergen
10th May 2004, 01:29
Interesting. I think thats more in the dvd-rb currents bugs department if they're not true stills. It shouldnt make so many segments for the video part.

blueboyec
17th May 2004, 22:37
All the DVDs I backup are NTSC which should have 29.97 fps of but when I check the VTS details it indicated that all the VTS are 23.976 fps. This happen on all the DVDs I backup. Is this a bug?

wmansir
18th May 2004, 03:29
Originally posted by blueboyec
All the DVDs I backup are NTSC which should have 29.97 fps of but when I check the VTS details it indicated that all the VTS are 23.976 fps. This happen on all the DVDs I backup. Is this a bug?
No, this is normal. The way DVD-RB works is to convert everything to a simple 23.976fps video stream, then when rebuilding it corrects the framerate and inserts the correct video flags. This method lets it deal with Hybrid content, and eliminate the need to know the field order of interlaced material.

blueboyec
18th May 2004, 23:54
wmainsir,

Thanks for the info but still confussed? So does DVD-RB take take out ~ 6 frames and then when rebuilding it ads them back?

Ed

wmansir
19th May 2004, 01:01
No, it doesn't. An AVI file (which is what AviSynth simulates) can only have one framerate. So DVD-RB just slows down the video parts so everything is at 24fps. If you played back the video before DVD-RB corrected it (when rebuilding) it would play slightly slower than it should (you would only see 24 frames in a second, instead of 30).

Fr4nz
19th May 2004, 11:36
Wmansir could you make this topic "sticky" please?

I think this program is very interesting! :)

wmansir
19th May 2004, 12:05
I don't want to have too many stickies (and there are already several add-on tools like this). What I will do is re-write the Overview stickie and include an Add-Ons section with links to the various tools and brief descriptions.