Log in

View Full Version : Modification and optimization of robshot method and its possible use with DVD2SVCD


Pages : 1 2 3 [4] 5 6

tylo
15th June 2003, 12:06
Now, everyone should be happy again :):

New release v2.2.6 (edit: updated)
- Put back m-n ranges (hehe)
- Fixed that buggy "?" option: Hardcoded 1000-2500 bitrates only. Status windows will show what bitrates you get for 1-4 CDs, but says it skips when outside the range mentioned. And, yes the "?" didn't turn off the Q boundary thing.
- Made "Num CDs" selection sticky (just as a bonus for all the mess)
- Added "Delete Old RoBa Files" option (another one)

I suzpect an old dog can wag its tail again. :D

@Holomatrix: Yes, don't worry about it. Just set 2 CDs, that's ok most of the time.

http://home.no.net/tylo

DDogg
15th June 2003, 19:12
Oh baby! Very nice indeed. I can't imagine anybody that would not find this perfect now, no matter how their brain works :) It seems to have it all now. Great work, T!

arlsair
16th June 2003, 23:08
Hey Tylo, keep on development with this gorgeous tool. It`s getting and better. Thanks.

I tried the newest version 2.2.6 with CCE 2.66 via EclCCE 1.5c. I use OPV with the ? option.
After D2Sroba feed the CCE and tried to encode, I got the error from EclCCE "Sorry, only one instance of EclCCE allowed!". When I confirm the message, D2Sroba continues as normal (?). I don`t know, if it is a error of EclCCE or D2Sroba.

I choosed OPV in D2Sroba and thought, it would overrided the mode in DVD2SVCD`s encoder tab, but D2Sroba encoded in VBR. Did I miss to set something or what went wrong.

I think, you can skip some tests of the right Q, when you introduce a Q-range dependent to the framecount. When you have e.g. a movie with length of 80 min, you know, that on 2 cds it will not have a high Q, so yu can limit the range from 0-64 to 0-32. That saves one test.

Also it is a missy (for me), that the status window is fixed in upper left corner. It hides the navigation buttons of my browser. It would be great if I can move the window all over the screen and/or minimize it to the systray in the D2Sroba smilie.

Just my 2 cents ;)

P.S.: I encoded a sample with a nice explotion scene with different Q. Factors from 10 till 40. On the PC I can see a light better image in the Q10 sample, but the Q40 sample is also OK. And on the TV I can only guess, that there is a difference. Is that normal ?

tylo
17th June 2003, 11:34
I choosed OPV in D2Sroba and thought, it would overrided the mode in DVD2SVCD`s encoder tab, but D2Sroba encoded in VBR
That error was from EclCCE. When you break the application, make sure that EclCCE and DVD2SVCD really gets killed (task manager). This is also the reason why the mode was not changed in DVD2SVCD
I think, you can skip some tests of the right Q, when you introduce a Q-range dependent to the framecount. When you have e.g. a movie with length of 80 min, you know, that on 2 cds it will not have a high Q, so yu can limit the range from 0-64 to 0-32. That saves one test.
You have no guarantee for which Q you get, even on this high bitrates, although I agree that it is very likely that it will be below 32. But, where should that limit go? (80 mins movies are rare). In any case, I am thinking of changing the algorithm to utilize the linearity of the quatisation function. This will reduce the number of test from 6 to 4 in most cases.
Also it is a missy (for me), that the status window is fixed in upper left corner. It hides the navigation buttons of my browser. It would be great if I can move the window all over the screen and/or minimize it to the systray in the D2Sroba smilie.
I used this special window, which happens to be unmovable.Sorry. You just have to make your browser a little smaller when using D2Sroba. I won't promise that I'll do anything with it.

I uploaded a tweaked version 2.2.6a: fixes stickiness of Num CDs, sets default Q to 40, and limits "?" function to bitrates in 1100-2700 instead of 1000-2500 :D

r6d2
17th June 2003, 14:37
Hello Tylo,

I am using your tool to decide how many CDs to use. It is just great, thanks a lot.

I don't know how DDogg convinced you of hardcoding the max and min BR. You know it is a very bad programming habit to hardcode stuff :-)

I guess you just cannot please everybody, but perhaps a "default" safe for newbies of 1100/2700 would be good, but I think it would be much more useful to use DVD2SVCD limits in the general case. May you add and option to override the hardcoded limits with the ones specified in D2S?

I am also having difficulty resuming an encode when I do a mayor change, as the resolution. Even if I start "From the start", it crashes with an address error. I have to load the source again, and do it all over. I would like to save the audio encoding part when I change resolutions, but...

DDogg
17th June 2003, 15:23
I don't know how DDogg convinced you of hardcoding the max and min BR. You know it is a very bad programming habit to hardcode stuff :-) That is a very aggressive statement and I do not understand why you made it. I think if you reread some of the posts above you will see that in this particular case why tylo did this and why it was the right thing to do.

tylo
17th June 2003, 15:53
I have to agree with one thing that r6d2 says: using hardcoded limits is in general a bad habit. But there are many reasons why these (hardcoded) limits does not match up with those you set in DVD2SVCD. One has been mentioned earlier. Here is another one:
These limits are not stricly the ones you want to use for encoding. E.g. you may want 3 CDs even if that would give a too high bitrate, say 2700 for a full last CD. Encoding should use max 2500, thus not producing a full last CD, but that is often OK when the alternative is 2 CDs with low bitrates.
(edit1)I am also having difficulty resuming an encode when I do a mayor change, as the resolution. Even if I start "From the start", it crashes with an address error. I have to load the source again, and do it all over. I would like to save the audio encoding part when I change resolutions, but...
These problems are DVD2SVCD related, not D2Sroba - sorry.

(edit2)
I'll put in those limits in the D2Sroba.ini file (but not the GUI) in the next release.

r6d2
17th June 2003, 16:47
Originally posted by DDogg
That is a very aggressive statement and I do not understand why you made it. I think if you reread some of the posts above you will see that in this particular case why tylo did this and why it was the right thing to do.

Hey, DDogg, please do not take it personal. It was a joke, indicated by the smiley.

I have read your reasons and you indeed have a point in suggesting the default limits, but that does not change that hardcoding is a bad habit anyway.

I was just suggesting a bit more flexibility.

We cool? :cool:

tylo
18th June 2003, 08:13
Alright. Uploaded v2.2.7. Added the limits in the D2Sroba.ini file. You may edit it. See the current limits in the tooltip.
http://home.no.net/tylo/
Cheers.

ch@@boom
18th June 2003, 17:05
hi tylo
i have troubles starting your plugin

i have dvd2svcd 1.1.3.b2 and your plugin 2.2.7, tried winxp and win2k

but when i first start the plugin i get the screen with the version
-> then nothing happens (also if i try to start dvd2svcd)

when i start dvd2svcd first and have a dvd source and then starting the plugin
-> the same, nothing happens, i can see the systray icon and can pause or exit

did i miss something, or the order of installing the progs ??

help much appreciated
thx

tylo
18th June 2003, 21:02
Strange one. I have used the plugin on both XP and W2K, and never seen this. After the splash screen (about 5 secs), the GUI window should come up. Sometimes the GUI opens behind other windows that is on the desktop - so look for it! (or start with a clean desktop).
You should install D2Sroba after dvd2svcd, but that is just so that D2Sroba finds dvd2svcd - it shouldn't cause this problem.

ps: You may start D2Sroba after dvd2svcd as well, but then D2Sroba can not set the right video mode (OPV or multipass) - do it in dvd2svcd.

r6d2
19th June 2003, 08:23
Tylo,

I use your plugin to choose the number of CDs, as a "compressibility test". Then I encode with TMPGEnc. I get Q for 1-2, 2-3, depending on movie length and format, then I compare the Q values to other movies I've done to make a decision. It has been very useful. Thanks a lot.

Just 2 questions:

The log file seems to indicate that you use an estimation for the audio file size. In most cases the real size is somewhat shorter (I have measured up to 4% difference). This "lost space" would give you some more MBs for video.

When doing the RoBa you already know the real audio file size, have you thought of using it?

And the other one:

Does D2Sroba support two simultaneous instances of DVD2SVCD? (One minimized, silently working, the other one in the foreground).

Regards,

tylo
19th June 2003, 09:14
To your first question:
In some earlier versions I used the real size of the audo files. I started to compute the size instead for two reasons:

1. I thought that the difference to the real size was minor (at least in MB), just computing MB = kbps * seconds./ 1024

2. It allowed me to skip the audio convertion (breaking BeSweet) during tests, but still get correct estimates.
I'll do some testing. If you're right about the 4%, I'll either try to figure out how to compute the extra file size overhead, or go back to use the real sizes.

To your second question:
No. And I don't think DVD2SVCD is supposed to be ran that way. You must at least install two instances of DVD2SVCD (in different directories) to make it work.
(edit) Actually, its a bad idea anyway - it would lead to simultanous encoding jobs, etc. Use the batch feature instead.

r6d2
19th June 2003, 15:21
If you're right about the 4%, I'll either try to figure out how to compute the extra file size overhead, or go back to use the real sizes.

I have not tried it, but are you considering the case of 2 audio channels, different BR each? (Just in case).

And I don't think DVD2SVCD is supposed to be ran that way. You must at least install two instances of DVD2SVCD (in different directories) to make it work.

I have not heard the final word from DVD2SVCD himself, but other users have posted absolutely no problems in doing this. Some users have reported problems with CCE's inability to do multiple instances, but with TMPGEnc all reports are successful.

I have tried it myself and it has always worked so far. And I even use the same installed instance for both DVD2SVCD and TMPGEnc! :cool:

May be we could ask @DVD2SVCD for a final word.

Actually, its a bad idea anyway - it would lead to simultanous encoding jobs, etc. Use the batch feature instead.
I do it while testing resolutions, compressibility, ripping, etc. I always use "Idle" priority, so I can do other stuff.

I even burn my CDs at the same time (not when ripping, though). I don't know why this works for me. I have heard horror stories about some of these practices, but I guess it has to do with having enough RAM. Even with 2 encodes at the same time I have 162-MB available.

I usually don't leave two encodes running. However, I let them overlap if there is little time to go on one of them and I want to go to sleep :)

For these reasons, it would be great for me if D2Sroba would support this feature. I have done some tests, but D2Droba seems not to "catch" the correct DVD2SVCD instance to kill.

Regards and thanks again for a useful program.

ch@@boom
19th June 2003, 18:35
i mistyped the dvd2svcd directory .. so it was not installed in the dvd2svcd directory ..

it didn't find the dvd2svcd executable .. and the window where you can browse for it was not accessable .. (only with alt+tab)

it works now ..

tylo
19th June 2003, 19:46
I have not tried it, but are you considering the case of 2 audio channels, different BR each? (Just in case).Yepp.For these reasons, it would be great for me if D2Sroba would support this feature. I have done some tests, but D2Droba seems not to "catch" the correct DVD2SVCD instance to kill.
Sorry. I guess it is doable, but it would complicate the program a lot. Most people will cover their needs by using the batch functionality. You have quite special needs, so I'm afraid you're out of luck here. Also, dvd2svcd is so cpu-intensive, so you gain no time by doing things in parallel.

ch@@boom: Great.

r6d2
19th June 2003, 21:57
Sorry. I guess it is doable, but it would complicate the program a lot. Most people will cover their needs by using the batch functionality.

I agree with you. Your program is great even without this feature.

You have quite special needs, so I'm afraid you're out of luck here.

Story of my life. :)

Also, dvd2svcd is so cpu-intensive,

I have not noticed that, except for the beSweet part, which eats up all it can get regardless of the Idle setting. All the other processes just let me do my stuff. Even playing 3D Games (And I just have a non-overclocked Celeron 1.7).

so you gain no time by doing things in parallel.

No time gain indeed. Just flexibility. But I get the point. Other things are more common need.

Regards,

tylo
19th June 2003, 22:23
So, a last update for a little while (I hope).

- Added status_x, status_y in D2Sroba.ini, for you to edit. Place the status window where you like it. :)

@arlsair: D2Sroba now wait specifically for the all the wins to close (CCE Encode, CCE Main, D2S). Hope that helps.

@ch@@boom: Fixed that setup problem you had. The splash screen hid the MessageBox. :rolleyes:

@r6d2: You're right. Encoding requires in addition a lot of memory throughput, which may be the bottleneck, and that may leave your CPU some room. Doing two encodes at the same time, though, will together give even less speed than a single encoding, I believe. Anyway, I think we agree here. ;)

D2Sroba v2.2.8: http://home.no.net/tylo/
Cheers.

arlsair
20th June 2003, 08:11
Great, that I can now move the window. Thanks.

But I get the same EclCCE error. It happens not direct after the termination of DVD2SVCD, it happens right before D2Sroba tries to encode the first test clip. D2Sroba skips some unuseable bitrates and then find a suitable bitrate and tries to encode.So I think, there would also a little delay be great.

Sorry for the work.

tylo
20th June 2003, 09:54
@arlsair,
Interesting. Do the following:
- Open Task Manager (Ctrl+Alt+Delete)
- When DVD2SVCD starts encoding (use D2S Recover on your previous project), you should see both EclCCE and CCE in Processes Tab. Check that both disapear when D2Sroba breaks CCE.
- Try also EclCCE standalone. Open the ecl file and start encoding. Break CCE manually and see what happens.
- Please, specify Windows version.

arlsair
20th June 2003, 10:38
I`m now at university, so I can`t check these things. Also I`m this weekend away from home, I will test it ASAP.

But I can you say, that I`m using good (sometimes) old Windows 98 SE.

r6d2
21st June 2003, 14:37
Originally posted by tylo
So, a last update for a little while (I hope).

:D :D :D :D

Tylo,
Great job! Your program has convinced me of starting to look at CCE again, and encode the whole thing with your stuff instead of just doing compressibility check (you know, I am sorta TMPGEnc fun).

I have noticed that as you call CCE/EclCCE directly to do the final encode, CCE seems to run without taking into account the Idle priority setting in DVD2SVCD It this true? And if it is, can it be fixed?

I have discovered that CCE uses a lot more resources than TMPGEnc, and my systems turns unresponsive.

Thank you very much.

DDogg
21st June 2003, 16:00
without taking into account the Idle priority setting in DVD2SVCDrun cce via EclCCE and set the idle priority in the new EclCCE options added in CCE options. It will then always run with this priority.

r6d2
21st June 2003, 20:03
Originally posted by DDogg
run cce via EclCCE and set the idle priority in the new EclCCE options added in CCE options. It will then always run with this priority.
Thanks DDogg. Your workaround worked great!
Edit: just notice that I'm dummy too. Tylo had already suggested this to DDogg :)

I still however think that, being D2Sroba a DVD2SVCD "plugin", it would be more transparent to the average user to honor the D2S setting, whatever it might be at the moment.

Regards,

r6d2
22nd June 2003, 17:57
Originally posted by tylo
I'll do some testing. If you're right about the 4%, I'll either try to figure out how to compute the extra file size overhead, or go back to use the real sizes.

Tylo,

I guess you could do it even more general, taking the encoded size if available, the estimated if not. I don't know how your tests go, but I keep getting about 4% less in every case.

I am already a "converse", close to getting the perfect automatic encode thanks to these greatest tools of yours: CCE 2.66+EclCCE (RB), D2Sroba 2.2.8 (Tylo) and D2S (DVD2SVCD). I use CD size 810 and 4% sample.

Next step: go to Avisynth 2.5x and use Gerti's auto crop.

Thank you all, guys, you are really great (en)coders.

arlsair
22nd June 2003, 21:57
Originally posted by tylo
- Open Task Manager (Ctrl+Alt+Delete)
- When DVD2SVCD starts encoding (use D2S Recover on your previous project), you should see both EclCCE and CCE in Processes Tab. Check that both disapear when D2Sroba breaks CCE.
At the beginning of the estimation (D2Sroba terminates CCE and DVD2SVCD, starts CCE, input .ecl, saves .ecl, calculates the bitrate for 1 CD -> unusable, calcutes the bitrate for 2 CDs -> usable -> tries to start CCE over EclCCE. But because since the input .ecl the CCE/EclCCE is open, it start a second thread of EclCCE, which cause the error message. Then the first instance of EclCCE/CCE terminates) I get the error.

Originally posted by tylo
- Try also EclCCE standalone. Open the ecl file and start encoding. Break CCE manually and see what happens.
EclCCE starts with CCE and terminates with CCE.

Originally posted by tylo
- Please, specify Windows version.
As said, Windows 98 SE

tylo
23rd June 2003, 06:53
@r6d2, I think you are doing a common mistake, which is forgetting:
1 KB = 1024 bytes, 1MB = 1024 KB
Rightclick on the mp2 file -> Properties, and look at the 'Size:'

My last encoding: 118 mins movie, 192 kbps audio:
Calc size: 169968000 bytes
Real size: 169979904 bytes (165996 KB, 162 MB)
Difference: 11904 bytes = 0.01 MB, which is nothing.

BTW: I'm using 2% sample, 800 CD size, and get really good results. I don't think it should be neccesary to go that high on sample %.

@arlsair, thanks for the report.
I forgot to add a sleep at that particular point.
I'll upload v2.2.9 in a few minutes with this fix.

r6d2
23rd June 2003, 14:06
Originally posted by tylo
[B]@r6d2, I think you are doing a common mistake, which is forgetting:
1 KB = 1024 bytes, 1MB = 1024 KB

It was the first thing I thought. "The 2.4% mistake two times". Somebody must be making it...

But then, some encodes I have at hand:

Domestic Disturbance, 160 kbps, 1:23:28 duration.
Real Size: 100.166.400 bytes (95.5 MB)
Roba Size: - Audio size (mp2) : 104400000. bytes
Difference: 4.2% slack on the estimate.

Star Trek VI, 160 kbps, 1:47:19
Real Size: 128.791.680 bytes (122 MB)
Roba Size: - Audio size (mp2) : 134240000. bytes
Difference: 4.2% slack on the estimate.

The Roba sizes and movie durations are taken from the D2Sroba logs.

So, what's going on? Let's calculate the theoretical sizes the files should have:

Movie 1: 5.008 seg * 1000 * 160 kbps / 8 = 100.160.000 bytes
Movie 2: 6.439 seg * 1000 * 160 kbps / 8 = 128.780.000 bytes

Which happen to be very close to the real encoded sizes!

So it seems D2Sroba is increasing the file sizes! (I'm using "?" mode, just in case).


BTW: I'm using 2% sample, 800 CD size, and get really good results. I don't think it should be neccesary to go that high on sample %.

810 gives me 1 more minute per CD, about 26 kbps more for video on 2 CD encodes. You're right on the %. Very few movies requiere more that 2%.

Regards,

tylo
23rd June 2003, 15:51
It looks like a NTSC / PAL problem. 24 fps / 25 fps = 0.96 : 4% off.
I am reading the frame rate from the .d2s project file, but I guess something goes wrong. Please, post if you can confirm this is the problem. (edit) I'll look into it too.

r6d2
23rd June 2003, 16:32
Originally posted by tylo
I am reading the frame rate from the .d2s project file, but I guess something goes wrong. Please, post if you can confirm this is the problem. (edit) I'll look into it too. [/B]

Movie 1: NTSC DVD. Had to IVTC. d2s file:
fps=23.976

Movie 2: Force filmed. d2s file:
fps=23.976

Curious thing on movie 1 (if it were a wrong fps mistake):

Movie 1a
23,976 f/s
150.100 frames
6.260 s
1:44:20 duration
160 kbps
125.208.542 bytes

No even close to the roba used value.

Now taking the "corrected" fps (the original one on the DVD):

Movie 1b
29,970 f/s
150.100 frames
5.008 s
1:23:28 duration
160 kbps
100.166.834 bytes

So, it does not seem to be the problem to me. What is the formula you are using to calculate the audio size?

tylo
23rd June 2003, 17:42
Are you using frame selection? Found a bug there. Calculations does not exclude the frames that you cut away in front of the movie. This will also affect video bitrate estimations.

r6d2
23rd June 2003, 19:44
Originally posted by tylo
Are you using frame selection? Found a bug there. Calculations does not exclude the frames that you cut away in front of the movie. This will also affect video bitrate estimations.
I used to cut the credits using frame selection, and I had noticed that you don't take that into account, even though you imply you do in the docs :)

Sorry for not reporting that as a bug previously. I found a workaround (not to rip the credits chapter).

Because of this bug, I no longer use frame selection. In these two movies I quoted, I am not using frame selection. So that is not the cause. Do you need me to post any log files? Which ones?

tylo
24th June 2003, 00:04
Thanks, r6d2. I use the exact same way to compute the size, so it has to be the input data which is wrong. Check the 'Movie length' and the number of frames in the log file. I uploaded a debug executable where I print the exact input and output values used for the mp2 size calculation in the log: http://home.no.net/tylo/D2Sroba229d.exe

EDIT: Found the bug! I did an integer division on framerate:
nframes / 23 instead of: nframes / 23.976 -> your 4% :rolleyes:
(Worked fine with PAL: fps=25.0). Thanks for your help.:D

r6d2
24th June 2003, 06:49
(Tylo, I'm waiting for an encode to end to try the debug version. You told me not to use simultaneous D2Sroba instances :))

To all Quality Freaks,

Maybe you can help me (and I guess others) to find the Right Q for, let's say, "Another Quality Freak" (henceforth AQF).

According to this guide:

http://www.doom9.org/index.html?/mpg/cce-advanced.htm


The Q.factor is also very important. You will want to have a Q.factor of 9 or below (represents having 95% green parts). The lower this number the better the overall quality.


an avg. Q.factor of 9 measured in CCE is 95% good quality setting for a max=9.800, avg=2.000 encode.

That is an order of magnitude different from D2Sroba's default of 40. However, I have found some movies still giving Q=47 look pretty well on a 4:3 TV and fit on 1 CD! ("Domestic Disturbance" for instance, whose VOBs weigthted just 2.64 GB).

The CCE manual, on the other hand, suggests that Q=1~40 may be considered AQF-oriented.

I have a good TV set, but it still a 4:3. I want to make encodes which will look reasonably well when played on a 16:9 TV, and perhaps on a HDTV, both scenarios where the encoded SVCD will have to be zoomed in to fill the screen.

(Most DVD players would not recognize the anamorphic flag, so I cannot encode to use one-dimension stretching and must encode and live with two-dimension stretching).

So I'm kind of lost trying to find my personal "optimal Q" without having access to such a TV set.

In your opinion, fellows, what would be a reasonable Q for this purpose?

r6d2
24th June 2003, 08:31
Originally posted by tylo
EDIT: Found the bug! I did an integer division on framerate:
nframes / 23 instead of: nframes / 23.976 -> your 4% :rolleyes:
(Worked fine with PAL: fps=25.0). Thanks for your help.:D [/B]

Yepp! My log file said:



Debug:
- Frames: 12425 (encode_last)
- Movie length (sec): 12425 * 23.976 = 540, WRONG
- Audio bitrates 1 + 2: 224 + 0
- Audio size: (224 + 0) * 1000 * 540 / 8 = 15120000.


Guess what: 0.976/23 = 4.2%

:D

It would be nice if you can fix the frame selection bug too ;) Some movies just don't have a well authored credit chapter...

Regards,

tylo
24th June 2003, 21:09
Uploaded D2Sroba v2.3.0
- Fix: estimated 4% too large audio size for NTSC movies
http://home.no.net/tylo/

@r6d2: I don't find any bugs in the frame selection mode afterall. I think I did a fix back in v2.0.1 or something.

r6d2
25th June 2003, 03:26
Tylo,

Thank you very much for the bug fixing. I had 5 DVDs to encode waiting for it :)

I used the batch option and queued 2 movies. This is the batch file:


@ECHO OFF
@REM DVD2SVCD Batch Control

Start "2003-06-24 18:45" "C:\Archivos de programa\DVD2SVCD\Tylo\D2Sroba.exe" -batch -multipass -worst_q 30 -cd_size 815 -sample 3.0 -adjust_q 0.8
Start /WAIT C:\ARCHIV~1\DVD2SVCD\DVD2SVCD.exe -d2s:"D:\Movies\Star Trek Insurrection\Source\dvd2svcd project file.d2s" -run -exit

Start "2003-06-24 19:35" "C:\Archivos de programa\DVD2SVCD\Tylo\D2Sroba.exe" -batch -multipass -worst_q 30 -cd_size 815 -sample 3.0 -adjust_q 0.8
Start /WAIT C:\ARCHIV~1\DVD2SVCD\DVD2SVCD.exe -d2s:"D:\Movies\Blade Runner\Source\dvd2svcd project file.d2s" -run -exit


Is this supported? I supposed they would be serialized as normal...

I run the batch file and when I came back some hours later I have 2 instances of D2Sroba running. One with this error message dialog box:

Cannot find the .ecl file: D:\Movies\Blade Runner\Video\CCE_Project_file.ecl

It is expecting for me to press OK.

However, the first movie (Star Trek) did not encode. It stopped even before generating the D2Sroba_log file.

The second one (Blade Runner), in spite of the message above, is encoding as we speak.

If you can guess what did I do wrong please tell me to fix it.

Regards,

tylo
25th June 2003, 09:50
r6d2, you just found another flaw :o
The batch functionality does not work correctly! I will try to fix this as soon as I can.
I just don't have time to test all code myself, so yours and others testing and reporting is invaluable to get this tool to become perfect.
Thanks.

r6d2
26th June 2003, 06:59
Originally posted by tylo
r6d2, you just found another flaw :o

Tylo,

Maybe I got lucky and found another one :) Look at this log file from a Friends episode, IVTCed:


========================================================
D2Sroba v2.3.0 - DVD2SVCD plugin, by tylo
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-06-26 01:45:18
--------------------------------------------------------
Settings:
- CD size : 815
- Number of CD's : ?
- Worst Q. factor : ---
+ One pass VBR Robshot/Bach : 0
- Sample percentage : 2.0
- Adjust Q. : 0.8
+ Do credits bitrate tweak : 0
- Start time : 0:00:00
- Bitrate : 700
--------------------------------------------------------
- Movie length : 02:25:29 (209307 frames, 23.976 fps)
- Audio size est : 139677678. bytes (128 + 0 kbps)
- CD user data size : 848966560. = (815 - 5)*1024*1024 - 380000
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 689796245. (632 kbps)
--------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1519270168. (1392 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : #Syntax error! (Q=32, 0 kbps)
--------------------------------------------------------
- Adjust Q: (32 + 1.0 - #Syntax error! - (0.8)) = #Syntax error!
- Determined Q. : 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 3
- Target mpv size : 2348744091. (2152 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : #Syntax error! (Q=32, 0 kbps)
--------------------------------------------------------
- Adjust Q: (32 + 1.0 - #Syntax error! - (0.8)) = #Syntax error!
- Determined Q. : 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 4
- Target mpv size : 3178218014. (2912 kbps)
--------------------------------------------------------

tylo
26th June 2003, 10:02
You surely did! I thought I had fixed that one. Programming is hard (and fun)!
Fortunately, I think this is easy to correct - I'll do it ASAP.

The good news is that I have got the batch functionality to work - finally.
This time I've tested it too! :p Note that now there will only be one (long)
line for each batch convertion in the bat file. Remember also to exit
DVD2SVCD after each batch preparation (ripping done).
Thanks for you report - again.
http://home.no.net/tylo/

r6d2
26th June 2003, 23:35
Originally posted by tylo
[B]You surely did! I thought I had fixed that one. Programming is hard (and fun)!
Fortunately, I think this is easy to correct - I'll do it ASAP.

The good news is that I have got the batch functionality to work - finally.
This time I've tested it too! :p


Tylo,
No good news. It did not work again. Here is the batch file:


@REM ECHO OFF
@REM DVD2SVCD Batch Control

Start "2003-06-26 13:46" /WAIT "C:\Archivos de programa\DVD2SVCD\Tylo\D2Sroba.exe" -batch -multipass -worst_q 30 -cd_size 815 -sample 2.0 -adjust_q 0.8 Start /WAIT C:\ARCHIV~1\DVD2SVCD\DVD2SVCD.exe -d2s:"D:\Movies\JB For your eyes only\dvd2svcd project file.d2s" -run -exit


D2Sroba did not enter into action. D2S continued to encode and filled 3 CDs instead of 2, as per the bitrate tab.

The only thing I changed is that I reinstalled DVD2SVCD to go to Avisynth 2.5 and I forgot to set up the appropriate folder structure. Could it be that the cause? Maybe you are "listening" the creation of de Video\*CCE file to go to action?

Regards,

r6d2
27th June 2003, 05:08
Hi Tylo,

I tried to PM you in order not to monopolize this interesting thread, but you have PM disabled. Anyway, some of these ideas may be of interest to any user of CCE/D2S/RoBa, and by posting here we can gather the always wise opinions from Bach, DDogg and maybe DVD2SVCD himself.

D2Sroba has become, IMHO, a very interesting concept. It allows you to automate the unwritten rules of a good quality encode into a great piece of software such as DVD2SVCD, which does "the dirty work", and does it well.

But there is always room for improvement. What about these ideas?

1. D2Sroba might "cook" some data in DVD2SVCD in order to take better advantage of the CD sizes. For instance, based on the total audio BR consumption, which you know when running, you may calculate MAX (max video BR) and paste it into D2S. That way, if you change he audio BR and audiochannels in D2S, your max video BR will be adjusted accordingly and automatically by D2Sroba before calling CCE.

2. You may be able to apply some practical rules for a faster encoding. For instance, if the user selected Multipass, but the Q implies a BR > certain threshold, it will be more efficient to switch to CBR for that encode. I have read that this threshold is about 2200 or so.

You would get 1 pass (+VAF) CBR encode, with likely very good quality, and much faster that VBR multipass. Of course this threshold should be parametric, not hardcoded. :)

3. Furthermore, you may patch Max Avg. to be MAX - 120 in order to avoid the D2S warning (related question: Does CCE still crash when this difference is too low? I have never experienced that personally.)

4. Also, I think it would be better to have D2S do the encode call (as it was at the beginning, changing all "use" numbers to the D2Sroba selected CD number).

Why? Because that way programs which rely on the logfile, on SVCDinfo.txt, etc., would not find weird things like "3 CDs" when the movie actually only used up 2, or mismatched bitrates. I cannot think of current programs that use these files, but they may appear.

Also, D2S does a calculation of BR to fit the CD which takes into account special parameters such as "Scan offsets", "Sequence headers" and others, which you seem not to be taking into account.
So I think that if you keep the job of fine-calculating the exact final BR for the encode in D2S's hands, D2Sroba will be more compatible with new versions of D2S, should DVD2SVCD make adjustments on the CD structure and such.

Besides, as you already know, I think that D2Sroba is a D2S plugin, and should try to help it and not to take over :)

Well, just a bunch of ideas. I really think your program is great (wonderful when you fix all bugs :) ) and by putting more AI on it, as DDogg suggested, would make it even more interesting.

Best regards,

tylo
27th June 2003, 11:19
r6d2,
Thanks for your suggestions. I'll try to give you some of my opinions on them. Hopefully, this is not getting too spesific, so it excludes all non-die-hard D2SRoBa users. I have now enabled PM, so please use that too.

I have uploaded quite a number of releases, and there has been a number of bugs in them. I appologize, but it's the most efficient way to develope this software. To do all testing myself is just too time consuming, and also impossible because of different OS's, etc. So, thanks DDogg, r6d2, arlsair and others for your patience and effort.

Bug reports:
1. - Adjust Q: (32 + 1.0 - #Syntax error! - (0.8))
This bug was more subtle than I thought. I am not able to reproduce it, but I think it is related to the fix I did for arlsair. It appears it didn't create/read D2SRoBa_TMP.ecl properly (number of sample frames). Please try v2.3.6 - hopefully it fixes that.

2. The batch functionality: Did you run it with v2.3.4? It appears you did not (I renamed D2Sroba.exe to D2SRoBa.exe in v.2.3.4). With the latest version, the batch functionaliy works great for me.

Comments on post:2. You may be able to apply some practical rules for a faster encoding. For instance, if the user selected Multipass, but the Q implies a BR > certain threshold, it will be more efficient to switch to CBR for that encode. I have read that this threshold is about 2200 or so. You would get 1 pass (+VAF) CBR encode, with likely very good quality, and much faster that VBR multipass.
That was the main reason I started this in the first place. My idea was to automate as many as possible, decisions you would do manually in D2S. As you say, in some situations CBR is the best way to encode (using max bitrate). Your first point is also related to this. I just never got that far. BTW: I don't think CBR is so much faster than 1-pass VBR, but using 1-pass VBR, Q=1, MAX=2500 seems non-optimal compared to pure CBR 2500.
3. Furthermore, you may patch Max Avg. to be MAX - 120 in order to avoid the D2S warning (related question: Does CCE still crash when this difference is too low? I have never experienced that personally.)
Good idea. (EDITED) Misread you - rest of comment removed.
4. Also, I think it would be better to have D2S do the encode call (as it was at the beginning, changing all "use" numbers to the D2Sroba selected CD number).
Hmm, you remembered that! Yes, you point out several good reasons to switch back to the way I did it earlier. It wouldn't work with RB's Credits bitrate tweaking, though: D2S gets confused when EclCCE auto opens the Advanced settings in CCE. But, I'll think of it...

New thoughts:
Improvements on the original Bach proposal.

The reason for using binary search for Q, is that the Q function is exponential (according to Bach). However, it appears that the mpv sizes are close to (linear) propotional with Q, at least for range of Q values.
1. After two tests, it can be deterimined if Q is in the range 16-48.

2. Do a linear approximation of the target Q, based on the mpv target size and mpv sizes for the two tests (either Q={16,32} or Q={32,48}).

3. Print this guessing in the logfile. If this appears to be accurate, we can determine Q after two tests only (when Q in [16,48]) in a later version of D2SRoBa.

adge
1st July 2003, 11:48
@tylo,

I am trying out your plugin in conjunction with jsoto's miniDVD plugin (mdvdauth). Everything seems OK (you need to set the CD size manually to account for the different writing mode - I use 685MB for a 700MB CD as per jsoto's suggestion).

The only problem comes when DVD2SVCD is restarted, after encoding. mdvdauth causes an alert, because it uses "fakebbmpeg.exe" instead of the real thing. DVD2SVCD complains that the wrong bbmpeg is installed with a popup, that needs to be clicked to be cleared. D2SRoBa is not expecting this, so sits patiently doing nothing until the box is clicked. If I click it, then everything proceeds successfully.

The problem is not too inconvenient, as it comes near the end - only the IFO authoring is left, maybe another 15-25 mins. But it does prevent successful batch operation.

Is there any way for D2SRoBa to take account of this? The box is titled "Error" and says "You are using the wrong version of bbMPEG.dll. Please download the proper version from http://dvd2svcd.doom9.net". It is dismissed by a simple click of its OK box.

Alternatively, @DVD2SVCD, is this warning really needed?

Adge

tylo
1st July 2003, 12:46
I 'll do a fix for this.
Here are two other flaws in DVD2SVCD (first is similar):

1) The warning for setting OPV mode appear during running in batch mode (make it a tooltip on the OPV radio button instead!) :) D2SRoBa handles that.

2) OPV max bitrate is set to VBR average. Should be VBR max. D2SRoBa fixes that.

Byteshark
1st July 2003, 12:55
I currently have two machines Once P3-700 and a AMD-XP1800. My P3 is using 2.2.4 and i have not updated it in a while. My AMD has been having problems since and with this version See below.. I have just tried the new version.

P.s. Thank you for this plugin! It is awesome and i am sure that you can fix this bug!

D2SRoBa v2.3.8 - DVD2SVCD plugin, by tylo
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-07-01 21:21:37
--------------------------------------------------------
Settings:
- CD size : 800
- Number of CD's : auto
- Worst Q. factor : 40
+ One pass VBR Robshot/Bach : 1
- Sample percentage : 2.0
- Adjust Q. : 0.8
+ Do credits bitrate tweak : 0
- Start time : 0:00:00
- Bitrate : 1000
--------------------------------------------------------
- Movie length : 01:21:29 (122247 frames, 25 fps)
- Audio size est : 78238080. bytes (128 + 0 kbps)
- CD user data size : 833237920. = (800 - 5)*1024*1024 - 380000
- Num. sample frames : 2445
--------------------------------------------------------
Calculations:
- Estimated mpv size : # AUTOIT - Unknown function/variable! (Q=40, 0 kbps)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 0
- Target mpv size : -78238080. (-128 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : # AUTOIT - Unknown function/variable! (Q=32, 0 kbps)
--------------------------------------------------------
- Adjust Q: (32 + 1.0 - # AUTOIT - Unknown function/variable! - (0.8)) = #Syntax error!
- Determined Q. : 0
--------------------------------------------------------
Replace values in ecl file:
- opv_q_factor : 0
- opv_brate_max : 2230 ==> 2530
- vbr_brate_avg : 6000 ==> 0

tylo
1st July 2003, 15:44
OK, I'll add more logging output so it's easyer to pinpoint future problems like this.
I doesn't look like you managed to create the sample file D2SRoBa_Q40.mpv.
If I can't figure out the exact problem now, try next release, and post the log.

Byteshark
1st July 2003, 21:44
The "#Infinity somewhere!" has happened since 2.2.4 as well.

========================================================
D2SRoBa v2.3.8 - DVD2SVCD plugin, by tylo
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-07-01 22:24:10
--------------------------------------------------------
Settings:
- CD size : 800
- Number of CD's : auto
- Worst Q. factor : 40
+ One pass VBR Robshot/Bach : 1
- Sample percentage : 2.0
- Adjust Q. : 0.8
+ Do credits bitrate tweak : 0
- Start time : 0:00:00
- Bitrate : 1000
--------------------------------------------------------
- Movie length : 01:21:29 (122247 frames, 25 fps)
- Audio size est : 78238080. bytes (128 + 0 kbps)
- CD user data size : 833237920. = (800 - 5)*1024*1024 - 380000
- Num. sample frames : 2445
--------------------------------------------------------
Calculations:
- Estimated mpv size : # AUTOIT - Unknown function/variable! (Q=40, 0 kbps)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 0
- Target mpv size : -78238080. (-128 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 904919993. (Q=32, 1480 kbps)
--------------------------------------------------------
- Adjust Q: (32 + 1.0 - #Infinity somewhere! - (0.8)) = #Syntax error!
- Determined Q. : 0
--------------------------------------------------------
Replace values in ecl file:
- opv_q_factor : 0
- opv_brate_max : 2230 ==> 2530
- vbr_brate_avg : 6000 ==> 0
--------------------------------------------------------
- Encoding Movie
- 2003-07-01 22:27:52
--------------------------------------------------------
- Actual mpv file size:
01/07/2003 11:27 PM 1517932928 Encoded_Video_CCE_PAL.mpv
--------------------------------------------------------

Holomatrix
2nd July 2003, 17:55
Does anyone have a copy of Robshot's encode method? I've forgotten what was the CCE encode process and why or why not this method of encode is better than a regular multi-pass encode. Sometimes doing a CQ Q value encode would not be advisable if you are useing a very low bitrate range. (300-1000)
Thanks

Byteshark
2nd July 2003, 22:06
I've tried a re-encode using an old robshot (1.8) ans got a

Find Q for mpv file:
- Estimated mpv size : # AUTOIT - Unknown function/variable! (Q=32 / 0 kbps)
--------------------------------------------------------
- Q = (32 + 1.0 - # AUTOIT - Unknown function/variable! - 1.3) = #Syntax error!
- Selected Q factor : Q=0

So it must be my machine not a bug in your program. Any idea what could cause that? I Re-installed (winXP,DVD2SVCD, the lot!) to fix it, but still happens. :confused: