View Full Version : D2SRoBa Plugin


tylo
7th August 2003, 13:56
D2SRoBa is a DVD2SVCD plugin that mainly automates the Robshot/Bach one-pass VBR encoding method.

Download : http://home.no.net/tylo/
v2.5.0 beta2 (30. Aug 2003)

Previous messages on this plugin are in the following thread (from page 4) :
http://forum.doom9.org/showthread.php?s=&threadid=57518

Also, the following thread contains some background info :
http://forum.doom9.org/showthread.php?s=&threadid=41033
Unfortunately, the most important posts (from Bach) are gone,
which makes it harder to understand the underlying ideas.

Features : Predictable one-pass VBR encoding with CCE - fills last CD to the edge
Automatic estimation of optimal number of CD's, based on Worst Q. factor
Setting of exact number of CD's (overrides DVD2SVCD)
Setting of a range of CD's (see below)
Automatic credits bitrate tweaking - available through RB's EclCCE.
Full batch/cmd line support with "one-click" to prepare it!
Status window - tells what's going on
Fixes the OPV max bitrate flaw in DVD2SVCD
Works with CCE 2.50 and CCE 2.66+.

Please, continue the discussion on this plugin here.

I will post a status and planned new features shortly.
Cheers

telemike
7th August 2003, 14:05
Tylo-

Any chance of adding AVI2SVCD capabilities?


You're doing a great job! :)

homerjay
7th August 2003, 15:53
welcome back :) came into this quite late but love what you are doing so far as i understand it & avi2svcd support would be a great addition please

jorel
7th August 2003, 17:25
i'm late too.
welcome back tylo!

great work(as always)....thanks.

:)

tylo
7th August 2003, 20:53
Thank you all,

I have only briefly read trough all the posts, so I may have missed a few points, but the state of D2SRoBa doesn't seem too bad. Still, there are a few of things that I would like to do: [list=1] Many want higher Q's than 63. I can extend the search range to 1-127 by adding one sample test. However, this need only be done when the target bitrates is lower that a certain threshold, e.g. 1500 (I'll put that in the ini file), because you won't get that high Q's for the more normal bitrates.
Change in the '?' functionality. Go back and use limits Min Avg, and Max avg. as my original idea. If Min Avg. is not ticked on in D2S, still use the greyed out value there, but set it to a lower one (1200) during D2SRoBa setup. This will avoid the problems DDogg had using my first implementation of this. ;)
Switch to CBR when the target bitrate is higher than Max Avg. + an offset. Two cases:
A) Target bitrate in Max Avg - Max: When target bitrate is at Max Avg., it is still better to use VBR than CBR, but at some point between Max Avg and Max bitrate, we should switch to CBR. This will also fill the last CD completely.
B) Target bitate above Max: This means that Max bitrate must be used. Also switch to CBR and reduce the CD size, so that each CD will be about equal length. (thx, r6d2).
Support for AVI2SVCD. Haven't looked into this for a while, but it's hopefully not too hard.
Use D2S's bitrate calculations for multipass (bitrate credits tweaking). This requires a second termination of CCE, but replaces my own (inaccurate) bitrate calculations. (thx r6d2). [This may get lower priority. I guess cutting credits using frame selection is a more viable solution for SVCD, but OK for DVD encoding. Some folks are actually using D2SRoBa for that!]
[/list=1] Please, post additional tasks that you think should be higher prioritized, and problems that you still have. E.g. How is the batch-feature working for you?

PS : I cannot promise anything here - it's just a nice TODO list to look at when I have some spare time. Also, you folks can see what may come.
Cheers.

r6d2
7th August 2003, 21:38
Originally posted by tylo
Many want higher Q's than 63. I can extend the search range to 1-127 by adding one sample test.

Why don't just put a "Really Worst Q" :) parameter on the INI file which is the maximum of the binary search? That way anyone can suit it to its needs and requires minimum coding from your part.

Besides, a parameter like this would help people to find its worst Q faster. For instance, setting "Really Worst Q"="Worst Q", discarding by Q instead of Min/Max BRs manually defined in D2S or in the INI file.

because you won't get that high Q's for the more normal bitrates.

I've found that Qs above 60 really suck, as Bach "predicted". For instance, Q=63 gives a quantization above 10 for almost every GOP, really bad even on a TV.

Change in the '?' functionality. Go back and use limits Min Avg, and Max avg. as my original idea.

Great!

Use D2S's bitrate calculations for multipass (bitrate credits tweaking). This requires a second termination of CCE, but replaces my own (inaccurate) bitrate calculations. (thx r6d2). [This may get lower priority.]

Taerg!

(The opposite of Great :))

Also, you may take a look at a way of ending the binary search when you got the result! (I think I posted an example of going all the way to the 6 tries even when found at first try!) Perhaps some kind of threshold parameter may be used, like 1% precision.

How is the batch-feature working for you?

I PMed you on this. Not working for me.

Also, I don't know if anybody is experiencing this, but sometimes launching a different app makes believe D2Sroba that CCE has ended and DVD2SVCD resumes from Pulldown. I've got this with Ant Movie Manager (great tool) and with Plaxo (a plugin for Outlook). :confused:

I hope you had a good time. Glad to have you back.

Holomatrix
7th August 2003, 21:40
Keep up the great work :) For the past few movies I've had use a sample rate of 5% and Q adjust of 0.8 to get pretty acurate results.

DDogg
7th August 2003, 23:36
I am at at a loss why you would want to use a "grayed out" number that may not even be there in future versions. So what is broken that needs fixing? I kinda thought it was working pretty well now. I must have missed something.

As for cool and new, do you think it feasible to do a optional second pass depending on some discussed X criteria? Enabling this would have to enable VAF creation of course. (No, I have not thought this out in any detail. As you have noticed, I don't do details very well lately :)) /Add: I was actually drawn to this plugin by the name which implied to me that it did a one pass and then analyzed the vaf and redistributed the bits in some way.

r6d2
8th August 2003, 05:17
Originally posted by DDogg
As for cool and new, do you think it feasible to do a optional second pass depending on some discussed X criteria? Enabling this would have to enable VAF creation of course.

One possibility for the "X" criteria which would absolutely work is Bach's original RoBa method: 1 pass (OPV+VAF) and then Multipass VBR (1-pass). This is somehow included (unsupported) with the "Roba Visibel" INI flag (I guess the typo was done on purpose by DVD2SVCD to make it even harder to use it :))

Anyway, I did some terrific encodes with this unsupported method. It takes twice the time as an OPV, but fills the disks to the edge. I've read some reports of problems with this, but it has worked for me every time except for two ridiculously low BR encodes (1 CD) that in spite of all did not look too bad.

It does not require any manual bitrate allocation, and you "always" get the quality you want.

If DVD2SVCD is working on other stuff and won't ever support this method formally, maybe Tylo might do it. It would not be hard.

You might even improve the method by using the current binary search for a first OPV pass, and then correct with the real Q for the whole movie and obtained BR, using a simple proportion.

Then you do a second OPV with much more precision, and filling the CDs to the edge or getting really, really close (it would be a 100% sample, so to speak :)).

Any opinions?

Crackhead
8th August 2003, 12:12
first, really great tool
i use it mainly for 1cd-encodes, and it works great, only the end-file-size sometimes doesn't fill the cd to the edge, so a little manual tweaking with the settings is necessary, but that's ok!

little change i would like to see in the next release (if any further releases come;) ) is that the D2SRoba window could be minimized or at least could be moved to any position on the screen!
and if it's possible, let D2SRoba be permanently opened/working, even if D2S is minimized!

Sometimes I work with the PC while D2SRoba does his job and it's unnerving when some buttons or anything is hide behind the D2SRoba window, and I instinctively minimize all working apps which I don't need at that moment, so it did happen to me that i minimized D2S during encode...that's annyoing!:mad: :o :angry:

I hope you could implement this little changes;)

Greetz, Crackhead

Holomatrix
8th August 2003, 13:05
But you CAN move it to any part of the screen in a round about way :) In the D2Sroba.ini change the values of status_x=320 status_y=0 to whatever position you want on the screen. Or even put in minus values or a too high of a value then you could only see a little smiggin of the window on the screen if you wanted to :)

tylo
8th August 2003, 13:39
@r6d2: The "Really Worst Q" must be a power of two, because we search in integer space. Only 64 and 128 are then realistic numbers (32 if you are a real quality freak). I'll add an entry: power_of_2_max_q=64 (default) in the ini file, but as many noted, normally you'll get terrible results with higher Q's.

Regarding "early stopping of the binary search", I think its a good idea to use a threshold parameter, like you suggested. I'll add it to my list.

@DDogg: We had a fight over the "?" before :p, so I won't touch it now. There are some room for improvements here so I'll come back to it, but there are more important things...

On your second point, if I get you right, RB may be the guy you should ask. Is what you want something similar to the functionality that he did with the credit bitrate tweaking in EclCCE? There he lowers the bitrate from a certain time, and raises the bitrate before that, so it equals up. What he needs to do is to modify that method, to do more advanced bitrate changes... I could always make the interface to kick it off during DVD2SVCD (as with the credits tweaking). Actually, I may be off topic here.

@Crackhead: Thanks for reminding me on the minimize problem. I had planned to fix it, but it went away during vacation.

r6d2
8th August 2003, 13:51
Originally posted by tylo
[B]@r6d2: The "Really Worst Q" must be a power of two, because we search in integer space.
Not necessarily, you can do a binary search on any ordered set you want, integer or real, positive or negative, with or without power of two limits.

On an integer space, you just have to make a choice whether you'll round or truncate (I'd rather round), but the binary search always will find its target, no matter what.

homerjay
8th August 2003, 13:57
:confused: i love it when it gets tech in here lol :p

tylo
8th August 2003, 14:52
On an integer space, you just have to make a choice whether you'll round or truncate ... but the binary search always will find its target
You're absolutely right, silly me (actually, Bach gave me that idea - yeah, blame it on him :p).

DDogg
8th August 2003, 15:54
One possibility for the "X" criteria which would absolutely work is Bach's original RoBa method: 1 pass (OPV+VAF) and then Multipass VBR (1-pass). This is somehow included (unsupported) with the "Roba Visibel" INI flag (I guess the typo was done on purpose by DVD2SVCD to make it even harder to use it )

Exactly, however I was inactive when that whole thing came up and I never came up to speed. I have a couple of questions.

1> Should not the first vbr pass use the full min max bitrate as tylo does instead of min and projected as D2S does now?
2> The next and susequent multipasses should use the min and projected bitrate. Correct?

I think dvd2svcd would take a second look at this section of his code if he could get good feedback and an exact set of instructions on what that special mode should do step by step. He has way too much on his head at the minute to do all the research and go back to that old thread. I elect r6d2, anybody second that? :-)

\Edit
From the long thread (I am having trouble understanding this. Hey, remember I am just a tool user):
- run CCE 1passVBR, Q.factor = 30 (or 40), min = 0, max = 2500, bias = 10, and the other settings as usual;
- Calculate the average bitrate (avb_1pass) of the mpv file created by CCE, in accordance with the equation of item 4;
- Calculate the average bitrate that should be used to fill 1CD (avb1), 2CDs (avb2), 3CDs (avb3), or 4CDs (avb4):
-If ((avb_1pass - avb1)/avb1) < 0,1, then avb_1pass = avb1;
-Else if ((avb_1pass - avb2)/avb2) < 0,1, then avb_1pass = avb2;
-Else if ((avb_1pass. avb3)/avb3) < 0,1, then avb_1pass = avb3;
-Else avb_1pass = avb4.
- Execute multipass, 1, 2 or 3 passes, using min = 0, max = 2500, avr = avb_1pass, bias=10, and the remain settings as the previous one. Note that this multipass will re-use the vaf file created in the 1passVBR. So, the first pass of this multipass is NOT the vaf creation. It is the mpv creation.

r6d2
8th August 2003, 17:41
Originally posted by DDogg
1> Should not the first vbr pass use the full min max bitrate as tylo does instead of min and projected as D2S does now?

By first VBR pass you mean OPV, right? That's what the method is about. And actually, in RoBa D2S uses Min and Max as specified on the Bitrate tab (as it should).

2> The next and susequent multipasses should use the min and projected bitrate. Correct?

Wrong again. It must keep on using Min and Max, and it actually does, as expected.

Come on, DDogg, you should really trust more on DVD2SVCD's abilities as a programmer :)


I think dvd2svcd would take a second look at this section of his code if he could get good feedback and an exact set of instructions on what that special mode should do step by step.

That would be great, but I think it's quite OK as it is. You have to do some template tweaking if you're using RB's templates (enable the use of the VAF), but that's all I think.

It would be great if DVD2SVCD decides to support this, since it is definitely the best of both worlds: Quality you want and filled CDs, with the minimum time required to achieve those two objectives.

Holomatrix
8th August 2003, 17:42
I posted a question/mis-understanding in the other thread but maybe it could go here in regards for how the '?' amount of CD's should work or if what I'm suggesting is even feasible.

I had a discussion a little while back which I can't remember right now (memory is going weary) about what I thought the '?' in D2Sroba meant, I was under the impression that the '?' in amount of CD's would allow me, or D2Sroba tell me that "I have determined that your movie will fit on 1 CD at a Q of 63 or 2 CD's at a Q of 50, What do you want to choose?" then encode at that, or automatically pick 2 CD's if the determined Q is higher that your picked worst Q. If determined Q is worse than my worst Q then I wouldn't mind D2Sroba automatically doing more passes to determine the Q for 2 CD's. Does that make sense?

DDogg
8th August 2003, 17:54
By first VBR pass you mean OPV, right? That's what the method is about. And actually, in RoBa D2S uses Min and Max as specified on the Bitrate tab (as it should). Oh, I see what you mean. In regular 1pass vbr d2s uses min and predicted, which IMO, is incorrect. I think you are saying in that special mode, which I just figured out how to turn on, it does not. OK, I'll check that. Remember, I was away during all of this. Plus, with MAF, it may well bake up an entirely new cake.

This may be entirely wrong, but what I am going to try is letting dsroba does its thing with vaf turned on. Then try a multipass on top on that. May that will not work, but I think a lot of the problems mentioned in the old thread were from 2.50 crc errors and such. Maybe with the newer version it may be worth a shot. Sometimes, NOT reading old information may keep one from getting preconceived notions.

r6d2
8th August 2003, 19:11
Originally posted by DDogg
Oh, I see what you mean. In regular 1pass vbr d2s uses min and predicted, which IMO, is incorrect.

It is incorrect with what we know now, but according to Bach, it was your very own discovery of low Q findings using Max=Predicted what lead DVD2SVCD implement it that way, which turned actually being sort of equivalent to CBR :)

I think you are saying in that special mode, which I just figured out how to turn on, it does not. OK, I'll check that. [...] This may be entirely wrong, but what I am going to try is letting dsroba does its thing with vaf turned on. Then try a multipass on top on that.

@DDogg, This is exactly what the internal RoBa does, no need to do it manually!

May that will not work.

Chances are it will, give it a shot. :)

If you're using RB's templates maybe VAF activation in DVD2SVCD won't be enough. I remember having to enable "Use existing" on a special Progressive-RoBa template.

DDogg
8th August 2003, 19:40
It is incorrect with what we know now, but according to Bach, it was your very own discovery of low Q findings using Max=Predicted what lead DVD2SVCD implement it that way, which turned actually being sort of equivalent to CBR Yeah, but the problem is I don't remember that being so, but d2s and I used to be in constant touch via IM back then, so maybe that came out of some of those chats.

Yep, I am trying the internal robshot-bach special mode with the semi-auto MAF as we speak. Frankly, if it works, this is what I was looking for. A easy "tool-users" approach to robshot-Bach, and yes it is embarrassing that I am just getting around to it now. More so because I didn't even know it was in there. :o :eek: :o I thought it had been a temporary measure that had been abandoned and stripped out of the code as a failed test.

I can see a problem already in that the first pass after the vbr pass is creating a VAF. So, do you have a link to whatever special template you were speaking of?

r6d2
8th August 2003, 20:17
Originally posted by DDogg
I thought it had been a temporary measure that had been abandoned and stripped out of the code as a failed test.

I guess you're somewhat right, that's the feeling Bach itself left on that thread. But gee, the code is still there!

I can see a problem already in that the first pass after the vbr pass is creating a VAF. So, do you have a link to whatever special template you were speaking of?
This is why I had to set "Use Existing" in the template. Come on, DDogg, read before posting! :D:D:D

Anyway, don't abort your encode. It will work anyway, just with one more pass than strictly needed. This virtual second VAF pass is the same as if you would have guessed at first the number of CDs, and the next VBR pass will do the actual encode.

tylo
8th August 2003, 20:31
r2d6, I too think all this stuff is pretty hard, so be fair. E.g. the template for the second pass must have create_new_vaf=1, which means that CCE should use the existing one, and does not mean it should create a new vaf, as you would think. Makes my head spin.

DDogg
8th August 2003, 20:43
Ok, see if I got it. I had thought that smack talkin' R6D2 :) was speaking of the EclCCE.ini. I see now that he actually meant the particular CCE template I was using. Ok, now, Tylo, you are saying the EclCCE.ini should also have create_new_vaf=1. Alrighty then? Is there any other freaking secret settings or handshakes to get this secret society operating?

/add: Looks like that is working. You know if I get this working I am going to do a write up so the average Joe Dokes tool-user does not have to go through this crap :devil:

r6d2
8th August 2003, 20:59
Originally posted by tylo
r2d6, I too think all this stuff is pretty hard, so be fair.

Sorry, DDogg, just in case it bothered you, I did not mean to be rude, hence the grins. And BTW, I don't think this stuff is a summer camp either.

E.g. the template for the second pass must have create_new_vaf=1, which means that CCE should use the existing one, and does not mean it should create a new vaf, as you would think (Grr, RB). Makes my head spin.

I think this is a CCE "feature", ill named parameter. IMHO nothing to do with RB's templates.

Maybe the programmer is using negative logic :)

tylo
8th August 2003, 21:01
Sorry, I guess I just added more confusion. When you set the 'Use existing file' (vaf), and you save it as a CCE template or an ecl file, that will have an entry "create_new_vaf=1", (if you should look at it - you dont need to). So, don't touch EclCCE.ini. Otherwise, I think you are all set.

/Edit: It's going too fast. This thread will be 15 pages in no time.:eek: .:D

r6d2
8th August 2003, 21:08
Originally posted by tylo
Sorry, I guess I just added more confusion.
Just open CCE, select RB's Progressive template, save it under a new name (i.e. Progressive RoBa) and select "Use Existing" instead of "Create new file". Replace your new template with this one and select it in DVD2SVCD.

DDogg
8th August 2003, 22:54
"just in case it bothered you"
@r6d2, now I thought you already "knew" me better than that. I'm pretty dumb so my skin is thick as a bullsdogs. :) Btw, the last instruction is precise and cystal clear. I'll steal it if I do a "how to join the secret freaking society of automated robshot-bach using dvd2svcd for dysfunctional dummies and ddoggs" :)

As for your "Wrong again. It must keep on using Min and Max, and it actually does, as expected." That may confuse people. Of course it uses the same min and max, but it uses the predicted as the average because it is in multipass mode. That is the whole point of the conversation. Comeon, you know that :) Had to throw that in.

@Tylo, I just realized I pulled this thread off way topic. Sorry man. I know you were trying to get a clean thread. Maybe I can get a mod to move some of this stuff back to the robshot-bach thread.

Holomatrix
8th August 2003, 23:02
Originally posted by r6d2
Just open CCE, select RB's Progressive template, save it under a new name (i.e. Progressive RoBa) and select "Use Existing" instead of "Create new file". Replace your new template with this one and select it in DVD2SVCD.
Ok, just so that more people (newbies) don't get confused, you ONLY make that ONE change to the CCE template ("Use Existing" ) ONLY if you want to try the RoBa MultiPass VBR option in DVD2SVCD and not be using this plugin, right?

r6d2
8th August 2003, 23:31
Originally posted by DDogg
[B]"just in case it bothered you"
@r6d2, now I thought you already "knew" me better than that. I'm pretty dumb so my skin is thick as a bullsdogs. :)

You never know when an addict is high on crack so better safe that sorry :)

because it is in multipass mode. That is the whole point of the conversation. Comeon, you know that :)
Actually, I had not the slightest idea.

:D:D:D
to move some of this stuff back to the robshot-bach thread.
Maybe a better idea would be to split this thread on a user's one and a developing one. So, we may deliver cooked guides to the uninitiated and still fell free to ramble about new ideas. Sort of the AviSynth Usage/Development forums, but on a thread level.

Besides that, I still think the "pure" 2 pass RoBa method belongs in here and may be optimized by Tylo (remember it's the same idea with 100% sample size :)) DVD2SVCD's silence on this matter and Clixo's posting in other thread makes me think he is quite busy indeed.

What do you guys think?

DDogg
8th August 2003, 23:49
"(remember it's the same idea with 100% sample size )"

1> Expand and expound please: By that, do you mean the vbr run, in this case done by Tylo's plugin, has the Q calculated to approximate an equal bitrate to the bitrate that will be used in the multipass runs? Why is that better than an empirical Q of X (like say 50) for the first run?

2> [clarified] And for the purposes of further conversation, Why would a 100% one pass vbr pass with VAF followed by one multipass run using the proper calciulated bitrate be any better than a 1 or 2 pass standard multipass which would be a VAF run and 1 or 2 standard multipass passes? (That was hard to say)

Oh, d2s is way stressed right now with beta testing, work and probably me bugging him about last minute additions. I am sure he will get around to this when he gets some air.

r6d2
9th August 2003, 01:04
Originally posted by DDogg
"(remember it's the same idea with 100% sample size )"

Expand and expound please: By that, do you mean the vbr run, in this case done by Tylo's plugin, has the Q calculated to approximate an equal bitrate to the bitrate that will be used in the multipass runs? Why is that better than an empirical Q of X (like say 50) for the first run?
I don't quite understand you question but let me elaborate more on the matter to see if I make myself clear.

RoBa_method_explained_by_a_lesser_creature_mode ON

RoBa consists originally on 2 full passes (at least). The first one is an OPV with the Q you want, based on that all movies with the same Q have the exact same quality (I cannot elaborate on the basis on this assumption, they are above my knowledge, but let's grant Bach this one.)

On this OPV pass you get the VAF file, as well as the exact BR the movie needs to get the selected Q.

Based on this BR, you set aside 10% for audio and estimate how many CDs are needed to make it fit with at least that Q.

Here is the second important Bach's assumption: the VAF can be reused since you did not change any of the things the CCE manual says you shouldn't.

Then you go for the second pass, using Multipass VBR (Bach did not define N), and using the VAF you got before.

RoBa_hoping_to_be_understood_by_other_lesser_creatures_mode OFF

So, the first pass is like if you did a 100% sample with Tylo's plugin in Multipass mode, knowing previously the number of CDs you needed.

Just a glitch the method has: It's not convenient to reuse the VAF if the BR has changed "heavily". According to the CCE manual (I happen to love the RTFM acronym), heavily is when outside a safe zone defined by: [50% BR, 200% BR], in other words, when dividing by more than 2 or multiplying by more than 2.

But moving around the borders of this vicinity is dangerous. The manual says, OK, but what happens on the borders? Border conditions usually break up programs. And the manual quotes this talking about Multipass: "if the setting of the BR is a major change, however, it is better to recreate the VAF because better encoding result can be obtained with less number of passes". I think they assume you are doing at least 2.

But IMHO, 1 more VBR pass is long enough!, because since you already have all the needed BR for the quality you expect, more that 1 pass is superfluous. N-pass cannot build more BR from nowhere, that's what there is and no more, and by definition, since it is the Q you used which defined it, there is no reason for it not to be enough!

And the glith DVD2SVCD's current RoBa has is a border case: it may indeed happen.

Suppose you have a 16:9 movie around 90 minutes, every guide will say: use 2 CDs! don't go below 1600 kpbs on video! However, thanks to this mode, you dare to try a mid-range Q, and you find out that it would fit on 1 CD, with a ridiculously low BR, or in 2, with double the BR. i.e., you are at a border condition.

By just a bunch of bytes DVD2SVCD may decide to use 2 CDs, and then the VAF may not be too useful for just 1 more pass. In this case it is recommended to recreate it, or keep the 1 CD encode.

Tylo implemented a soft way to deal with this cases: the Min and Max BRs on the INI file. They tell D2Sroba don't use stupid BRs, which we have found not to be so stupid after all if you know what you're doing and have the appropriate filters set up.

So, where does the "Really Worst Q" come in? The really worst Q is the absolute Q you don't want to tresspass (or even try!). It's the high limit for your encodes. The "simple" Worst Q is likely to be something like 30, but your Really Worst Q eliminates the need for the soft limits, again, if you know what you're doing.

The decision is always made on a quality basis and not on magic numbers.

There's another option I insinuated previously: go for a second corrected OPV instead of VBR 1 pass! But my fingers are in pain and your eyes too. Some other time.

Sorry about the rant guys, I only hope this is clearer now. And @DDogg, please don't ever ask me to expand and expound again :)

DDogg
9th August 2003, 02:57
Hmm, I am still going for simple and stupid.

Let's assume one uses Tylo's plug-in to get the predicted Q. Lets say it is 47 for conversations sake. Now we plug 47 into d2s for 1-pass vbr and set N passes for dvd2svcds RoBa Multipass VBR Mode. That should be all it takes to get the best encode you can under the circumstance of low BR. Would you agree it is just this simple?

As an example, I just finished a dvd2svcd RoBa Multipass VBR Mode encode. I plugged in a q of 50 because I knew that was reasonably close to Tylo's predicted and used 2616 as max and 200 as min as I was using 128 audio. I set dvd2svcds RoBa Multipass VBR Mode for only 1 pass. So it only did 2 passes.
1> A 1pass vbr @Q50 which also created the VAF
2> Standard vbr pass which used 2616 950 200

The size was a perfect and exact 1 80 min CD as I had set all my bitrate slots to 1. Quality was very good given the ridiculous BR of 950 (approx 144 min progressive source). I used the semi-auto/MAF. Only a trained eye would have noticed the artifacts on textured walls and such although the viewing was just on a 32in standard 12 year old JVC TV. I think this was a tough encode because it was 4:3 full screen and do remember I only used 1 pass in dvd2svcds RoBa Multipass VBR Mode. I am encouraged to pursue this.

Note: I used CCE 2.67.00.11 BTW, I had previously done the same encode with ProCoder 2 pass vbr mastering mode. It is awesome at low bitrates. The CCE encode described above equaled or exceeded it in quality.

Update: I have tried subsequent attempts using the dvd2svcd RoBa Multipass VBR Mode and have not been able to get it to work. The first one pass vbr run goes fine, but at the start of the second pass, dvd2svcd seems to get into some type of endless loop. It brings up CCE, but the log file just continuously scrolls and CCE is never loaded. I'll try to figure out what is happening.

Holomatrix
9th August 2003, 15:12
I had the same thing happen "It brings up CCE, but the log file just continuously scrolls and CCE is never loaded. I'll try to figure out what is happening." I'll see if I can find out what I did again. I think I just changed Tabs before the encode started and didn't leave it on the log Tab.

Edit: yep, the only changes I made was not leaving DVD2SVCD on the log tab (changed it to the conversion tab after start) and changed the Q to 20 (not 5)) try a chapter and let me know.

homerjay
9th August 2003, 15:24
@DDogg please start a new thread when you have worked all this out a dummies guide to d2sroba if you will including links or paste ins of any .ini file scripts used etc.

i have been trying to keep up with this but it has gotten out of hand very quickly and without wanting to offend any of the great minds at work in here your thread above is the first i have understood since tylos initial explanation of the tool :p

r6d2
9th August 2003, 15:55
Originally posted by DDogg
Let's assume one uses Tylo's plug-in to get the predicted Q. Lets say it is 47 for conversations sake. Now we plug 47 into d2s for 1-pass vbr and set N passes for dvd2svcds RoBa Multipass VBR Mode. That should be all it takes to get the best encode you can under the circumstance of low BR. Would you agree it is just this simple?

Yes indeed. And not only in low BR cases. Anytime you find a Q and use it to to build a VAF to use with Multipass VBR. This sort of works like this today with Tylo's plugin setting Multipass Mode.

However, in this approach we are replacing the first VAF creation pass of a normal Multipass encode by a manual OPV, which will generate 2 files (the VAF and the MPV), but we only use one. This is probably slower than letting CCE just build the VAF as it normally does.

What you're doing is nothing more and nothing less than a 100% sample size Q search :), so we are perfectly tuned, simple and stupid:
Originally posted by r6d2
So, the first pass [of RoBa original method] is like if you did a 100% sample with Tylo's plugin in Multipass mode, knowing previously the number of CDs you needed.

See?
Originally posted by DDogg
I only used 1 pass in dvd2svcds RoBa Multipass VBR Mode. I am encouraged to pursue this.

That's my whole point. No need for more. You got the BR you need for your Q and 1 pass is enough.

The concept behind Bach's original version of RoBa is that you don't tune the D2S Q.factor for every movie, you set it to your personal taste (remember assumption 1) and then keep on using it.

Using Tylo's plugin to find the Q previously helps to avoid the border case mentioned on my previous post, which is very good. So this is just the perfection the current D2S implementation needs!

r6d2
9th August 2003, 16:03
Originally posted by Holomatrix
Ok, just so that more people (newbies) don't get confused, you ONLY make that ONE change to the CCE template ("Use Existing" ) ONLY if you want to try the RoBa MultiPass VBR option in DVD2SVCD and not be using this plugin, right?
Yup. No need to do template tweaking if not using internal RoBa.

DDogg
9th August 2003, 16:12
Ok then, now it sounds like my job is to try to get D2s (him) to look at the error that is happening in the auto RoBa method. Frankly I kinda of think it might be a simple thing. Maybe Tylo will add this functionality. This whole topic is not exactly at the forefront of Dvd2svcd's efforts at the moment as he is concentrating on the DVD2DVD stuff. However, the RoBa method, copled with DVD creation would really get peoples attention. It is an obvious natural.

[off topic rant on]
Who knows, maybe somevody might actually donate a few bucks to the guy. It really pisses me off, he works so damn hard on this stuff and then gets sooooo screwed by people. Hey, isn't this stuff worth at least 10, 15, or 25 bucks for goodness sake![/rant off - sorry]

r6d2
9th August 2003, 17:22
Originally posted by DDogg
However, the RoBa method, copled with DVD creation would really get peoples attention. It is an obvious natural.

Yes indeed.


Hey, isn't this stuff worth at least 10, 15, or 25 bucks for goodness sake!
Certainly it is! I hope he maintains his Amazon wish list current for when the new version is released. I think most people find that a more trusted way to transfer money.

And if I were him, would make it shareware at a reasonable amount like those you suggested. All new features might be enabled only after doing your contribution.

BTW, the link to the Tylo/Roba method in www.dvd2svcd.org is not working for me, requires admin access. Maybe it's like that since the Bach post deletion.

I don't know if he is reading frequently, but you have direct line with him. Please give him my suggestions, obviously only if you support them.

r6d2
9th August 2003, 21:50
Originally posted by tylo
How is the batch-feature working for you?
Hi Tylo,

This is the batch generated for 1 movie:

@ECHO OFF
@REM DVD2SVCD Batch Control

Start "2003-08-09 16:19" /WAIT "C:\Archivos de programa\DVD2SVCD\Tylo\D2Sroba.exe" -batch -opv_roba -num_cds 1 -cd_size 800 -sample 2.0 -gops 1 -adjust_q 0.8 Start /WAIT C:\ARCHIV~1\DVD2SVCD\DVD2SVCD.exe -d2s:"H:\Volver al Futuro\Source\dvd2svcd project file.d2s" -run -exit

When run, D2Sroba starts, D2S starts, and then D2Sroba shuts itself down.

DDogg
11th August 2003, 07:03
Tylo, how would one script a specific number of randomized frames from a source? Let's say I always wanted to sample 100,000 randomized frames from a source no matter if it was 90 minutes long or 2 hours long. Do you know an easy way to do that?

tylo
11th August 2003, 07:59
In between all discussion, I've added a new version: D2SRoBa v2.4.6
A number of small, but very nice fixes and enhancements there:

- In v2.4.4, the Adjust Q had a bug that could rarely yield a wrong determined Q, by one - fixed now.
- You may minimize D2S now. If D2S is closed before convertion, D2SRoBa must be closed from icon in tray (right click).
- Two different ways to expand Q search range:
1. If target Q > 48, it automatically expand the search up to Q=112.
It uses up to eight sample test, otherwise as normal (six).
2. You can specify: really_worst_q. Setting that to e.g. 128,
it will then always use (up to) seven sample tests. (2^7=128)
- The smart q search algo (from 2.4.4) skips intermediate sample tests, based on how close test sizes are from their target size.

http://home.no.net/tylo/

@DDogg: A somewhat strange request(?) 100.000 frames is about 65-70 minutes. I guess you can compute the Sample %, in order to get that. Have to think about that formula, though. Is it likely to be a common need?

@r6d2: I think the batch feature should work for you now. Also those syntax messages should be gone.

telemike
11th August 2003, 13:49
Stupid question:

I still don't understand how the "Adjust Q" factor works....

Do you adjust the number up or down to make the file size smaller?

Thanks :scared:

r6d2
11th August 2003, 13:57
Originally posted by tylo
- The smart q search algo (from 2.4.4) skips intermediate sample tests, based on how close test sizes are from their target size.

Thanks, Tylo! I'll try it ASAP. Is there a threshold parameter on the INI?

@DDogg: A somewhat strange request(?) 100.000 frames is about 65-70 minutes. I guess you can compute the Sample %, in order to get that. Have to think about that formula, though.
Why not just SelectRangeEvery(<TotalFrames>/<SampleSize>,1)?

PD: Time to update the docs then :)

r6d2
11th August 2003, 14:00
Originally posted by telemike
I still don't understand how the "Adjust Q" factor works....

Do you adjust the number up or down to make the file size smaller?
Look at the log and you'll get it. Here is an example:

- Adjust Q : (53 + 1.0 - 0.838344334415145 - (0.8)) = 52.3616556655849

The value is substracted from the obtained Q, so it increases file size.

tylo
11th August 2003, 14:31
Adjust Q: Adjust the Q.factor down by the (positive) amount given. When the adjusted down, the encoded file increases.

Here is a deeper explaination:
Example: Adjust Q=0.8. D2SRoBa finds initially Q=35.
That means that the target Q (if it was possible to use real numbers) should ideally be between 34 and 35 somewhere. Now, D2SRoBa weights how close the ideal Q is to 35. If the ideal Q is close to 35, the weight is near 1.0, and if it is close to 34, the weight near to 0.0.

It then computes the NewQ = Q + weight - adjustQ.
(Note the weight in 2.4.6 is the (1.0 - 0.xxx) expression in 2.4.4).

If the weight = 0.9 (i.e ideal Q near 35):
NewQ = 35 + 0.9 - 0.8 = 35.1
Finally truncate this number: trunc(35.1) = 35 (unchanged)

If by chance the ideal Q where closer to 34, i.e. weight 0.6:
NewQ = 35 + 0.6 - 0.8 = 34.8 Trunc(34.8) = 34 (one down)

------------------
@r6d2: There is a theshold parameter for the smart binary search (set to 34) but don't change it. I will explain how it works first(sometime). ;)

@DDogg: A movie that has 400000 frames:
Sample % = 100000/400000 * 100 = 25. You'll have to explain why I should bother to add GUI for that. :p

DDogg
11th August 2003, 16:28
Tylo and everybody, my face is red as I am starting to realize how much I have contributed to much confusion about the Roba method. As a penance I am planning to do a dummy's guide for the average non technical tool-user, but first I need to continue to concentrate on getting a full and complete understanding.

In order to do that I need to ask Tylo some more questions and make some statements that may seem strong and aggressive. My aim is not to offend, but rather to find out if what I believe is true. That is the only way I can get to where I want to go. Hopefully my questions will cause a more directed dialog. I don't have any problem if I am wrong, as the resulting dialog will be educational for all.

Statements and questions:

1> Tylo, as I think I understand it now, your statement about D2SRoba, "Adds Robshot/Bach one pass VBR encoding to DVD2SVCD" could not be correct as there is no such thing as "RoBa one pass VBR". RoBa by definition must consist of a combination of One fixed Q pass and at least one additional average bitrate VBR run to distribute the bits to achieve practical size targets.

2a> RoBa, by definition, says size is secondary to quality and the first VBR run must use a Q of the approximate quality you desire without any consideration to final size. Again, at this stage of the theory, predicted size is of NO issue. That first Q run is normally in the 32- 46 range.

2b> After this run, from a practical standpoint, one or more standard VBR passes that reuse the VAF file created in the first quality run use a special RoBa criteria to calculate an average bitrate to redistribute the bits in such a way as to refine the end size of the encode so it does not partially fill the number of target media calculated by the RoBa process. The user NEVER actually selects the amount of target media as that decision is inherent in the RoBa process itself.

3> To use a predictive method that alters the Q in such a way as to change the size of the finished encode is directly opposite to the intention of the RoBa method.

4> The D2SRoba plug-in is in fact a totally different size predictive method very similar to that used in the D2S TMPG CQ mode predictive method where quality is altered as a way of achieving a predefined size target.

Tylo, could you please reply and tell me if I have it completely wrong yet again. I really want to get this right this time and I apologize to the group for my thrashing about while trying to understand this complicated subject.

/add: BTW, Thanks for the replies about the framecount question I asked. I'll follow up on it later after I get a better understanding. It is about adding a pre-indicator to the RoBa process somewhat like that used in GKnot. I don't want to get in to that now as it might distract from the questions above.

telemike
11th August 2003, 17:26
@DDogg- I think you are on the right path..

It seems that Tylo's plugin is more a TMPG CQ predictor than the Roba thingee doodle.

I originally used Kwag's and other's TMPGenc methods until I discovered that CCE is way faster for SVCD's. Then my search for a predictor that was equivalent to CQ led me to Tylo.

I think the Tylo plugin should be called:

CCE OPV 1-pass file prediction. ;)

Now, if only Tylo's plugin could be fully integrated with DVD2SVCD internally........

r6d2
11th August 2003, 17:51
Originally posted by DDogg
Tylo and everybody, my face is red as I am starting to realize how much I have contributed to much confusion about the Roba method.
@DDogg, hope you don't mind me attempting to answer this post addressed more to Tylo, but you said "Tylo and everybody" I consider myself in the everybody category. :)
but rather to find out if what I believe is true.
The Search for the Holy Truth, starred by DDogg as Indiana Jones and Tylo as Dr.Jones, Sr. :)

(Remember Indiana chose his name after his DDogg, since he did not like his father, who named his son Henry after him, to call him "Junior".)
1> Tylo, as I think I understand it now, your statement about D2SRoba, "Adds Robshot/Bach one pass VBR encoding to DVD2SVCD" could not be correct as there is no such thing as "RoBa one pass VBR". RoBa by definition must consist of a combination of One fixed Q pass and at least one additional average bitrate VBR run to distribute the bits to achieve practical size targets.
Yes, by definition it is. However, Tylos's statement is still correct, since what he does is precisely add RoBa support for OPV encoding method in DVD2SVCD.

The primary intention of Tylo was to avoid the second pass, using Bach's idea of a 100% sample to a shorter x% sample, and still do (1 + 6 * x%) pass.

What came after that by popular demand was to support range mode, multipass and other stuff which added the tool a great generality which, IMHO, deserves a name like RoBaTy method.

2a> [...] Again, at this stage of the theory, predicted size is of NO issue. That first Q run is normally in the 32- 46 range.
The Q you set is up to you. Bach recommended something like 30 and 40 for Roba, both magic numbers.

2b> [...]The user NEVER actually selects the amount of target media as that decision is inherent in the RoBa process itself.
You're right. In pure RoBa, size does not matter :)

3> To use a predictive method that alters the Q in such a way as to change the size of the finished encode is directly opposite to the intention of the RoBa method.
The nature of OPV requires you to find a Q in the accepted range defined by [0, Worst Q], in order to fill the CDs to the edge (or at least try).

This approach has the favorable side effect of avoiding border conditions where RoBa may give a sub-optimal encode.

4> The D2SRoba plug-in is in fact a totally different size predictive method very similar to that used in the D2S TMPG CQ mode predictive method where quality is altered as a way of achieving a predefined size target.
With a huge difference to DVD2SVCD's CQ mode: you define the least quality you're satisfied with, and the plugin determines the size. You cannot do that in standard CQ mode.

Hope I'm not putting more hairs into the soup.

tylo
11th August 2003, 18:03
To be honest, I didn't have much of a clue how the Robshot method worked when I started to write this plugin. Actually, I only read Bach's posts. I have a fair understanding today, and it seem to match your understanding pretty well. Actually I've learned a few things in this thread too.

I believe most of the statements you made are true, so I will rather give you a general explaination that will hopefully make you all understand why the name D2SRoBa both makes sense and confusion.

-------

RoBa is a specific method, which is a combinations of ideas from Robshot and Bach. This plugin does not try to exactly implement that, but it uses some ideas from both of them:

Robshot: selects a (Worst) Q for the initial pass, which creates the vaf file, and establish the compressablilty of the movie. This is then used for computing the number of CD's required (as you say - inherent in the method).

D2SRoBa: does a similar, but 'compressed' first pass, using only a fraction of the movie as sample. We are only interested in the compressability of the movie, which let us compute the number of CD's required (hence, we dont need the vaf file). This is the only part that is taken from the Robshot method. /Add: This is the NumCDs=auto, Worst Q functionality.

Then, ideas from Bach are used, specifically, the selection of only a fraction of the movie as a 'representative' sample, and the binary search for a Q that creates a file target size that we are looking for.

The essence:

The goal of the thread: 'Modification and optimization of robshot method and its possible use with DVD2SVCD' - was exactly that: a way to cheat, in order to make the RoBa method useful for DVD2SVCD. The original RoBa method takes the long road with: one pass creation of the vaf, then redistribute the bits, then a second pass using the modified vaf information in order to 'achieve practical size targets', as you say.

Instead, we cut the path by just finding a more suitable Q (instead of doing bitallocation redistribution), and then doing only one full VBR pass -the OPV method!

/Add: The first post in the mentioned thread states that multipass is still required. In the CCE thread: 'Question about the "Getting the best out of CCE" guide...' http://forum.doom9.org/showthread.php?s=&threadid=41033 , the one-pass method was suggested by Bach, this was refered to as '1passBach'.


Hope this helps. If you need more detailed answers/comments on your statements, I'll be happy to answer.

DDogg
11th August 2003, 19:04
Gee, these are going to be a major work to reply to. Oh, well, part of my penance.

@r6d2
Yes, by definition it is. However, Tylos's statement is still correct, since what he does is precisely add RoBa support for OPV encoding method in DVD2SVCD. No it is not correct. This is a contradiction of terms. Tylo does not do a second avg BR pass, so by definition it is not RoBa, so he does not "precisely add RoBa support for OPV encoding". Even if he did add the second pass, it would still not be RoBa. At this stage, the important thing for the reader to understand is that Tylo's plug-in is not RoBa in the purest definition in that it is not a 2 pass. Rather, it is a derivative of 1-pass Bach which does not require the second pass. Some loss of accuracy (small) of final file size is the reult of not having the second Averaging VBR path.

Now, I think there are some things he could do that would make it a hybrid RoBa and in fact be even a better process than Roba, but let's get in to that later.

The nature of OPV requires you to find a Q in the accepted range defined by [0, Worst Q], in order to fill the CDs to the edge (or at least try). Fine, but OPV has nothing to do with RoBa.

With a huge difference to DVD2SVCD's CQ mode: you define the least quality you're satisfied with, and the plug-in determines the size. You cannot do that in standard CQ mode. This is correct ONLY if you use Auto or the ranges, else it is no different from the TMPG CQ predictive method D2S uses now.

Hope I'm not putting more hairs into the soup. Kinda, but the point of this whole thing is discussion, challenge and rebuttal (in a friendly way).

@Tylo
Robshot: selects a (Worst) Q for the initial pass, which creates the vaf file, and establish the compressibility of the movie. This is then used for computing the number of CD's required (as you say - inherent in the method).

Did you not mean to say above RoBA instead of RobShot?

The original RoBa method takes the long road with: one pass creation of the vaf, then redistribute the bits, then a second pass using the modified vaf information in order to 'achieve practical size targets', as you say.

You seem to be mixing the terms Robshot and RoBa. What you described immediately above is Robshot. To the best of my knowledge, Bach never said his method was possible without the second VBR pass using an average bitrate.

Instead, we cut the path by just finding a better Q (instead of doing bit-allocation redistribution), and then doing only one full VBR pass -the OPV method! Yes, that is exactly that. The OPV method. But it destroys the essence of RoBa in that OPV is a size control method instead of a quality control method. It is useful, but has nothing to do with RoBa.

That being said, although I am still in fuzzy think mode, I think it may be possible to actually create a hybridized system that does measure the potential compressibility of a source. However, that could never be a standard sampling as we are now using now as that is dependant on the sources length. It seems we must measure the compressibility of a source by using a randomized BUT exact same frame-count on all source.

As background, and for furthering conversation, let's all do an exercise. This is not randomized, but it illustrates the point. Take two or three sources and encode the first 10000 frames inset 10000 frames from the start. That is, trim(10000,19999). Do a 1-pass vbr @ Q=32. Record the size generated. It will all be different. The ideal case would be source 1 is something easy to compress like the Mtrx and the second source is very difficult, like SPR.

What results, with further refinement, is a form of constant such as bits per pixel or something like that which could be used to generate predictive information on how an encode would compress and use intelligent algorithms to give predictive information to guide the encoder in a better way. It would still use or provide as an option the true RoBa method's N passes using avg bitrate for sizing.

Tylo, Now THAT would be a mofo Plug-in!

Whew! I am tired! Ok, group, please work to tear up and refine the logic. I think we can get somewhere good if we work on it together.

/Add: Tylo, ain't it a pain trying to read a thread where the main poster erased everything. Arghhhh! Yes, I see your point in that I think your system certainly does approximate the 1-pass Bach method which differs from the RoBa method. The 1-Pass Bach method, IMO, is inherently flawed as it can never give exact size prediction or more importantly constant quality. Would you agree or disagree with that statement?

Given the faster speed of inexpensive processing power available now I think the original RoBa method using just two passes (1 opvbr, 1 avg BR VBR) is the best compromise. D2S internal RoBa mode does this very well (I have not had any more problems with it). However, not knowing how many disks you will end up with is a little difficult for a control freak to swallow :) A tool that would generate a size prediction based upon the apparent compressibility of a source would be useful.

Holomatrix
11th August 2003, 19:49
I’m glad you guys are working this out :) I started getting a headache a few posts back :)
“em ot sdrawkcab lla s’ti”

tylo
11th August 2003, 21:30
Did you not mean to say above RoBA instead of RobShot?
-- Yepp, I mixed up.

But it destroys the essence of RoBa in that OPV is a size control method instead of a quality control method. It is useful, but has nothing to do with RoBa.
-- I don't think you ever understood the [NumCDs=auto, Worst Q=X] combo. When you set Worst Q=X, it will encode a representative sample with Q=X. Now, the plugin computes the minimum number of CDs that guarantees that the final encoding uses an equal or better Q than X. That, my friend - is quality control, and has alot to do with RoBa.

generate predictive information on how an encode would compress and use intelligent algorithms to give predictive information to guide the encoder in a better way
-- You may well be on to something, but I think I'm too tired think about it now.

the main poster erased everything. Arghhhh!
-- I'm a forgiving person, but I'm having a hard time with this one. :mad:

1-Pass Bach method, IMO, is inherently flawed as it can never give exact size prediction or more importantly constant quality.
-- It is not exact, but that was never the point either - its close enough. The speed/quality is unbeatable. Constant quality can be achieved as explained above.

Given the faster speed of inexpensive processing power available now I think the original RoBa method using just two passes (1 opvbr, 1 avg BR VBR) is the best compromise.
-- I tend to agree, but we're not quite there yet with the speed. (maybe in a year or so).

not knowing how many disks you will end up with is a little difficult for a control freak to swallow
-- I thought that I was the control freak? :p ;)

/Edited.

DDogg
11th August 2003, 22:19
-- I don't think you ever understood the [NumCDs=auto, Worst Q=X] combo. When you set Worst Q=X, it will encode a representative sample with Q=X. Now, the plugin computes the minimum number of CDs that guarantees that the final encoding uses an equal or better Q than X. That, my friend - is quality control, and has alot to do with RoBa.

Yes, you may well be right on this and I promise I will work with that mode more so I may better understand it. [edit] As you know I was always fixated on controlling the final output size. Because of that, I think I never fully appreciated the other modes.

As for compression prediction, a friend suggested this simple method and it works well. Something is not right about it as the "2" is supposed to be 2 percent and if I increase it the frame count actually gets smaller. Maybe somebody can give me a fix. I am also too tired to think about it anymore.

Anyway, use the below and then divide the filesize by the framecount you get in CCE when you load the script. This will give a representative and comparative number that will definately indicate the compressibility of a source. It is very clear. This is just a rough concept and I am sure not very original, but it may help us.

SelectRangeEvery(Round((FrameCount() / (FrameCount() / 100 * 2))*60),60)

r6d2
11th August 2003, 22:21
Originally posted by DDogg
No it is not correct. This is a contradiction of terms. Tylo does not do a second avg BR pass, so by definition it is not RoBa, so he does not "precisely add RoBa support for OPV encoding".
You're making me confused by semantics, let me rephrase...

Robshot: Use Q="your target quality" to encode at the quality you want with OPV, then patch manually to get the size you want.

RoBa: Modify Robshot's CCE parameters to correct "conceptual errors" (quoting Bach), include automation. Still OPV first pass, Multipass from then on.

RoBaTy: Introduces the sample idea to find, based on your Q (conceptually the same Q of RoBa) a Q', equal or even better than Q, that gives you filled CDs and with one single pass.

Don't want to start an argument on mere semantics, but to me it is quite clear that Tylo's plugin is precisely based on RoBa method and he "adds RoBa support for OPV".

Your point is that by definition RoBa is multipass, I grant you that. But the concept behind RoBa is not multipass, which is just an encodig mode. The concept behind RoBa is: get always the quality you want and don't waste CDs.
Now, I think there are some things he could do that would make it a hybrid RoBa and in fact be even a better process than Roba, but let's get in to that later.
Our positions are not too far apart, I guess. Long live RoBaTy!
This is correct ONLY if you use Auto or the ranges, else it is no different from the TMPG CQ predictive method D2S uses now.
You are right, but support for fixed CD sizes is a byproduct of D2SRoBa, not its leit motif.
the point of this whole thing is discussion, challenge and rebuttal (in a friendly way).
Yep. I guess we are being very friendly then! :)
But it destroys the essence of RoBa in that OPV is a size control method instead of a quality control method.
@DDogg, OPV is the quality control CCE has, as CQ is to TMPGEnc.

In OPV, you define the Q.factor you want, and get the size (BR) as a result.

On the other hand, in Multipass VBR you set the BR you want, and get the Q.factor it yields as a result.
The 1-Pass Bach method, IMO, is inherently flawed as it can never give exact size prediction
Getting in again, I think you cannot get 100% precision but you can get close by sampling properly.
[...] or more importantly constant quality. Would you agree or disagree with that statement?
I disagree. Reasons on the paragraph above where I explain OPV.
D2S internal RoBa mode does this very well [...] However, not knowing how many disks you will end up with is a little difficult for a control freak to swallow
I also think the internal RoBa is great and best of both worlds.

My only problem with it is that since audio is encoded before video in DVD2SVCD, you are in danger to make choices about audio that turn out to be sub-optimal. For instance, going for 160 audio and the movie results to fit reasonably well in 1 CD... You might have reduced audio to get a better picture!

Or the opposite: you go for 224 audio and end up with 3 CDs, and the movie would have fitted correctly in 2 CDs with 160 audio.

Sometimes you might add a second audio track, too, but you're affraid to because you don't know beforehand how compressible the movie is.

Also, since we are in fuzzy thinking mode here, if a tool which analyzes the video before audio would exist, you could also make decisions on whether filters are needed or not, of if they are convenient or not, if the time impact they have is worth, etc.

ToK, for instance, lets you predict-only. You can make your audio and filter decisions before doing the actual encoding, with good data in your hands.

DDogg
11th August 2003, 23:39
Don't want to start an argument on mere semantics, but to me it is quite clear that Tylo's plugin is precisely based on RoBa method and he "adds RoBa support for OPV".

Yes, I think it is actually the wording that has caused me confusion. Actually I think it would be more accurate to say "Tylo's plugin is precisely based on the 1-pass Bach method" (which is another method, but not RoBa by a strict definition of the term. Assuming there is such a thing as a strict definition :))My only problem with it is that since audio is encoded before video in DVD2SVCD, you are in danger to make choices about audio that turn out to be sub-optimal. For instance, going for 160 audio and the movie results to fit reasonably well in 1 CD... You might have reduced audio to get a better picture!

Or the opposite: you go for 224 audio and end up with 3 CDs, and the movie would have fitted correctly in 2 CDs with 160 audio.

Sometimes you might add a second audio track, too, but you're affraid to because you don't know beforehand how compressible the movie is.

Also, since we are in fuzzy thinking mode here, if a tool which analyzes the video before audio would exist, you could also make decisions on whether filters are needed or not, of if they are convenient or not, if the time impact they have is worth, etc.
BTW, I think D2S is quite open to revisiting the automated internal RoBA mode as it is ideal for DVDs and would add a lot of sizzle to the package. I think Tylo sounds like he is also open to suggestions also. To that end I would suggest a condensed wish list, such as the excellent thoughts you brought up in your post and listed immediately above as a quote.

[Very Fuzzy mode on]
They, along with a intelligent method of indexing the compression characteristics of a source coupled with some form of rule based approach would be very special indeed. No, I have not thought it out, but something like the ability to establish certain actions based upon certain criteria. Maybe a separate rulebase tab that would simulate logic and allow the user to establish some user directions or guidelines for the program to help it deal with some of the decision problems you mentioned above.

tylo
12th August 2003, 07:36
Bach also suggested to switch the sequence of audio and video generation (without getting much credits for it). His motivation was that we could increase the audio bitrate to exactly fill the CDs (padding).

r6d2's suggestion is more useful, though. E.g. it allows to determine audio bitrate based on the 10% rule (audio 10% of video). Or, we can use it to adjust down the audio when the video oversizes a little (so that it still fit the number of CDs).

It should be fairly easy to add to the plugin (independant of using the D2S internal RoBa): Exchange BeSweet with a dummy prog that only creates an empty audio file (required by D2S). Then after the video is created, do the real BeSweet run with an adjusted bitrate.

Something is not right about it as the "2" is supposed to be 2 percent and if I increase it the frame count actually gets smaller.
/Edit: I was slow here: You want to add a SelectRangeEvery() in your avs?. I think this line should pick up about 'sample_frames' number of frames from the 'total_frames':

SelectRangeEvery(Round(sample_gops * goplen * total_frames / sample_frames), sample_gops * goplen)

In the example, sample_gops=4, goplen=15, total_frames=400000, sample_frames=100000

homerjay
12th August 2003, 09:41
:scared: oh my god :p :p

ive got one question that i havent seen mentioned above which im sure r6d2 will love but a few of us are trying...that is the 1cd method
i just want to clarify that currently what happens is that when you select number of cd's = 1 the program attempts to match your worst Q but in tests always ends at 63 given that Adjust Q is set to 0.7 or 0.8
my question is what does it do about the bitrate, when you do a 1cd encode in dvd2svcd itself you can rig the bitrate screen to have all lengths as 1 cd giving for eg a range for an 80 to 100 min film a bitrate between 1226 and 952 and for those adventurous types 100-120 mins 952-769
as i am writing this i am wondering whether i should just enter these in the d2sroba.ini for

max_est_brate=
min_est_brate=

any clarification would help at this stage and pleeeeeease ....not to techy ;)

tylo
12th August 2003, 10:20
@homerjay: Previous to version 2.4.6, the highes Q was 63, but the new version will automatically go up to 112. If the bitrate is still to high to match the target bitrate, I will highly recomend you to use 2 CDs instead!

The min_est_brate, max_est_brate are for the '?' option, so that will not help.

PS: If you really want to strech the Qs, there is another option: Set the really_worst_q in the ini file to e.g. 160. Remember that you must consider the 'Min bitrate' in D2S also. If that is set too high, you may never hit the target bitrate, no matter how high Q you use.

Try it, but be prepared to see some really blocky encodings :p

homerjay
12th August 2003, 10:50
thanks for reply tylo

but think if you havent looked you might want to scan ddoggs initial post in this thread regarding blockiness and motion adaptive filtering

http://forum.doom9.org/showthread.php?s=&threadid=58886

1cd encodes are on the increase and with kvcd being able to condense 2hours plus onto 1cd people are wanting to do the same with dvd2svcd

shame it wasnt as easy as setting the max_est_brate= & min_est_brate=
could this be encorporated ??

r6d2
12th August 2003, 13:45
@homerjay,

I think Tylo already answered you in his previous posting. You can get a 1 CD rip with D2Sroba a la KVCD, just sometimes its Q will be higher that 63. Try and see for yourself if blocks are there or not, and please tell us.

telemike
12th August 2003, 13:45
Hmmm.. I gots a problem. I tried making a copy of "Bad Boys" using D2SRoba (800mb disc, 1% sample, Q adjust .8) and my 2nd image file was oversize by about 20 MB making it too large to fit on a cd....

I was using the motion adaptive script.

I am trying it now with a cd-size of 740 for safety.

ANy ideas on what happened?

r6d2
12th August 2003, 13:51
Originally posted by telemike
Hmmm.. I gots a problem. I tried making a copy of "Bad Boys" using D2SRoba (800mb disc, 1% sample, Q adjust .8) and my 2nd image file was oversize by about 20 MB making it too large to fit on a cd....

This is a case of underestimation. I think your sample was too small. The higher the sample, the higher the precision, the longer the predictive phase. I'd not go for less than 2%.

Using 740 will do, but I really think that's not the point.

Holomatrix
12th August 2003, 14:15
Originally posted by telemike
Hmmm.. I gots a problem. I tried making a copy of "Bad Boys" using D2SRoba (800mb disc, 1% sample, Q adjust .8) and my 2nd image file was oversize by about 20 MB making it too large to fit on a cd....

I was using the motion adaptive script.

I am trying it now with a cd-size of 740 for safety.

ANy ideas on what happened?
What does the 20meg file contain? just credits? usually, just ignore the second image and use the first image. I use a 5% sample with good results.

I just tried to encode "Agent Cody Banks", Angie Harmon is awsome :), anyway I can't remember right now the minutes but it's not to long, anyway this is a very un-compressable movie. I ended up with a Q of 96 on one CD. Wow :( Looks like S**t using the MAF script.

homerjay
12th August 2003, 14:39
@holomatrix - that surprised me - using dvd2svcd i produced a fantastic quality 3pass 1cd of the same film two months ago ( it was an avi source though )took about 12 hours which is why i have been so interested in trying to understand this plugin :confused:

Holomatrix
12th August 2003, 14:45
I think I had mentioned such an opinion a little ways back about wouldn't I still get better quality if I just stick to a 3-4 pass encode rather than trying to fight with this OPV stuff :)

Are you talking NTSC as well?

DDogg
12th August 2003, 14:48
I ended up with a Q of 96 on one CD. See, this is where the compression index comes in. Once we get it figured out, a first small sampling pass will tell you immediately whether you have the possibility of doing a 1cd encode.

Holomatrix, would you please do me a favor and paste this in on the bottom of your script for that movie:

[/Edited - Avisynth seems to have a strange way of doing math]
SelectRangeEvery(Round((FrameCount() / ((FrameCount() / 100) * 1))*60),60)

Run a cce 1passvbr with Q=32 min=0 max =2616 (It will only take a few minutes. Divide the filesize of the MPV by the number of frames you see in CCE. Post back that number.

telemike
12th August 2003, 14:55
I did Cody Banks on 2 cd's. I just use D2SRoba in auto mode with a "Q" of 40 as my limit. I just figured out that I need to ajust my DVD2SVCD settings on the bitrate tab for BBmpeg to cut properly with Tylo's plugin.

This is what I think happened. My Q was underestimated causing the enode to be too large for 2 cd's. When DVD2SVCD recovered and started muxing it muxed it as 2 cd's and the second file was too large. I need to adjust the settings so that it would mux as 3 cd's and cut to size the 2nd one and have a leftover 3rd file........:angry:

Is there any way Tylo can add in his plugin that when DVD2SVCD recovers and starts muxing that it can increase the cd count by one just in case?

Holomatrix
12th August 2003, 15:01
Originally posted by DDogg
See, this is where the compression index comes in. Once we get it figured out, a first small sampling pass will tell you immediately whether you have the possibility of doing a 1cd encode.

Holomatrix, would you please do me a favor and paste this in on the bottom of your script for that movie:
SelectRangeEvery(Round((FrameCount() / (FrameCount() / 100 * 2))*60),60)

Run a cce 1passvbr with Q=32 min=0 max =2616 (It will only take a few minutes. Divide the filesize of the MPV by the number of frames you see in CCE. Post back that number.
Ok, I'll pump the modified script into CCE and get back to you with that number when I get back home.

homerjay
12th August 2003, 15:25
@holomatrix it was indeed ntsc - im in pal land myself though :rolleyes:

r6d2
12th August 2003, 15:39
Originally posted by Holomatrix
I think I had mentioned such an opinion a little ways back about wouldn't I still get better quality if I just stick to a 3-4 pass encode rather than trying to fight with this OPV stuff :)
My thoughts on the matter, just hoping to get a respectfull rebuttal:

In VBR, the more passes you do the more the encoder refines the high quantization spots. It does so by removing BR from the places where quantization is lower and moving it to places where it is needed. This will end up, in theory, leveling and uniforming quantization along the movie.

On a 1 CD rip you have little or none BR to spare. Even if there is some, multipass will just end up uniforming quantization. And guess what: OPV does just that from the start. It keeps quantization at the same level throughout the movie.

So, I see no reason why a multipass would produce a better encode than OPV. Of course I may be terribly mistaken, so if somebody could just tear apart the logic of this reasoning I'd be glad to learn about it.

Holomatrix
12th August 2003, 15:47
Originally posted by r6d2
My thoughts on the matter, just hoping to get a respectfull rebuttal:

In VBR, the more passes you do the more the encoder refines the high quantization spots. It does so by removing BR from the places where quantization is lower and moving it to places where it is needed. This will end up, in theory, leveling and uniforming quantization along the movie.

On a 1 CD rip you have little or none BR to spare. Even if there is some, multipass will just end up uniforming quantization. And guess what: OPV does just that from the start. It keeps quantization at the same level throughout the movie.

So, I see no reason why a multipass would produce a better encode than OPV. Of course I may be terribly mistaken, so if somebody could just tear apart the logic of this reasoning I'd be glad to learn about it.
Ok, I'll test this once and for all too :) When I get home I'll test a chapter with 3-pass (I'll check what bitrate Tylo's plugin picked and use the same bitrate for Max avg. for my 3-pass ofcourse) then test same chapter again with 1pass Q=96 and see what looks better. Do I need to change my Max bitrate to the bitrate noted above when doing this Q test?

r6d2
12th August 2003, 15:57
Originally posted by Holomatrix
Do I need to change my Max bitrate to the bitrate noted above when doing this Q test?
Use DDogg's magic numbers. As long as you use the same in both tests, the results should be comparable.

Holomatrix
12th August 2003, 16:06
Sorry, don't understand. Do you mean use Q=96 min=0 max =2616 ? So it's the Q number that is doing the "Max Avg" bitrate thingy, right?

jsquare
12th August 2003, 16:11
I tried D2SRoba with some interlaced/NTSC music videos and the results comes out with those interlace lines all over, works fine with film based movies.
Without D2SRoBa using 2-pass VBR the lines are gone but the video quality suffers, got some macroblocks even at high bitrates.

Any subjections?

DDogg
12th August 2003, 16:33
Holo,

The compression index we are working on has nothing to do with any individual encode. I am sorry if I confused you and note I edited the range line above to:

SelectRangeEvery(Round((FrameCount() / ((FrameCount() / 100) * 1))*60),60)

Please use 1-pass vbr Q=32 Min=0 Max =2616 No VAF, no audio, and RB's progressive template which has all the checkboxes turned off except 9, zigzag and progressive. (That Max is ONLY because I used that and I want to compare my numbers to your numbers. We will probably change that number later if this goes anywhere and tylo may have some better ideas on the script line.) Oh, I forgot to say, use Gert's standard semi-auto.

You might also then want run it using other scripts or add a filter as this will give you a clear indication of how they will increase compression, but that is another use entirely from the common index we can use.

What we are working on is a test that always uses the same EXACT numbers and always results in a replicatable indicator of the potential compression of a source. Once we get that, a program such as Tylo's, could do this test and potentially use that extra information to assist and guide you. Hey, it is just a thought and may not go anywhere.

Again, it has NOTHING to do with any individual encode. The reason I asked you to do it was because I am expecting the "number" on that encode you are doing to be much higher than say, "the Mtrx" which returns a remarkable lower number than most sources.

Holomatrix
12th August 2003, 16:50
@ddogg - yes, your test I understand, I was refuring to the second test I'm going to do comparing 1pass to 3pass.

tylo
12th August 2003, 16:52
No need to do all this. The information lies in the D2SRoBa_log.txt file.
- Movie length : 01:43:35 (149030 frames, 23.976 fps)
- Audio size est : 124315983. bytes (160 + 0 kbps)
- CD user data size : 833237920. = (800 - 5)*1024*1024 - 380000
- SelectRangeEvery : every 750, select 15 frames
- Num. sample frames : 2985
--------------------------------------------------------
Calculations:
- Estimated mpv size : 666565608. (Q=40, 857 kbps, 13350992 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 689790437. (887 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 759827533. (Q=32, 977 kbps, 15218984 sample sz)
- Computed mpv size : 713196571. (Q=36, 917 kbps, (Q40+Q32)/2)

Take the 'Estimated mpv size' for Q=32, and divide on ' Num. sample frames'
In this example: 759827533 / 2985 = 254548.58

This number should tell you something about the compressability of the given movie. The smaller number, the better compressability.

DDogg
12th August 2003, 17:08
Tylo, you are saying if Holo and I both run it on "the mtrx" we will both get the same number?

Ideally, I think it needs to be standalone, don't you? An app that loads a d2v and runs a compression test giving a index number. So that if Holo and I both run it on "The Mtrx" we both get the same number.

/add:
I guess if the plug-in had a compression test only button?

Holomatrix
12th August 2003, 17:16
I would assume we would get the same numbers :) and am I being stupid in asking if I use Q=96 min=0 max =2616 So it's the Q number that is doing the "Max Avg" bitrate thingy, right? I just need to know for my compairison test between 1pass and 3pass so I don't screw up the bitrating on the Q encode.

tylo
12th August 2003, 17:43
Originally posted by DDogg
Tylo, you are saying if Holo and I both run it on "the mtrx" we will both get the same number?

Ideally, I think it needs to be standalone, don't you? An app that loads a d2v and runs a compression test giving a index number. So that if Holo and I both run it on "The Mtrx" we both get the same number.

/add:
I guess if the plug-in had a compression test only button?
I'm getting a little lost here. :confused: Why would you want a standalone app. You must run D2S up to the video encoding anyway (except the audio creation).

When D2SRoBa terminates CCE (started by D2S), it begins its process by creating a new avs file, and running CCE compression tests. After the Q=32 test, simply right click the icon, then Exit the plugin. (D2S is terminated at this point anyway). Look at the log file and you can calculate the compression (Q32 mpv size / sample frames).
Why shouldn't you get the same size for the same source?
It differs with different avs-scripts of course.

@holomatrix: sorry - I don't undestand your question.

r6d2
12th August 2003, 17:45
Originally posted by Holomatrix
I would assume we would get the same numbers :) and am I being stupid in asking if I use Q=96 min=0 max =2616 So it's the Q number that is doing the "Max Avg" bitrate thingy, right? I just need to know for my compairison test between 1pass and 3pass so I don't screw up the bitrating on the Q encode.
Do the OPV with the above numbers and then the VBR with the same numbers plus the AVG you got from the OPV (size/time).

Holomatrix
12th August 2003, 17:53
Originally posted by tylo

@holomatrix: sorry - I don't undestand your question.
Ok, let me ask it this way then. To do a single chapter quality comparison test between a Q=96 1pass OPV encode and a 3pass VBR encode would I set the Q 1pass test up like; Q=96 min=0 max=2530 bitrate and the 3pass test up like; Max bitrate= 2530, Min bitrate= 200 and Max Avg. bitrate= 870 ? If that does not make sence then may you can give me instructions on how both test encodes should be set up.
Thanks

@r6d2 - posted right when you did :) right, so I should look in my D2Sroba ini for my line that says somthing like "Q=96, 870 kbps" and use the 870 as my Max Avg. when doing the 3pass?

r6d2
12th August 2003, 19:00
Originally posted by Holomatrix
@r6d2 - posted right when you did :) right, so I should look in my D2Sroba ini for my line that says somthing like "Q=96, 870 kbps" and use the 870 as my Max Avg. when doing the 3pass?
Yes, but actually it may be better if you take the total encode OPV size and divide by the length. The Q=96 line on the log is an estimate, not the real thing.

Also, if you're encoding just a chapter you'll have to adjust the CD size to accomodate for the corresponing fraction of the whole movie. Otherwise you'll surely get Q=1 :D

A simple proportion may do the trick, but it will not be exact because of the base size any CD has. If you want to match your 96 number you'll have to iterate changing the CD size (do it in both D2Sroba and DVD2SVCD).

Don't complain ;), you volunteered :)

DDogg
12th August 2003, 19:01
Tylo,

Well the whole point of the compression index is to have it incorporated INTO the app (not necessarily your plug-in) so that it automatically provides additional information for the decision process. In the case of your particular plug-in, I guess it already is incorporated in a way as you can look at the file-size from the Q32 run and perhaps incorporate more AI. Perhaps that information might be used to shorten your process somewhat. Dunno. That's your business.

My comment about the standalone was to provide a pre-diagnostic tool to allow people to know in advance what the compression characteristics of their source was. If this tool got into common use, a person tends to come to know what index is worth trying on say 1cd. That is to say, once a person is slightly experienced they know it would be just a waste of time to try 1 cd if the compression index is larger than XX.xx. Also, in the case of DVD2SVCD, the rule base tab we slightly discussed could use that as part of the decision process by way of an input box. If CI less than X then do X, else do Y

That common index number then also becomes a tool for communication. "Dear User, if the CompIndex is larger than XX.xx, then do you must increase the number of your target media by 1"

Also, in a forum environment, it would provide a better method of communication between us. "The CI on that DVD is way up there, like XX.xx, don't even try anything under X"

Like I said, this is just something I am throwing out to the group. Perhaps I should have stated a separate thread.

Holomatrix
12th August 2003, 19:54
Ofcourse I deleted the original encode but still have the d2sroba log. I just did that little test 1-pass vbr Q=32 Min=0 Max =2616 SelectRangeEvery(Round((FrameCount() / ((FrameCount() / 100) * 1))*60),60) on a chapter. 472 mpv/60 frames = 7.8666666. If I select a different chapter, would that not be different results.

Here is that log from the whole movie encode if it helps. The actual Q=96 mpv size was 39,924 7365 sample frames


D2SRoBa v2.4.6 - DVD2SVCD plugin, by tylo
OS Version: WIN_2000
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-08-11 08:29:49
--------------------------------------------------------
Settings:
- CD size : 800
- Number of CD's : 1
- Worst Q. factor : ---
+ One pass VBR Robshot/Bach : 1
- Sample percentage : 5.0
- Sample GOPs : 1
- Adjust Q. : 0.8
- Safety Zone : 30
+ Do credits bitrate tweak : 0
- Start time : 0:00:00
- Bitrate : 1000
--------------------------------------------------------
- Movie length : 01:42:12 (147041 frames, 23.976 fps)
- Audio size est : 0. bytes (0 + 0 kbps)
- CD user data size : 833237920. = (800 - 5)*1024*1024 - 380000
- SelectRangeEvery : every 300, select 15 frames
- Num. sample frames : 7365
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 814106420. (1061 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1388297035. (Q=32, 1810 kbps, 69537120 sample sz)
- Estimated mpv size : 1190890670. (Q=48, 1553 kbps, 59649416 sample sz)
- Estimated mpv size : 902406569. (Q=80, 1177 kbps, 45199804 sample sz)
- Estimated mpv size : 816196661. (Q=96, 1064 kbps, 40881716 sample sz)
- Estimated mpv size : 780912411. (Q=104, 1018 kbps, 39114396 sample sz)
- Computed mpv size : 798554536. (Q=100, 1041 kbps, 39998056.=(Q104+Q96)/2)
- Computed mpv size : 807375598. (Q=98, 1053 kbps, 40439886.=(Q100+Q96)/2)
- Computed mpv size : 811786129. (Q=97, 1058 kbps, 40660801.=(Q98+Q96)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (814106420. / 19.9648336727766 - 40660801.) / (40881716 - 40660801.)
- Adjust Q : (97 + (0.473920280414964) - (0.8)) = 96.673920280415
- Determined Q. : 96
--------------------------------------------------------
Replace values in ecl file:
- opv_q_factor : 96
- opv_brate_max : 1055 ==> 2530
- vbr_brate_avg : 2320 ==> 1061
--------------------------------------------------------
- Encoding Movie
- 2003-08-11 09:21:19
--------------------------------------------------------
- Actual mpv file size:
11/08/2003 11:56a 762329908 Encoded_Video_CCE_NTSC.mpv
--------------------------------------------------------

DDogg
12th August 2003, 20:10
You would have to do it on the whole movie as the source and as Tylo said, just use SelectRangeEvery(750, 15)

Not to worry if that is too much hassle. However, I think if you will do the process, and then divide the resulting file size by the frames and record the resulting number it will be of benefit to you.

Next time you do another encode, also do the same procedure. You will start to see a pattern in the number. Say you have recorded the number for one source which easily fits on 1 cd. If another source you want to try has a same or similar number, it too will probably fit on 1 cd, conversely, this problem encode you are doing now will probably throw a much higher number. Next time you see one like that you will know what to do.

tylo
12th August 2003, 21:13
One of the main motivation for writing the plugin was to automatically find and set optimal number of CDs.

But many other settings have to be done from one DVD to the next. So I then thought we needed an intelligent module. A rule based tab, where we could set up customized rules based on characteristics of the DVD, which could perfrom propriate actions/settings in DVD2SVCD. Well, we don't have that - but my plugin does help on some parts.

So yes, a built-in OPV test with Q=X could have given DVD2SVCD more to play with, when e.g. deciding the number of CDs to use.

Say you have recorded the number for one source which easily fits on 1 cd. If another source you want to try has a same or similar number, it too will probably fit on 1 cd
The CI (mpv sample sz/sample frames) says how well the movie compresses, which is interesting, but not so useful in itself. That is because it's independent of the length (you divide with it). If you only simply compare the 'Q32 sample size', from one DVD to the next, that may be more helpful for this type of decisions.
[A medium long movie with good compression, and a short with normal, may get similar 'Q32 sample size'. If one of them looks nice on 1 CD, the other will probably too].

You are wearing me out, folks - I think I'll need a rest :)

Holomatrix
12th August 2003, 21:36
Ok, Ok, :) I did my little test and r6d2 you will be happy to know that I didn't find that much quality difference between the two :)

@tylo - I can't wait to see what your next version of D2Sroba is going to look like :)

DDogg
13th August 2003, 00:40
The CI (mpv sample sz/sample frames) says how well the movie compresses, which is interesting, but not so useful in itself. That is because it's independent of the length (you divide with it). If you only simply compare the 'Q32 sample size', from one DVD to the next, that may be more helpful for this type of decisions.

As you well know, I am no math guy, but it seems to me you could calulate the length into the index somehow. Anyway, I'm not getting any support on the subject and I am tired also, so let's just consider it a mental hairball and let it go.

r6d2
13th August 2003, 03:10
Originally posted by Holomatrix
Ok, Ok, :) I did my little test and r6d2 you will be happy to know that I didn't find that much quality difference between the two :)
@Holo, I'd be surprised if you find any at all :D:D:D

r6d2
13th August 2003, 03:17
Originally posted by tylo
You are wearing me out, folks - I think I'll need a rest :)
You already had some vacation time, so here is my latest wishes added to the list :)

1. Would you implement a third encoding option besides OPV and Multipass, called RoBaTy, which selects RoBa in DVD2SVCD, and finds the Q for Internal RoBa?

2. Would you implement (or explain how it's implemented by the really_worst_q parameter) a threshold (as a percentage) to end the binary search when the result is found?

That's it and I promise to turn fuzzy thinking off ;)

(Edit: BTW, DDogg and I have exchanged some ideas on a Complete Idiot's guide to this stuff. We are working and you are not alone.)

telemike
13th August 2003, 12:31
Personally, I would like Tylo to keep the interface as simple as possible.

Not sure why the GOP thingee is there :confused:


I do like the option of picking Auto or the number of cd's.

I would like the option of having Tylo's plugin make CCE run at a low priority as an option so i can do other things while it enocodes.

Somehow make the status window not be on top of all other windows. It's cool to have, but would be nice if it didn't have to be on top all the time....:rolleyes:

Next would be to see if DVD2SVCD the programmer would incorporate the Tylo plugin into the program DVD2SVCD?

tylo
13th August 2003, 13:22
Hi, telemike

Personally, I would like Tylo to keep the interface as simple as possible.
Not sure why the GOP thingee is there
Agree, I put it there for experimental reasons and wanted to take it away, but was requested not to...

I would like the option of having Tylo's plugin make CCE run at a low priority as an option so i can do other things while it enocodes.
Has been up before. In EclCCE you can set idle priority permanenly. I may do that during the D2SRoBa setup from next release.

Somehow make the status window not be on top of all other windows. It's cool to have, but would be nice if it didn't have to be on top all the time
Has been up before. AutoIt (programming tool) can only open such a window - sorry

Next would be to see if DVD2SVCD the programmer would incorporate the Tylo plugin into the program DVD2SVCD?
Yes, if it was possible to skip the CCE phase from DVD2SVCD, it could rather call this plugin. Would be smoother.

telemike
13th August 2003, 13:39
I would like the option of having Tylo's plugin make CCE run at a low priority as an option so i can do other things while it enocodes.

What about CCE 2.50? I have not upgraded to 2.66+ since I have 2.50 running smoothly.

tylo
13th August 2003, 15:22
Don't think I can do it from the plugin. You can do it manually by opening the task manager | Processes, and change the priorty there.

Holomatrix
13th August 2003, 16:11
@Tylo - Can you please do me a favor and increase Auto extend q search to max 126 or higher. Or tell me how to do it thanks. I'm doing some testing right now with coloryuv(opt="coring", Autogain=true) and am getting great results even with Q 112 and with the movie above Cody Banks removing blocks and stuff. With this tuff compressable movie even at Q 96 and the script I'm using it looks good and with the chapter I'm doing I didn't even realize it was raining at one part until I added the line above and by using a res of 720X480 everything is looking clearer and no noticable blocking effect. Please and Thanks

tylo
13th August 2003, 16:40
Can you please do me a favor and increase Auto extend q search to 126 or higher Fortunately I added an alternative way: Set really_worst_q=126, or whatever, in the D2SRoBa.ini file, and you're all set.

Holomatrix
13th August 2003, 16:44
Awesome, thanks :)

homerjay
14th August 2003, 12:59
some test results and a question to all :sly:

ok im doing a 1cd conversion from a 102 minute PAL source using telemikes script from the MAF thread i got a very good copy (thankyou :D ) with a Q of 61

i then had a go with the big dog mysemiautocropandresizescriptMAF which came up with a Q of 48 except i had missed out the part where i was supposed to take the figures from autocrop preview and feed into the actual script :o so my film had lost a big chunk off the bottom :(

can anyone see where this is leading yet ;)

finally i am now running again with correct borders selected and have got a Q of 67 :rolleyes:

which leads me to my question - what is the cleanest of the 'dirty' methods that can be implemented to convert PAL to NTSC thus reducing overall Q with an example if possible please ( dont think this would qualifty as an enhancement request for tylo really )

thanks

hj

DDogg
15th August 2003, 04:08
Tylo, I have always wondered why you do not offer an option to do a AvBR VBR pass at the end of your process as a conditional based upon user selected criteria. I know my thoughts could not be original so I assume you have it in your mind.

When CCE ends you know, or could know easily, how big the final video encode is as well as the size of the audio and a close estimate of the muxing overhead, so it follows that you know whether the final product is going to be under/oversized and by how much.

It seems then that offering an option based upon a preset error threshold set by the user would be useful. One additional pass would then make the size exact, and in fact would then be the most efficient hybrid RoBa process as it would only be invoked when needed.

Repeating myself, if the prediction was accurate, the sizing pass would not be invoked. If the size is off by XX%, then the time of the one additional run is much less than a complete redo with all the predictive passes and would be part of the same automated process.

Pardon me if this has been brought up directly before. My eyes are about shot, I am afraid.

tylo
15th August 2003, 07:41
Tylo, I have always wondered why you do not offer an option to do a AvBR VBR pass at the end of your process as a conditional based upon user selected criteria. I know my thoughts could not be original so I assume you have it in your mind.
Indeed I had, but it slipped my mind again. I've only thought about this beeing useful when the video gets oversized, but surely it's useful when it undersizes too.

Actually, this idea fits nicely in with r6d2's request for making support for the internal DVD2SVCD RoBa feature. For that, I thought of changing the 'Normal Multipass' mode to 'RoBa Mode', or something.

BTW: Would a name change from '1-pass VBR RoBa' To '1-pass Bach' be more appropriate? If you wish, please elaborate more on how you imagine the GUI for all this (naming and boxes).

Now I just need to find the time to do some programming too! ;)

DDogg
15th August 2003, 15:18
Well, I have not thought it out very well at all. Just off the top of my head you could change the normal to "Final Sizing Pass" then add a drop down with "On Oversize Only", "Always","Never", and 1,2,3,4,5,6,7,8,9,10 as a percent. I would probably type in 2.5 if that was allowed.

Nothing wrong with 1-Pass RoBa in my mind. Also, I think it would be cleaner for you to do the extra final pass as you do the others instead of invoking any D2S pass.

kru
15th August 2003, 18:36
Thank you for a great program Tylo :D

Here is some suggestions:

-What about encode the audio after the video?
(If there are space left on the CD, the audiobitrate will be greater)

-And a "auto choose bitrate" for the audiobitrate??? (That is about 10 % of the audiobitrate)

-And what about if the videosize is n % less or greater of the calculated filesize, D2SRoBa will encode again, and try too make a better prediction???

DDogg
16th August 2003, 16:53
Tylo, some of my index thoughts have started to crystallize while thinking about the feedback I received and while making my reply to Barker here: http://forum.doom9.org/showthread.php?s=&postid=359256#post359256 which shows the bitrate has little to do with the quality of the final encode whereas the compressibility has everything to do with it.

I now think the AI thing I was looking for in your file-size methods could be easily achieved if you would put some special test settings in the INI which basically allowed:

AISKIP_TESTMODE_ON=TRUE
AISKIP 1CD Q-32PassKB > xxxx
AISKIP 2CD Q-32PassKB > xxxxx

Just to be clear, If the Q32 pass was bigger than xxxx then you would instantly negate any more predictive Q passes and increment target media by 1 (meaning 2 becomes the target), if bigger than xxxxx then you would increment target media by 2 (meaning 3 becomes the target). Hmmm, am I getting fuzzy again?

This would save a ton of predictive passes for the file size based methods for the advanced user. Actually, eventually if this pans out, I guess I am asking for an "AI" mode to go along with the AUTO and the "?". For testing purposes, we could just do this in the INI and set the GUI to "1" so as not to cause you a lot of work. What are your thoughts?

Hmmm, the sample size is a slight bit of sand in the oil. I guess people using this method would understand they would always have to use the same sample size for this to work, or unless you think it viable to extrapolate from a 1% in the INI to whatever sample size they used. I would think that would have a bigger error margin though.

tylo
17th August 2003, 18:49
I now think the AI thing I was looking for in your file-size methods could be easily achieved if you would put some special test settings in the INI which basically allowed:

AISKIP_TESTMODE_ON=TRUE
AISKIP 1CD Q-32PassKB > xxxx
AISKIP 2CD Q-32PassKB > xxxxx

Just to be clear, If the Q32 pass was bigger than xxxx then you would instantly negate any more predictive Q passes and increment target media by 1 (meaning 2 becomes the target), if bigger than xxxxx then you would increment target media by 2 (meaning 3 becomes the target). Hmmm, am I getting fuzzy again?
No, this is pretty clear to me, and very good idea! :D In fact it's so easy to put in that i'll do that right away!

This would save a ton of predictive passes for the file size based methods for the advanced user. Actually, eventually if this pans out, I guess I am asking for an "AI" mode to go along with the AUTO and the "?". For testing purposes, we could just do this in the INI and set the GUI to "1" so as not to cause you a lot of work. What are your thoughts?I don't see how it can be used for the AUTO mode - only the "?". The AUTO mode computes the num CDs directly from the WorstQ-PassKB size - it doesn't test each num CDs...

Hmmm, the sample size is a slight bit of sand in the oil. I guess people using this method would understand they would always have to use the same sample size for this to work, or unless you think it viable to extrapolate from a 1% in the INI to whatever sample size they used. I would think that would have a bigger error margin though. You are talking about the sample percentage I assume? Yes I think it is viable to just divide the size of the actual percentage used (like normalizing) before testing. It will actually have a lesser error margin (e.g a 2% sample test size / 2 is a more accurate 1% sample pass size, that a true 1% sample pass produces...)

BTW: I am just about to release a new intermediate version now. It has a much improved "?" function already. Adds an extra CD if oversizing before mux and cut (much requested). Also reduces and equals out image sizes if it cannot fill CDs completely.

r6d2
18th August 2003, 02:36
Originally posted by tylo
No, this is pretty clear to me, and very good idea! :D In fact it's so easy to put in that i'll do that right away!

@Tylo
It is easier than you think, I guess. It is already implemented (sorta). I PMed you on this on Aug.13. I post it here now for if there is anyone who whises to try.

My other idea is this. You set your desired Q as worst_q. In my case, 30. You set your really_worst_q on 44, in my case.

When conducting a binary search in auto mode, you start by searching with target=30 (30 is the maximum of your binary search).

When in range mode, or in "?" mode, you only search on the [1, 44] range.

With really_worst_q enforced like this, you just have to put max and min to the spec values [300, 2530], and you'll find the Q faster. More important: the Q will always be adequate to your taste and the outcome BR is just a result you'll have to trust even if it is ridiculous! The max and min parameters can still be used, but this approach completely confines them to spec values.

DDogg
18th August 2003, 18:50
It is easier than you think, I guess. It is already implemented (sorta). Yes, I see what you mean. Also, if one wanted to accept the programs choice of the number of CDs they would be using the Automode anyway. While I still think the technique I mentioned above has merit, I don't think it belongs in Tylo's plug-in, certainly not in sizing mode!

r6d2, changing the subject slightly, do you agree that the second conditional sizing pass is highly desirable? If so, I hope it is implemented as soon as it can be.

r6d2
18th August 2003, 19:37
Originally posted by DDogg
r6d2, changing the subject slightly, do you agree that the second conditional sizing pass is highly desirable?
Absolutely. I had suggested some weeks ago to go for a second OPV pass, conditionally:
Quoting myself :)
You might even improve the method by using the current binary search for a first OPV pass, and then correct with the real Q for the whole movie and obtained BR, using a simple proportion.

Then you do a second OPV with much more precision, and filling the CDs to the edge or getting really, really close (it would be a 100% sample, so to speak ).
But probably it would be better to stick Multipass, as you suggest. It is 0% risk of odd-sizing and with comparable quality if you reuse the VAF.

DDogg
18th August 2003, 23:07
Yeah, I remember trying to figure out what you meant when you posted that, but stopped when my eyes started crossing :p

Like you said, I think the standard BR based pass for the second pass is really the easiest way to get where we want to go.

tylo
19th August 2003, 07:48
Ok, I actually started to implement the AISKIP thing, but I suddenly realized that I was wasting my time. (I should have learned by now not to jump on things too fast). Setting such limits translates to the same thing as setting a really_worst_q ultimately - just as r6d2 saw.

I must confess I didn't take the time I should have to understand r6d2 suggestions. The Aug.13. post is the sensible way to implement the "?" functionality. As you (r6d2) suggested in another post (I think), we can start a test with the really_worst_q, and use the size found as sort of AISKIP limits. This is basically what is done with worst_q in Auto mode, but here we go for the optimal (realistic) number of CDs directly, giving no user choices.

- On the other subject, I was thinking of supporting an optional second-pass (multipass), reusing the vaf file, as you mentioned.
- Then support for the internal RoBa method (but finding a good initial Q by binary search).
- Third. If I'm not fed up with the plugin, I may put audio encoding after the video encoding. We can adjust the audio bitrate in various ways, depending on the size of the video created.

New subject: I am thinking about removing the 'Bitrate Tweaking' fuctionality. It doesn't really belong here, and I don't think many is using it. As I have said before, cutting credits with frame selection (or chapters) is often a better alternative. Couldn't the tweaking also be done by an Avisynth script? E.g: Add a filter that make the bitrate drop after a certain number of frames?
I need feedback on this one.

DDogg
19th August 2003, 14:38
- On the other subject, I was thinking of supporting an optional second-pass (multipass), reusing the vaf file, as you mentioned. That adds a lot of bang for the buck as, I think, it would only take a small amount of effort? With the conditional, it turns the plug-in into a true RoBa process, but one that is hybridized as the pass is only done if needed.- Then support for the internal RoBa method (but finding a good initial Q by binary search). I think this calls for some thought and discussion. First, I would suggest we forget the plug-in for a moment and concentrate discussion on any weaknesses of the Internal RoBa process of D2S. In other words, is it broken and do you need to fix it? If it is broken in any way, who can best fix it, D2S or an external Plug-in?

Isn't it true that the only weakness of the D2S internal process is if the equivalent bitrate of the initial Q for the OPV pass is over 50% off from the bitrate actually needed? Yes, I am not very clear on that. If that is so, I would think if D2S did just one short measurement pass that would no longer be an issue. [edit] Here is the quote from Bach on that subject-- Decision: Calculate video average bitrate (CAVG) necessary in order to fit 2 CDs.
c) do multipass reusing vaf from first pass and using CAVG.
WEAKNESS OF ROBA: if CAVG > 2*(1st_pass_mpv_size/time_length) or CAVG < 0.5*(1st_pass_mpv_size/time_length), you MUST recreate the vaf file in order to do the multipass encoding. [Add:] This brings up a question. For discussions sake, let's say an encode is correctly sized with a OPV Q of 48. Let's also say we have set the first Q pass in D2S internal RoBA to 32. The second bitrate based pass will size it correctly for us and the bitrate will be equivalent to the Q 48 pass. The question then is: would we gain anything if we had used the Q 48 as the Q of the first pass in the internal D2S RoBA process. My understanding is we would not, and in fact may lose quality although it may be the same. Anybody got any comments on this?

- Third. If I'm not fed up with the plug-in, I may put audio encoding after the video encoding. We can adjust the audio bitrate in various ways, depending on the size of the video created. No comment except to suggest you may be opening a can of worms for yourself and you might end up losing all your hair (assuming you have any :)).
I am thinking about removing the 'Bitrate Tweaking' functionality. Maybe some folks use it. With the D2S frame selection so easy to use, I certainly don't and can't imagine doing so. I do understand your inferred suggestion that some users might not like to cut any of the credits and might prefer to just use a lower bitrate on them. Sounds good, but would it really be worth the effort and would anybody actually use it? Dunno.

What the bitrate tweak section does do is use up a lot of valuable "real estate" on your interface. That space might be better used to more fully differentiate between the two radically different methods available in your plug-in (Quality based and Sizing based). I know that caused me a lot of confusion and I am sure many others.

r6d2
19th August 2003, 17:55
Originally posted by DDogg
This brings up a question. For discussions sake, let's say an encode is correctly sized with a OPV Q of 48. Let's also say we have set the first Q pass in D2S internal RoBA to 32. The second bitrate based pass will size it correctly for us and the bitrate will be equivalent to the Q 48 pass. The question then is: would we gain anything if we had used the Q 48 as the Q of the first pass in the internal D2S RoBA process. My understanding is we would not, and in fact may lose quality although it may be the same. Anybody got any comments on this?
What OPV does, attempting to quote a Bach post which unfortunately was not recovered, is this:

1. Encode a frame with desired Q.
2. If resulting BR > MAX, forget Q and BR and adjust to MAX.
3. If resulting BR < MIN, forget Q and BR and adjust to MIN.
4. Repeat from 1.

I tend to think from the above that using the correct Q, or a nearly correct Q from the start will give you a better encoding, since there would be less "forget Q" frames.

Again, I may be terribly wrong. But I invite anyone to rip apart this logic to continue for the search of the Holy Truth :)

What the bitrate tweak section does do is use up a lot of valuable "real estate" on your interface. That space might be better used [...]
@Tylo, I think (IMHO) the credits stuff adds generality to the tool. If you are concerned about keeping the GUI clean, you might want to implement an "Advanced" button, or even better: follow D2S's equivalent parameter.

Don't worry about using a bigger window either to accomodate for more optios and modes. DDogg and I will give the users, sooner than later, a good guide for no brainers, whose only requisite is being able to understand what you read. ;)

Besides, even though frame selection does the job, it requires you to wait for DVD2AVI to finish, and that is not ideal for multiple batch encoding.

DDogg
19th August 2003, 18:16
I tend to think from the above that using the correct Q, or a nearly correct Q from the start will give you a better encoding, since there would be less "forget Q" frames. This then becomes the pregnant question that we have to get the right answer to. I sent off a PM. Maybe I can get an answer and/or opinion.Don't worry about using a bigger window either to accomodate for more optios and modes. DDogg and I will give the users, sooner than later, a good guide for no brainers, whose only requisite is being able to understand what you read. Disagree :). Docs have to be read. An interface should be intuitive and not require reading to understand basic functionality, in this case that is defined as two completely different methods combined in such a way as to not be clearly differentiated.

r6d2
19th August 2003, 18:48
Originally posted by DDogg
[B]This then becomes the pregnant question that we have to get the right answer to. I sent off a PM. Maybe I can get an answer and/or opinion.
Send my warmest regards to God when you see him ;)

Docs have to be read. An interface should be intuitive and not require reading to understand basic functionality, in this case that is defined as two completely different methods combined in such a way as to not be clearly differentiated.
Disagree :). For instance, D2S interface is not intuitive. You must read a guide to learn to tweak the tool. On the other side, D2S (him) managed to set it up in such a way that if you know nothing, dislike to read the docs and even have a hard time with readmes, the default values will do a great job anyway.

Software Engineering must balance usability with powerness. The KISS concept is crucial for starters, but you must also take into account power users and the evolution of your tool. An approach with Advanced mode seems to me the best deal, just like D2S (him) chose to do.

DDogg
19th August 2003, 19:56
Software Engineering must balance usability with powerness. The KISS concept is crucial for starters, but you must also take into account power users and the evolution of your tool. An approach with Advanced mode seems to me the best deal, just like D2S (him) chose to do. I don't disagree with that at all and the advanced tab is a good option if Tylo feels like messing with it. However, you said it yourself. "...Kiss is crucial for starters". When you have two completely opposite methods (Quality based and Sizing based) mixed together "without notice", so to speak, you do not even remotely adhere to the KISS GUI system that basically says 60-75% of the functionality should be readily apparent, usable and understandable within 5-8 minutes of first use. Anyway, Tylo can take the suggestions or leave them, so let's not beat it to death and get too off topic :)

r6d2
19th August 2003, 20:17
Originally posted by DDogg
When you have two completely opposite methods (Quality based and Sizing based) mixed together "without notice"
I agree with you here on the different methods stuff, they are for different audiences. I tend to think that starters are quality oriented (you are just too affraid to screw up your encoding). Then, when you get more confident, you get also mode daredevil and begin to be cheap with CDs.

If Tylo would like to take this approach, I'd default to quality based mode in the eventual new GUI.

tylo
19th August 2003, 21:27
I'll respond later. Here's a new beta release.
http://home.no.net/tylo/setup_D2SRoBa248beta.exe

/Edited:
Nothing new in the GUI, or second-pass stuff yet, but:

- creates extra image for the oversized part (often only credits)
- if bitrate > max: equals out images sizes, shows fillrate.
- "?" mode: uses 'really_worst_q' to estimate lowest numCDs to test.
- auto mode: searches only within 0 .. Worst Q
- removed N-M ranges (replaced by "?")
- removed special high/low bitrates limits for "?" => uses D2S min/max
- default really_worst_q=128 now (maybe too high)

Not well tested, so beta - please test.

DDogg
19th August 2003, 22:54
r6d2, here is the answer from god (slightly edited) :)

The quote [from r6d2] is correct. I have tested your hypothesis at the time I formulated the nowadays so called 1pass-Bach method. My conclusion was that the quality of the encoding increases when I do the first pass of (internal) RoBa method using the Q value closer to the correct one. The difference is not high, though. It is most noticeable when you have a lengthy still scene.
The reason? Well, I think only the CCE coders themselves could explain with 100% of sureness (is there such word in english?), but r6d2's guess (the "less forget Q" thing) is a good guess.

Anyway, CCE's manual gives us a hint: "if you change the average bitrate of a given encode by twice or half of its previous value, it is mandatory to create a new .vaf file".

In your example, lets suppose the calculated bitrate for Q=32 is 1.5 times bigger than the target bitrate (the one which you achieve with Q=48). You are not in the region which CCE's claims you should discard the vaf file. However, since there is a previous_bitrate/target_bitrate ratio (<0.5 or >2.0) for which the already created .vaf is simply useless, this means that the farther you get from the previous_bitrate/target_bitrate ratio=1 , the worse the re-usage of your .vaf is. [edited sentence structure - hope I got it right]

This most probably is not a linear correlation, so that if ratio is something between, say, 0.9(?) and 1.1(?) it is not possible to realize any loss.

r6d2
20th August 2003, 22:07
@Tylo,

Your safe zone stuff made me start thinking about the application of Newton's method to find roots for an equation and its possible use to D2Sroba finding of Q. Here you are.

We have bitrate as a function of Q, BR(Q), a function which is unknown to us, but we suspect it to be linear in some range and curve in others. What is clear is that it is a continuos function and with a negative slope.

Let's define

f(Q) = BR(Q) - Target_BR

Our goal is to find Q for which f(Q) = 0. Let's define x = Q.

Newton's method states that you can find a root by iterations with the following formula:

x(n+1) = x(n) - f(x(n)) / f'(x(n))

where f'() is the derivative of f(). Since we don't know f(), we cannot calculate f'(). However, f'() can be aproximated by:

f(x(n)) - f(x(n-1))
f'(x(n)) = -------------------
x(n) - x(n-1)

If we replace the above formula in Newton's, we have that:

x(n) - x(n-1)
x(n+1) = x(n) - ------------------- * f(x(n))
f(x(n)) - f(x(n-1))

This method requires you to do 2 blind searches before iterating (for instance, n=1 with Worst_Q and n=2 with Really_Worst_Q). Then you stop when the error, calculated as |f(x(n))| < E, is adequate. E can be set to 1% or any value you choose.

It converges very fast. I did some tests using as seeds x(1)=Worst_Q and x(2)=Really_Worst_Q, and the results are incredible. I found the target Q in 4 tries, no matter what seeds I fed in.

I hope this is not too technical, you might want to try it yourself and hopefully implement it instead of binary search. If you have questions please don't hesitate to ask.

tylo
21st August 2003, 07:40
Thanks, r6d2.
Yes, the Newton-Raphson method would probably work better than the current (optimized) binary search, but not much - maybe one test less on average.

For the fun of it, and that we probably find Q reliable after (hopefully) 4 iterations, I'll implement it when there is time.

Ps: I knew the Newton-Raphson method, but somehow forgot how great that method is. Here's a fine link to it:
http://www.sosmath.com/calculus/diff/der07/der07.html

/Add: The error from the root (zero) to be found in the N-R method, is messured based on the f'(x). But when f'(x) is only approximated, the error may also be wrong. When you hit Q with very few iterations, it may actually be the wrong Q, if your unlucky...

r6d2
21st August 2003, 13:22
Originally posted by tylo
Yes, the Newton-Raphson method would probably work better than the current (optimized) binary search, but not much - maybe one test less on average.
Actually, is converges in 3 to 4 tries, and it does so regardless of Really_Worst_Q. Those guys on the 2 digit range will really appreciate it, but it would be better to everyone.
/Add: The error from the root (zero) to be found in the N-R method, is messured based on the f'(x).
The error E I'm talking about is the absolute value (modulus) of f(x(n)) (remember f() is the delta from the resulting BR and the target BR)), divided by target BR, hence the percentage.

There is no error this way or possibility of being unlucky if the slope of the function does not change sign, which in our case it does not.

Also, for Internal RoBa, 3 tries will always produce an adequate Q, if you plan to support it.

telemike
21st August 2003, 13:41
Tylo-

can you make a version of your plugin that does this:

1. Calculate the number of CD's based on a worst user specified "Q" like you do now by stopping DVD2SVCD.

2. Push the "Q" value calcualted and OPV bitrates back into DVD2SVCD.ini and DVD2SVCD.d2s files.

3. Restart DVD2SVCD from recover, DVD2SVCD then uses the new values that were written into the files.

Why?

Well, it might be an easier solution for some of us.

tylo
21st August 2003, 15:07
@Telemike!
AFAIK, this is what the D2SRoBa plugin does now. Please, be more accurate.

By 'OPV bitrate', I guess you mean the target bitrate for that Q. Do you want to do a final OPV or a multipass VBR encoding?

I'm only guessing here: Do you want that the plugin should restart D2S from the 'Video Encoding' phase in order to do the multipass VBR, rather than do the video encoding itself (and start D2S from the 'Mux/Cut' phase)? The only problem with the current way is that my own size estimation isnt as accurate as D2S's. However, I may change to the described approach. (way earlier versions worked that way).

telemike
21st August 2003, 15:46
Here's what I mean-

1. DVD2SVCD does it's thing until video encoding.
2. d2sroba calculates the Q
3. Instead of calling up CCE from d2sroba, push the values back into dvd2svcd's dvd2svcd.ini an dvd2svcd.d2s files, re-start dvd2svcd from the encoding phase with the new calculated values.


I do all mine as 1-pass VBR OPV. I think it might be "cleaner" to have dvd2svcd handle CCE.

What would be REALLY NICE is to have the programmer DVD2SVCD integrate TYLO's plugin into DVD2SVCD as an internal routine.

kru
21st August 2003, 16:53
Sometimes D2SRoBa seems to work to fast when addeng the first AVS file too CCE and save the .ecl file.

Encoding takes several hours, why not add a couple of seconds when D2SRoBa loads / save files to make the program safer?

What about:
; Add modified avs file...
RightClick, 100, 130
sleep, 2000
Send, a%g_robapath%.avs{ENTER}
Sleep, 2000

or:
; Add modified avs file...
RightClick, 100, 130
WinWaitNotActive, %w_title%
sleep, 500
Send, a%g_robapath%.avs{ENTER}
WinWaitActive, %w_title%
Sleep, 2000

:sly:

r6d2
21st August 2003, 17:31
Originally posted by telemike
I think it might be "cleaner" to have dvd2svcd handle CCE.
@Telemike,

Your suggestion works only in D2S's Multipass, since D2S's OPV sets Max=Predicted. Tylo would have to fix this too, maybe it is possible (he has already in his own OPV passes).

However, I also sustain the theory of the plugin to be as much compliant as possible with D2S to be compatible with future enhacements. In fact, Tylo and I have exchanged some PMs and posts on the matter but I think it has become a religious topic. ;)

Anyway, a possible solution to D2Sroba's imprecise calculation of target bitrate (error which systematically affects all calculations thereafter), might be the following:
Let D2S start, as currently does. It will calculate BR and number of CDs taking everything into account: multiple audio tracks, subs, muxing parameters (scan offsets, etc.), frame selection, frame rate... Everything. This data is not as precise as FitCD, but much more precise than the plugin's bbmpeg_overhead=1.0235 and bbmpeg_cutoff=380000 parameters.
Let D2S start CCE.
Abort CCE.
Get the target BR and number of CDs D2S calculates. Even though this data is based only in movie duration (disregarding compressibility), you can use it to extrapolate the target BR for any number of CDs like this:

Available_BR_per_CD = D2S_target_BR / D2S_number_of_CDs
Then, in D2Sroba, we have that:
Target_BR_for_CDs(n) = Available_BR_per_CD * n
Have D2Sroba calculate all its stuff with these values.

It is just me or this stuff makes sense and would save a lot of hassle?

telemike
21st August 2003, 17:59
Get the target BR and number of CDs D2S calculates. Even though this data is based only in movie duration (disregarding compressibility), you can use it to extrapolate the target BR for any number of CDs like this:

Yes! Exactly!

Have the plugin grab the number of cd's from dvd2svcd!

I have had some problems when it comes to muxing and the images don't split correctly. For example, the first images cuts at 795mb but the second runs to 1120MB.......It should cut at 795 and make 3 images...
:D

DDogg
21st August 2003, 18:36
hmm, before poor old tylo gets all that thrust upon him I would suggest waiting for a few days (defined as "real soon now" :) ). A beta release candidate is forthcoming and will have the OPV BR changed back to Min/Max bitrate as it is in the internal RoBa process.

The next release after that should have a lot of this stuff incorporated internally. Certainly as it pertains to correctly identifying the close approximate Q for the RoBa OPV pass and perhaps including a sizing mode as is presently done for TMPG CQ mode. The Newton's third law of pecker measurement from r6d2 may come in handy for that phase.

Again, IMO, the best intermediate measure is adding the conditional sizing pass into D2SRoBA.

[/Add] Presently I use D2SRoBa 1% passes to give me the approximate correct Q. Then I restart D2S and use the Internal RoBa process with just 1 pass (set RoBa Visibel=1 in dvd2svcd.INI to turn it on, and yes that spelling is what he uses. The new choice will then become available under CCE in the encoder tab).

This gives me the best of both worlds because I don't mind the additional pass which Tylo has worked so hard to save us from.

greenphantom
25th August 2003, 01:11
Originally posted by tylo
I'll respond later. Here's a new beta release.
http://home.no.net/tylo/setup_D2SRoBa248beta.exe

- default really_worst_q=128 now (maybe too high)

Not well tested, so beta - please test.

Glad to see the new one allows a higher Q ;) I didn't realize the previous version had a max. of 112 and I ran into a problem during my first test (see below). I'm going to give the beta version a try now.

I just ran my first test with the D2SRoBa 2.4.6 plug-in yesterday and the results were a bit puzzling. It produced a very high Q (112) and a file that was about 15% too big to fit on one cd, yet the quality was absolutely fantastic despite the high Q.

I tried backing up CD 1 from a History Channel WWII documentary I have on DVD and it's 98 min. long. I've seen some surprisingly good 1-cd svcd encodes lately so I thought I'd give it a try myself. Here's what I used:

* D3SRoBa 2.4.6
* CCE 2.67.00.11 with EclCCE 1.6 & AviSynth 2.5.2
* DVD2SVCD ver. 1.1.3 build 2
* MY_SemiAutoCropAndResize_MA script (2.5.2)

With a 128kbps audio encode, I used FitCD and found that the video bitrate should be around 960kbps. I then ran the plug-in and ended up with a video file that was 845MB with a Q of 112. I was surprised that even though the Q was so high, the quality was FANTASTIC! I cannot stress this enough! I've watched hundreds of svcd's and the quality of this one was virtually indistingishable from the original dvd. However, I should mention that it didn't have a lot of motion; as it was a documentary, there were a lot of still images on the screen with background narration along with interviews etc. and the occasional clip of a battle scene.

Anyway, because the maximum Q was reached, the plug-in didn't seem able to find a bitrate low enough so the file would fit on one CD. Perhaps I didn't do something right (entirely possible, since it was my first try!) but I'm hoping it'll work this time with the beta version. I just thought I'd post the results of my first experiment since (a) it demonstrates the need for the higher maximum Q, and (b) it shows that, at least for certain types of footage, excellent quality results can be obtained despite a Q that's over 100.

P.S. Thanks to Fastchef & Homerjay for helping me get this far :)

[EDIT - Sorry for the newbie question, but do I need to set the avg. bitrate in DVD2SVCD when using the plug-in? I assumed it would find both a recommended Q and avg. bitrate to use, but I just noticed in the log below that it made a note of the bitrate that was set in DVD2SVCD ("Bitrate: 1000") - I would have filled in a lower value here (the one recommended by FitCD, around 960kbps or so) but didn't bother since I thought the plug-in would take care of it. That must be why I ended up with a file that was slightly too big... Doh! :rolleyes: ]

========================================================
D2SRoBa v2.4.6 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-08-23 21:12:02
--------------------------------------------------------
Settings:
- CD size : 800
- Number of CD's : 1
- Worst Q. factor : ---
+ One pass VBR Robshot/Bach : 1
- Sample percentage : 2.5
- Sample GOPs : 1
- Adjust Q. : 0.8
- Safety Zone : 34
+ Do credits bitrate tweak : 0
- Start time : 0:00:00
- Bitrate : 1000
--------------------------------------------------------
- Movie length : 01:38:15 (176700 frames, 29.97 fps)
- Audio size est : 94334335. bytes (128 + 0 kbps)
- CD user data size : 834286496. = (800 - 4)*1024*1024 - 380000
- SelectRangeEvery : every 600, select 15 frames
- Num. sample frames : 4425
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 720796585. (978 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1575832244. (Q=32, 2138 kbps, 39462692 sample sz)
- Estimated mpv size : 1394226014. (Q=48, 1891 kbps, 34914828 sample sz)
- Estimated mpv size : 1112274309. (Q=80, 1509 kbps, 27854068 sample sz)
- Estimated mpv size : 1003548982. (Q=96, 1361 kbps, 25131320 sample sz)
- Estimated mpv size : 953061899. (Q=104, 1293 kbps, 23867000 sample sz)
- Estimated mpv size : 929311981. (Q=108, 1260 kbps, 23272244 sample sz)
- Estimated mpv size : 918136715. (Q=110, 1245 kbps, 22992388 sample sz)
- Estimated mpv size : 912743791. (Q=111, 1238 kbps, 22857336 sample sz)
--------------------------------------------------------
- Determined Q. : 112
--------------------------------------------------------
Replace values in ecl file:
- opv_q_factor : 112
- opv_brate_max : 967 ==> 2530
- vbr_brate_avg : 6000 ==> 978
--------------------------------------------------------
- Encoding Movie
- 2003-08-23 22:27:52
--------------------------------------------------------:rolleyes:

r6d2
25th August 2003, 01:33
Originally posted by greenphantom
I just ran my first test with the D2SRoBa 2.4.6 plug-in yesterday and the results were a bit puzzling. It produced a very high Q (112) and a file that was about 15% too big to fit on one cd, yet the quality was absolutely fantastic despite the high Q.
Hi, @greenphantom,

My bet is this happened because the Q for that encode is indeed higher than 112. The plugin, in its current form, will let you encode up to 300 if you wish. Try setting the Really_Worst_Q parameter on the ini file to say, 150, and it will find a Q that will fit better.

Though I cannot see how a Q higher than 60 may end up being terrific, the plugin will do its job.

Regards,

r6d2
26th August 2003, 15:31
Originally posted by DDogg
Certainly as it pertains to correctly identifying the close approximate Q for the RoBa OPV pass and perhaps including a sizing mode as is presently done for TMPG CQ mode. The Newton's third law of pecker measurement from r6d2 may come in handy for that phase.
[/Add] Presently I use D2SRoBa 1% passes to give me the approximate correct Q. Then I restart D2S and use the Internal RoBa process with just 1 pass (set RoBa Visibel=1 in dvd2svcd.INI to turn it on, and yes that spelling is what he uses. The new choice will then become available under CCE in the encoder tab).
For those of you willing to play with other convergence methods, I've posted a simulator in:

http://forum.doom9.org/showthread.php?s=&threadid=60191

tylo
28th August 2003, 15:40
New beta out: v2.5.0 beta1

http://home.no.net/tylo/
Go get it!

Aside from support for internal DVD2SVCD RoBa encoding, this version should have some significant advances in that it takes all the estimated available bitrate/space values from DVD2SVCD. E.g. the bitrate tweaking should use exactly the same bitrate as a regular multipass run would have given.
Many other fixes have been made too. :D

/Add: A small downside of this version: You may not open CCE manually (e.g. to configure it), when D2SRoBa is running (in "wait mode"). :p

/Add: When using the 'X-pass RoBa' (with CCE 2.66+), remember to modify RB's progressive template, such that it uses existing vaf. (edit: comment deleted).

homerjay
28th August 2003, 15:47
will do tylo sir - thanks

notice 2.4.8 didnt come up with an error when i had left misc on avi
thought my luck was in :rolleyes: warning is back now in 2.50 b1:(

r6d2
28th August 2003, 16:19
Originally posted by tylo
New beta out: v2.5.0 beta1
Thanks, Tylo! Are you supporting equally sized images yet? If so, we need to update the docs again ;)
/Add: When using the 'X-pass RoBa' (with CCE 2.66+), remember to modify RB's progressive template, such that it uses existing vaf. (it set it to 'Create new' by RB).
I think you must do the opposite, set it to "Use existing" :confused:

DDogg
28th August 2003, 16:59
Wonderful news, Tylo! I was worried we had driven you nuts and you had jumped off a cliff or something :) I see now you have had your head down coding.

A couple of things: I typlically have edit script on. I hope you might be able to flip the variable after the initial edit and then potentially change it back after D2S is restarted in RoBa? If not, it requires three edits and mistakes can be made easily.

Also, I noted one must have RoBa preselected in D2S before stating your process? That's fine so long as people know it. I got the impression you were flipping that yourself. Maybe because I am using the new RC and there is several different INI files instead of just the one SVCD.ini.

/ADD: maybe provide a reg file with the proper RoBa Template? As r6d2 said, the template must be set to use existing VAF, unless you are doing something I don't understand.

/ADD2: Creating templates. So simple it is confusing as hell. Select the standard template so that it is checkmarked, now just select it again and the template manager will come up. Change the name and the settings, then select "add". You will now have a new template available in CCE and D2S. If you want to modify the template, click twice on it in the dropdown, then make changes and select "replace"

tylo
28th August 2003, 19:39
Thanks, Tylo! Are you supporting equally sized images yet? If so, we need to update the docs again
Yes, equally sized images are supported - and yes it must be added to doc.
Wonderful news, Tylo! I was worried we had driven you nuts and you had jumped off a cliff or something I see now you have had your head down coding.Ah, well, I got the flu real bad, so I was pretty delirious. Perfect time to do a bit of coding. I feel better now. :) The plugin should set the RoBa mode in D2S - I guess the RC has changed the key or ini-file name.
I have also thought about just installing the template into CCE, and let D2S select it, but it's maybe not a task for this plugin. Good documentation would do.
I quote: remember to modify RB's progressive template, such that it uses existing vaf - (?) maybe bad english, but it means that the template should use the existing vaf. :sly:
As usual, please report long errors by PM, others here.
Cheers.

r6d2
28th August 2003, 20:29
Originally posted by tylo
Ah, well, I got the flu real bad, so I was pretty delirious. Perfect time to do a bit of coding. I feel better now. :)
If you had used Newton's method to beat the flu it would have taken you half the time! :D:D:D
The plugin should set the RoBa mode in D2S - I guess the RC has changed the key or ini-file name.
It works for me. As you say, the RC must be the cause.
remember to modify RB's progressive template, such that it uses existing vaf - (?) maybe bad english, but it means that the template should use the existing vaf. :sly:
You're right. The parenthesis stuff confused me.

I see you removed my GOPs variable :( Well, my research was not getting anywhere on sampling better anyway

On another topic, just a matter of taste, but I would not have left out pure multipass. Remember internal RoBa is "not for everyone" yet, as is unsupported by DVD2SVCD.

tylo
28th August 2003, 21:08
If you had used Newton's method to beat the flu it would have taken you half the time!Hehe, yeah it might have. :p

- You may still change the GOPs in the ini file.
- Yes, pure multipass should probably still be there. Then the plugin just add a better way to select number of CDs (also automatic). Next time.
DDogg:I typlically have edit script on. I hope you might be able to flip the variable after the initial edit and then potentially change it back after D2S is restarted in RoBa? If not, it requires three edits and mistakes can be made easily. Hmm. please elaborate.

- About the multipass D2S RoBa: Haven't tested much, but D2S seems to increase the bitrate in the second pass, so it oversizes. Anyone else seen this?

DDogg
28th August 2003, 21:16
Well the new release is finally out so you can check the new INI structure. Sticky in regular forum.

/Add:
Re the edit script, I normally keep "edit as part of video encoding" checked in the frameserver tab. I typically use this when doing a lot of restarts testing new setups. It was not a problem before, but now, there is an initial close and restart which brings back up the edit dialog, then after you find the Q, another restart of D2S brings it up again.

I was hoping you could flip that setting in the ini before you kill d2s the first time, then once the D2S internal RoBa has been started up for the full encode, flip it back in the ini so it will be in the same state as it was before using the plugin.

Hmmm. or will that just cause D2S to create a new script from the template? I guess I could just leave it as "edit after dvd2avi is finished". Then it would use it without the edit screen popping up. That makes it harder to do on restarts, though.

r6d2
28th August 2003, 23:14
Originally posted by tylo
- Yes, pure multipass should probably still be there. Then the plugin just add a better way to select number of CDs (also automatic). Next time.
Perhaps removing the ranges was not a good idea. I'm trying The Two Towers now and the plugin keeps on looking up to 4 CDs, which makes no sense. You know from experience that 1-2 and 2-3 are likely useful.

You know what? You might implement "?" mode to try only n and n+1 (where n is the suggested size based on Maximum Q). That would do, for those without "experience" ;) (That way you can leave the ranges out, which might probably confuse newcomers anyway if reinstated.)

r6d2
28th August 2003, 23:49
Originally posted by tylo
- About the multipass D2S RoBa: Haven't tested much, but D2S seems to increase the bitrate in the second pass, so it oversizes. Anyone else seen this?
The cause of this, believe it or not, is the Adjust Q and the imprecision of sampling.

You know that the sample may underestimate. When D2S encodes, as it is not aware of your plugin, it thinks the Q.factor it receives is "the exact one". Then, based on the resulting MPV size of first OPV pass, it recalculates the number of CDs. If you're not lucky, he will think more is needed (by a bunch of bytes, remember that?).

When (and if) D2S supports a Q search internally, it will know the number of CDs must not be reacommodated.

A workaround on the meantime is to increase Q a bit manually (it sucks), or by setting Adjust Q to a negative value (it also sucks, but should work), I don't know if your plugin currently accepts a negative value here.

The other option is D2Sroba to do the second RoBa pass.

telemike
29th August 2003, 00:17
Excuse my stupidty-

But how do I download the new beta?:confused: :confused:

/add

DOH! my stupid browser cache!!!!!!!!!!!!! :rolleyes:

telemike
29th August 2003, 12:31
For the new beta version, what settings do you reccomend for the bitrate tab?

tylo
29th August 2003, 15:50
For the new beta version, what settings do you reccomend for the bitrate tab?You mean for the minute - sizes stuff? For the 1-pass RoBa it is not used, so it doesn't matter. For X-pass D2S RoBa, currently I override the sizes to ensure that bitrates for each num always are below the SVCD standard. I don't want D2S to truncate the bitrates to MAX (2530). Not sure if I need to do that, though? - So, the settings don't matter.
You know what? You might implement "?" mode to try only n and n+1 (where n is the suggested size based on Maximum Q). That would do, for those without "experience"Seems smart. If you choose a high Maximum Q, it is for a reason: You want the number of CDs for that Q, or maybe one more - but not yet another. Easy fix.
- A workaround on the meantime is to increase Q a bit manually (it sucks), or by setting Adjust Q to a negative value (it also sucks, but should work), I don't know if your plugin currently accepts a negative value here.
- The other option is D2Sroba to do the second RoBa passSo what you're saying is that the D2S's algorithm must use a Q that gives a bitrate just below the target bitrate (or a few higher - less optimal), but if you give a lower initial Q, it will fail? - In that case, both of your options are viable. Hm.
BTW: the plugin should accept negative adjust Q.

DDogg
29th August 2003, 16:17
So what you're saying is that the D2S's algorithm must use a Q that gives a bitrate just below the target bitrate (or a few higher - less optimal), but if you give a lower initial Q, it will fail? - In that case, both of your options are viable. Hm.r6d2, are you sure you are not full of beans? (I'm grinning when I say that). I have not had a problem. Also, would we not need to know what D2S is doing (algo) to know? Maybe he will post here and tell us.

r6d2
29th August 2003, 16:19
Originally posted by tylo
So what you're saying is that the D2S's algorithm must use a Q that gives a bitrate just below the target bitrate (or a few higher - less optimal), but if you give a lower initial Q, it will fail? - In that case, both of your options are viable. Hm.
Actually, any Q giving within +/-10% of the target BR is good enough for RoBa (higher imprecision would require more than one additional pass for an optimal encode).

The problem is not D2S "fails" since it does exactly what it is supposed to. The problem is that it doesn't know the number of CDs is already correct.

The negative Adjust Q will fix this "unawareness" for the case of underestimation.

DDogg
29th August 2003, 16:24
OK, I see what you are saying. Maybe tylo could just adjust internally slightly if RoBa is chosen? It would be a drag if the user has to do it as that would change the settings for the other methods and they would have to remember to set them back.

r6d2
29th August 2003, 16:24
Originally posted by DDogg
[B]r6d2, are you sure you are not full of beans? (I'm grinning when I say that).
Just checked. Only one bean and I did not eat it ;)
I have not had a problem.
Me neither, not speciffically this one. Underestimation occurs in about 1 out of 4 cases. I guess Tylo got the one.
Also, would we not need to know what D2S is doing (algo) to know? Maybe he will post here and tell us.
Of course, that would be great. My theory (I should have stated it was that, until proved ;)) is just the result of fuzzy thinking mode. Trying to imagine how the clock works without opening it.

[/Add]I have had another problem though. I received the following message after first RoBa pass: "Sorry, only one instance of CCE allowed".
Maybe CCE is not closing rapidly enough when D2S starts the second pass.

DDogg
29th August 2003, 16:26
arghh, our posts crossed again.

tylo
29th August 2003, 17:00
- OK, my test was one chapter only - then you nearly always get big over/under estimation if not using a high sample %. Yes, the normal Adjust Q shouldn't apply. I'll use 0, or maybe a small negative value.

- I'll put in an extra 'sleep' before starting CCE. btw: I think it's EclCCE who's complaining.

- Found a few bugs in beta1, e.g. I didn't close CCE 2.5 after estimation. Is anyone using 2.50 still? I have also made a fix in order to pick up the right D2S ini file (e.g SVCD.ini) for 1.2.1.b1. However, more testing agains this version must be done.
I'll try to put out a beta2 with the discussed fixes during the weekend.

DDogg
29th August 2003, 18:58
Any chance of getting you to look at the edit script problem I mentioned? I went back and edited that message with more detail as you requested.

telemike
30th August 2003, 03:36
I still use cce 2.50

Haven't upgraded since it works so well for me as is....

tylo
30th August 2003, 11:10
Any chance of getting you to look at the edit script problem I mentioned? I went back and edited that message with more detail as you requested.Yepp, its on my (imaginary) list.

/Result1: The very first edit box can be ignored. I will turn that off.

/Result2: Not so simple. Although I can pick up the Avisynth script that you write, I need to put it in the final pass. (It is regenerated, yes). Have you tried copy paste? Not sure if the clipboard is persistent (edit: it isn't - the plugin changes it
. otherwise this would have worked):

Copy script to clipboard: Ctrl+Home, Ctrl+Shift+End, Ctrl+C.
Replace script from clipboard: Ctrl+Home, Ctrl+Shift+End, Ctrl+V.

Result3: Technically, I think can get hold of the Avisynth script, then programatically paste it into the editor (like described above). There is some work involved, though. :sly:

telemike
30th August 2003, 13:54
Tylo-

Here's somehting I would like added.

My situation: shared computer, mad wife, kills DVD2SVCD in the video encoding phase.

When I want to restart, I would like to plug the Q value D2SRoba alredy calculated without having to go thru the whole process again. Any chance of putting in a Fixed Q value selction? thanks.

tylo
30th August 2003, 14:12
@telemike: hehe, well sometimes life can be tough.

Just restart the plugin but Tick OFF the 'Delete old RoBa files'. Recover the project. It should only take about a minute or two before the main encoding starts (the sample test encodings will not be done again). Good luck. :)

r6d2
30th August 2003, 15:03
@tylo,

My situation: shared computer, mad kids, they play frisbee with CDs.

Can you add a Recover from scratched feature? :)

Seriously... Are you still considering inverting the order of video and audio? It doesn't seem DVD2SVCD is likely to do it. I have some thoughts on the math involved, for if you're interested.

tylo
30th August 2003, 15:14
r6d2: Maybe, but I want to get a good 2.5.0 release before
jumping at that. The first part would be to switch audio/video and get it to work as now. Then put in the math for audio bitrate adjustments.

tylo
31st August 2003, 15:52
Uploaded v2.5.0 beta2. Pretty much fixes all the problems discussed.
@DDogg: Check out the avisynth edit workaround. :cool:

http://home.no.net/tylo/

Siku
31st August 2003, 16:03
@tylo

Is there any plans to include AVI2SVCD support in D2SRoBa? I'd love to see that! :)

Best regards,
Siku

r6d2
31st August 2003, 16:16
Originally posted by tylo
The first part would be to switch audio/video and get it to work as now. Then put in the math for audio bitrate adjustments.
@Tylo,

This DDogg script editing stuff put me in fuzzy thinking mode again. Just an idea:

If you check "Edit when DVD2AVI is done" in the Frameserver tab, you pretty much get the complete AviSynth script D2S is going to use. (Except for the frame selection stuff, I think, but which was already done anyway, so it must be somewhere in the INIs).

So, D2Sroba can read this script, shut down D2S and do the video run before audio very cleanly...

Then, when you already made your mind about how much audio tracks and which size based purely on video quality, D2S can be restarted from "Audio Extraction" and all goes clean. You know the Q for RoBa, you know the audio tracks... Everything. Voila!

No need to mess with a fake audio encoding and such.

Any comments?

tylo
31st August 2003, 18:36
Originally posted by Siku
Is there any plans to include AVI2SVCD support in D2SRoBa? I'd love to see that! :) You're in luck! Many have requested this, but I suddenly realized that the other changes I made for v2.5.0 would also make AVI2SVCD work! Had to do just a few tiny changes. :D

Uploaded v2.5.0 beta3 - new: AVI2SVCD support! (NB: almost untested)
http://home.no.net/tylo/

@r6d2: That is a possiblility, but my guts feeling is that just temporarily plug in a BeSweet.bat which only registers the arguments given to it and make an empty output file, is the cleanest and simplest approach. But I could be wrong.
BTW: Please PM your toughts for the audio math.

r6d2
31st August 2003, 19:01
Originally posted by tylo
@r6d2: That is a possiblility, but my guts feeling is that just temporarily plug in a BeSweet.bat which only registers the arguments given to it and make an empty output file, is the cleanest and simplest approach.
This approach has the indesirable side effect of you having to decide beforehand how many audio tracks you'll take, so they can be extracted. Besides, it begins to be harder for you if you have to support multiple audio BeSweets. I'd rather not dedicate efforts into doing what D2S already does, and does it well!
BTW: Please PM your toughts for the audio math.
Actually, I posted them on the new RoBa Q Finder (v1.2) sheet. Take a look and if they are not clear, PM me.

http://forum.doom9.org/showthread.php?s=&postid=365460#post365460

Siku
31st August 2003, 19:39
@tylo

Awesome! I'm going to test it right away! :D

Regards,
Siku

telemike
2nd September 2003, 02:07
beta3 bug reports:

Using CCE 2.50, D2Sroba luanches another session of the plugin instead of luaunching CCE.:(

r6d2
2nd September 2003, 06:37
Hi, guys,

[Fuzzy Thinking mode ON]

I've been playing with XSVCDs (SVCDs not abiding exactly to the specs).

I've found that if you let Max=9800, the Q function behaves much better in the 1-60 range. It has the shape of a clean negative exponential (even easier to interpolate).

I've found too that even though higher resolutions require more BR, the quantization is exactly the same as in lower resolutions. Look at this table:

Quantization(1) Q for RoBa(2)
Resolution 7 15 30 60 CDx1 CDx2 CDx3
352x480 1,2 1,9 3,6 6,2 57 19
480x480 1,2 1,9 3,5 6,2 31 17
528x480 1,2 1,9 3,5 6,2 34 19
544x480 1,1 1,9 3,5 6,2 38 21
704x480 1,2 1,9 3,5 6,2 55 29

(1) Q.Avg (from BR Viewer) for different Q.factors
(2) Q.factor for RoBa for different number of CDs and indicated res.

This means that for a quality oriented encode with Worst Q=40, if after "?" mode you have, for instance: 2 CDs: Q=31, 3 CDs: Q=17 (line 480x480 above), you see that 2 CDs is the way to go, since the quantization is very low anyway. However, you have another choice: increase resolution.

Lower resolutions are blurry. Higher are sharper. In this case you could even go for 704x480, Q=29 with 3 CDs and get almost a 1:1 copy!

Higher resolutions really rock! We could forget about heavy filtering, motion adaptive stuff, slow sharpen filters, etc. If quality is what you like, this might be the choice.

These are not "cooked" or out of the sleeve numbers :). This is actual actual data from LOTR, 2:50 hour movie with 720x360 film pixel source, passed through standard SemiAuto (no other filtering).

The D2SRoBa plugin might, after finding the Q, increase the resolution and reencode a sample, offering you more useful information for you to make the best choice. Iterate on the resolution!

You may say, gee, if you let Max=9800, video BR will surely go wild at low Qs! The answer is yes, it does, but for Q=30, which is very good, it remains within reasonable values for a XSVCD. For instance, 704x480 in the same movie above will never go above Max=3300 or so.

But, you may say again: XSVCDs are not widely supported. The answer is... Aren't they? We are talking here about 2 faults in not abiding the specs:

1. Resolutions like 528x480, 544x480 and 704x480. Very popular on several players.

2. Video+Audio > 2756 kbps. This number comes from old CD readers being 2x (the spec). But most models built today include at the very least a 4x CD player, which gives a maximum of 5512 kbps, more than enough (where would they get a 2x unit, likely no longer in production, to install in their players?).

A problem remains though: How do we iterate on the resolution? It requires to change the resizing, the cropping, the borders, etc. But maybe worth a thought.

[Fuzzy Thinking mode OFF]

What do you guys think? Any contenders?

homerjay
2nd September 2003, 09:24
just for information last night using the semiauto with homie script on a 1 hour 53 min film i got a final encoding q value of 33 for a 1cd conversion using version 2.50 beta 3 and new dvd2svcd build

nice work tylo - thankyou

telemike
2nd September 2003, 10:36
beta 4 bug report:

not launching CCE to do the final encode after caluclating the Q and bitrate. CCE 2.50:(

tylo
2nd September 2003, 10:57
just for information last night using the semiauto with homie script on a 1 hour 53 min film i got a final encoding q value of 33 for a 1cd conversion using version 2.50 beta 3 and new dvd2svcd build

nice work tylo - thankyouYou're welcome.
beta 4 bug report:
not launching CCE to do the final encode after caluclating the Q and bitrate. CCE 2.50:(Fixed in latest release candidate - 2.5.0 RC1

@r6d2: I think much of that is interesting for DVD2DVD usage, as well. And then we don't need to worry about resizing. XSVCD does not work for my player - I'd rather go for DVDr's. (but, I don't think quality 4x DVDr's will beat the price of two CDRs for quite some time).

homerjay
2nd September 2003, 11:29
i think r6d2 your discoveries re resolution are v interesting and have played with vcd resolution myself with mpeg2

but surely the overriding objective is to create compliant (s)(c)vcd's and making the program do this would be a step towards the (s)kvcd and its known compatability issues

r6d2
2nd September 2003, 16:48
Originally posted by tylo
I'd rather go for DVDr's. (but, I don't think quality 4x DVDr's will beat the price of two CDRs for quite some time).
Yes, but to make a comparison pear to pears and apples to apples, you must consider that 1 DVDr would likely fit 3 or 4 movies, thus being equivalent to 6 or 8 CDs.

Also, portable players you take on vacations, which are the size of a portable CD player, don't support DVDr, but they do (X)SVCDs.
Originally posted by homerjay
but surely the overriding objective is to create compliant (s)(c)vcd's and making the program do this would be a step towards the (s)kvcd and its known compatability issues
Compatability is indeed important, you're right. I don't think that new players, though, are becoming more restrictive. On the contrary, reading "anything" is a trend which buys market. As with any technology, standards are not defined by their creators, but for the masses who adopt them.

On the iteration of resolution issue, it would be great if SemiAuto would incorporate a Resolution=[1..5] parameter. It would make the matter a piece of cake.

tylo
3rd September 2003, 07:58
Surprise feature for you:

I like Gerti's SemiAutoCropAndResize so much that I added support for it in the D2SRoBa plugin, which makes it automatic. I.e. it fills in the detected 'Top' and 'Height' values for you (but you must still switch between the two Avisynth scripts yourself).

Here's what you must do:
- Use latest D2S (1.2.1) only.
- Install SemiAutoCropAndResize if not yet done. The avs scripts must be put in AVISYNTH.INI
- Fix fatal compability bug in Gerti's avs script by following DDogg's description in Gerti's thread.
- In the 'Frameserver' tab, edit the 'AutoDetectBorder' script like the following:
* Copy the AutoCrop(...) line, and put it on the next line. Change the first parameter from 1 to 2.
- Close D2S

That's it. Now:
- Start D2SRoBa. -> opens D2S.
- Select as usual the 'AutoDetectBorder' and preview. When you close the preview window, the top and height is put in the 'SemiAutoCropAndResize' setup. D2SRoBa will automatically select the Frameserver tab if all goes well.

Download latest D2SRoBa plugin (2.5.1) at: http://home.no.net/tylo

I'm off a week, so
Have fun.

Tyler
3rd September 2003, 14:06
Sorry for my ignorance but how can I remove the plugin, have to change the DVD2SVCD location and the setup didn't install an uninstall routine

thx in advance

homerjay
3rd September 2003, 14:37
@tyler just delete the folder itself i guess

and have a good break tylo - look forward to trying out the surprise :D

r6d2
4th September 2003, 00:36
Originally posted by tylo
- Select as usual the 'AutoDetectBorder' and preview. When you close the preview window, the top and height is put in the 'SemiAutoCropAndResize' setup. D2SRoBa will automatically select the Frameserver tab if all goes well.

Edit: Works like a charm!

The Belgain
7th September 2003, 10:13
Is this plugin supposed to work for avi to DVD conversions as well or not? I tried it for this and it didn't work at all. I'm trying to use it for the predictable 1pass VBR to get a movie to fit on 1 DVD-R by the way.

Help much appreciated.

homerjay
7th September 2003, 11:41
@the belgian - i did my first 1cd avi2svcd last night and it worked like a charm except for the fact that it created a second mpg file which was only the credits so it wasnt too bad ;)

did you have d2s set for avi before starting plugin or did you change it when it opened ? i was a bit curious about this so closed down after selecting an avi source and restarted the plugin.

but and this was what i was going to post anyway with the last 2 or 3 versions of d2sroba i have ended up with a second mpg while using the same scripts as used previously and was wondering if anyone else has noticed this ?

thanks hj

The Belgain
7th September 2003, 14:28
I know it works for avi2svcd, but does it work for avi2dvd? Remember for avi2dvd the image creation process after the encoding is different (uses Scenarist) so maybe the plugin can't correctly run the end of the process after the encoding?

Anyway, until I can get a VBR method with CCE which doesn't come out undersized (see this post http://forum.doom9.org/showthread.php?s=&threadid=60763 ), I'll just stick with CBR (the quality is not much worse when it is governed so much by the source (DivX or XviD) anyway, and it's faster).

known_03
7th September 2003, 14:42
A couple of questions for the D2SRoba gurus out there.

A quick question has the d2sroba_log been removed from the latest version D2SPlugin (2.5.1) ? When I convert using D2SRoba 2.5.1 the it does not produce the log file?

Secondly, what is the difference between RobaMultiPassVBR in dvd2svcd, compared with X-pass roba (d2s) in d2sRoba?

r6d2
7th September 2003, 14:44
Originally posted by The Belgain
Anyway, until I can get a VBR method with CCE which doesn't come out undersized (see this post http://forum.doom9.org/showthread.php?s=&threadid=60763 ), I'll just stick with CBR (the quality is not much worse when it is governed so much by the source (DivX or XviD) anyway, and it's faster). [/B]
Hi, @The Belgain,

CBR is about size and OPV is about quality. They are 1 pass methods.

The only sure way we know so far to have exactly sized files and edge filled media is to do 2 passes.

Then, the best quality you can get with 2 passes comes from doing a first OPV and a second VBR pass. This is what RoBa is about. If you want to try, use this mode:

X-Pass RoBa: Enables DVD2SVCD's hidden multipass RoBa support. The plugin computes an good initial Q, with a bitrate that is close to the target bitrate. This is important for the RoBa method to work properly.

DDogg
7th September 2003, 16:59
A quick question has the d2sroba_log been removed from the latest version D2SPlugin (2.5.1) ? When I convert using D2SRoba 2.5.1 the it does not produce the log file? No, it is still there on all encodes I have done.Secondly, what is the difference between RobaMultiPassVBR in dvd2svcd, compared with X-pass roba (d2s) in d2sRoba? Deceptively simple. Bach suggested the correction factor should be no more than 10%. D2SRoba X-pass RoBa first computes a close approximate to the Q needed to achieve the correct size within a few percent. This Q is fed back to the internal D2S roba process to more precisely allign the second pass.

In effect it is now automating what many of us were doing manually, i.e, using D2SRoBa to predict the Q, then killing it and restarting D2S and using that number as the Q of for the internal RoBa process.

Eventually, it is hoped the plugin or a D2S internal version of the RoBa process will include a conditional that will only do the second sizing pass if it is determined the size is X% too big or too small. This will be the best combination as many times the D2SRoBa prediction process gets it right and the second sizing pass is really not needed.

The Belgain
8th September 2003, 10:37
DDogg: I tried using X-Pass RoBa (the option which is enabled in DVD2SVCD, not the external program - is this right?), but the image still came out at about 3 gig.

What settings should I choose for Image Quality priority and for bias (as far as I can make out from the CCE docs they seem to do pretty much the same thing?)? Also, I thought the point of the method was that it calculated the best Q value, so why does it ask you to input one? Are you inputting the initial one that it starts with or something? What value would be about right for DVD video?

Sorry about all these question - I've done a fair bit of DivX/XviD encoding but am fairly new to the (S)VCD/DVD stuff.

Cheers for the help.

known_03
8th September 2003, 12:46
Thank for replying to my last post.

Something realy crazy is happening with DVD2SVCD and/or D2sRoba on my machine. I recently downloaded the last of DVD2SVCD and D2SRoba, but for some strange reason D2SRoba is not working, now it is like DVD2SVCD is ignoring it. D2SRoba opens DVD2SVCD ok, but as soon as you are in conversion, no d2sroba_log is being produced nor is it sampling the vob's or finding the Q value. I have been using both tools now for 8 weeks but now D2SROba is not functioning at all?

Has anyone exerienced this problem and/or have a solution. So far I have re-installed the tools and even downloaded earlier versions to see if that was the problem, but still doesnt work?

Why? Everything was working so well once?

r6d2
8th September 2003, 15:28
Originally posted by tylo
I like Gerti's SemiAutoCropAndResize so much that I added support for it in the D2SRoBa plugin, which makes it automatic.
I like Gerti's script so much that I added support for fully automated block cropping and non standard resolutions. ;)

Please check at:

http://forum.doom9.org/showthread.php?s=&postid=369238#post369238

DDogg
8th September 2003, 15:58
known_03, sorry but everything is working fine for me. Try using a basic sizing script. Also, you did not supply much information. I don't have clue what version of CCE, Avisynth, sizing method, SVCD, DVD?, or much to go on to try to help.

DDogg
8th September 2003, 19:04
known_03, are you using dvd2dvd? I ask because I am also having trouble at the moment using D2SRoBa in that mode. I don't even know if Tylo is supporting in this version.

JoLander
8th September 2003, 20:22
@DDogg,

having the same problems as known_03. I downloaded the latest version of dvd2svcd (1.2.1 B2a). Still have my CCE 2.67 in place.
I want to perform a DVD2DVD conversion and I think even for this the D2SRoba could be very useful.

I start D2SRoba and it calls correctly dvd2svcd.
Everything works fine, but after the CCE process has started, it didn't stop.
It seems that the CCE start is not catched by D2SRoba and is therefore not interrupted.

I hope that Tylo will have a look on that problem, because the DVD2DVD conversion is a useful enhancement to DVD2SVCD.

Greetz,
Joe

known_03
9th September 2003, 02:50
DDogg,

Sorry i should have said i'm using DVD2SVCD 1.2.1 b2, CCE 2.67 and D2SRoBa v2.5.1 for encoding DVD-R's.

Yeap I have the same probs described by JoLander.

I will try re-installing DVD2SVCD in dvd to svcd mode and see if that helps. I wouldnt think it would, I thought DVD2DVD mode was just a way of pre-setting DVD2SVCD with for DVD encoding when installing, right?

DDogg can you tell me the late-ish versions of DVD2SVCD and D2SRoba that you have used that work successfully together?

Thanks

DDogg
9th September 2003, 03:44
known_03, seems to me now that no combinations allow the D2SRoBa plugin to work with dvd2dvd mode yet. I would think when Tylo gets back he will fix it. I hope so.

No need to reinstall stuff, just go to misc tab and change dvd to svcd if you want to use that mode. The plugin does work fine in svcd mode. Anytime you exit D2S it will save the settings you had in the appropriate INI, ie., vcd.ini, svcd.ini or dvd.ini so nothing gets mixed together.

lordkinbote
9th September 2003, 08:50
Do you personally use D2SRoba for all of your SVCD conversions? I have to play around with it more to get more comfortable with it myself. I admit I have only tried to use it on the DVD disc that I was having problems with converting using multi-pass VBR so a smooth X-pass/Multi-pass VBR with it I haven't done yet.

r6d2
9th September 2003, 13:39
Originally posted by lordkinbote
[B]Do you personally use D2SRoba for all of your SVCD conversions?
Yes, generally on RoBa mode. I'm kind of full CD freak ;)

I still think it may be improved, though, as I've suggested to Tylo (inverting Audio/Video, Newton's method, etc.) If it was open source I'd have already done that. It's not too hard. But doing it from scratch... No way unless I could think of a really major improvement.

Trahald
9th September 2003, 17:35
bug error methinks --

i converted some pure ntsc source (dvd) using d2sroba.. everything went fine except the pulldown step was done. so basically ended up with 29.97 fps video + pulldown. this added frames and didnt sync to audio. all i did to fix was just use the non pulldown file "Encoded_Video_CCE_NTSC.mpv" and muxed it myself with bbmpeg. worked fine. i redid the process using dvd2svcd without the plugin (same ntsc source same settings .) i used [No Deinterlace] setting (i used the edit avs option to add decomb.dll fielddeinterlace()) both times. without the plugin d2s rightfully skipped the pulldown step and just muxed the encoded video. d2s knows from the dvd2avi step not to use forcefilm or ivtc and therefor not to pulldown.

anywho.. maybe someone else noticed to. didnt see anyposts about it tho . but id thought id mention it

thanx

btw - i like the variable resolution idea r6d2

great plugin tylo

DDogg
9th September 2003, 18:15
Do you personally use D2SRoba for all of your SVCD conversions? Yes, but I think for a different reason than some. Speed is not an issue for me as my machine can hit 3x real-time on some encodes. Rather, I want to know what quality I will end up with before I go through the aggravation of doing it. I normally start with a simple SemiAuto script with the plugin set for 1% samples. If I see the Q is going to be much above 30, I kill it, add some very light filtering to bring it down and do a restart and repeat all or part of the prediction process. In the meantime I view the D2SRoBa sample mpvs in media player to make sure my filtering is not doing damage. I keep this up till happy, then normally just kill the plugin, restart DVD2SVCD in internal RoBa mode and just use the Q I got from the plugin. I never do a 1pass anymore because it is actually faster for me to use the 1% samples and then do the two pass Roba than to use larger sampling only to find out the size was off.

I should add this method is why Tylo added the Xroba which does just this. You can use 1% samples and that phase will not take long at all. That Q is then accurate enough to feed into the internal D2S RoBa process. This is a very efficient method and I highly recommend the XRoba Method in the D2SRoBa plugin.

The nice thing for the folks that do use the one pass for the speed advantage is IF the size is off you can do a restart in D2S and pick multipass with just 1 in the box. When D2S asks if you want to reuse the vaf say yes. This will then do a sizing pass which effectively gives you the same action as the D2SRoBa plugins XRoba. This assumes you have set up a template in CCE that has "use existing" checked for the VAF.

I continue to lobby for a conditional to be added to D2SRoba or eventually in the internal RoBa which is on the drawing board. There is no reason to always do a 1pass or always do a 2 pass. The second pass is only needed if the size is off. Although that is simple I think a lot of folks are confused about it.

lordkinbote
9th September 2003, 19:13
Well, I know I'M confused by what you just said. :D I'll try to let it sink in and comprehend it, mainly by doing some trial and error. Thanks for your opinions.

DDogg
9th September 2003, 19:34
Well, I know I'M confused by what you just said. I'm not real clear sometimes ;) What area caused confusion. Let me know how I can make it more clear. RoBa is so cool and simple, but it seems one of those things that folks think is much more complicated than it really is. I did a windbag exercise here (actually 2, see the second), maybe that will help (or just confuse you more :) ): http://forum.doom9.org/showthread.php?s=&threadid=59850

lordkinbote
9th September 2003, 20:10
You were so right. It DID confuse me more. ;) But, I like the wealth of info. I will mull over it and see what I do understand and what I don't so I can ask a coherent question without sounding TOO stupid. I'm a relative newbie so I usually tend to post everything in the Basic Topics forum. I'm just now starting to creep outside of that little pool and finding the water is VERY deep.

r6d2
9th September 2003, 20:56
Originally posted by lordkinbote
[B]You were so right. It DID confuse me more. ;)
Seems that my soon to be released Complete Idiot's Guide will have some demand ;)

Unfortunately, Lycos considered that my activities were "unlawful, harmful, threatening, abusive, harassing, tortious, defamatory, vulgar, obscene, pornographic, libelous, invasive of privacy or publicity rights, hateful, or racially, sexually, ethnically or otherwise objectionable" in nature, and decided to shut down my site without warning.

I think Newton would be surprised to find that his root finding method could have so much possibilities.

Looking for a new cyberhome... Any good ones please PM me.

lordkinbote
9th September 2003, 22:19
Originally posted by r6d2

Unfortunately, Lycos considered that my activities were "unlawful, harmful, threatening, abusive, harassing, tortious, defamatory, vulgar, obscene, pornographic, libelous, invasive of privacy or publicity rights, hateful, or racially, sexually, ethnically or otherwise objectionable" in nature, and decided to shut down my site without warning.


Wow! ALL that?!? Jeez, you must be some sorta terrorist! I'd be hard pressed to find, on what I saw of your site, anything that even comes close to ONE of those things. Man, they're weird.

known_03
11th September 2003, 14:43
r6d2, I'm sure you will find a new cyberhome, i'm one looking forward in reading the idiot guide. Hey, what happened to the dog picture?

While i'm here I have a question for you guys. I just opened a ecl file in CCE that was created by d2s (CCE_Project_file.ecl) and d2sroba (D2SRoBa.ecl), and was suprised that both had "dvd compliant" unchecked, and "Low Pass Filter" checked - set to 8. Even though my progressive CCE template had "dvd compliant" checked and "Low Pass Filter" unchecked.

Is there a reason why d2s and/or roba (in ecl) sets these values by default? What other values are overridden? Thanks.

DDogg
11th September 2003, 15:21
[Edit - Add] I don't think you are correct. I can't verify this as I just checked and everything is as it should be. I suspect you may have forgot to make sure the "Use tempalte" was selected. Even though I read your question incorrectly, I'll leave the rest of this up as it may help somebody else. [/edit - Add]

known_03, just set up a template for use in anything past 2.50. D2S made a decision that he could not change the GUI everytime a new change came out in CCE so he added support for templates. You need this anyway to use D2SRoBa or the internal RoBa process as you must have "Use existing" VAF checked. Do NOT check DVD compliant. Do a search for the reasons why (cause I don't remember :) ).

Under template click on standard so that a checkmark is placed on it. Then click again on standard which will bring up the template editor. Select the settings you want to use, change the name of the template and then click "add".

Then when encoding in D2S, just select that template in the advanced settings dropdown box. Check "use CCE template" and select the template you want to use with your settings.

I should add the way matrices are chosen was slightly changed. If you want to use the matrix in your template, chose "Use current encoder default" in the matrix tab of D2S. If you chose a matrix in D2S, it will be used instead of the one in the template.

r6d2
11th September 2003, 20:19
Originally posted by known_03
r6d2, I'm sure you will find a new cyberhome, i'm one looking forward in reading the idiot guide.
I told you I'd be back! :D
Hey, what happened to the dog picture?
I decided to use a photo of myself. My dog was barking very loud about me being using his personality.

r6d2
12th September 2003, 19:27
Originally posted by lordkinbote
I'd be hard pressed to find, on what I saw of your site, anything that even comes close to ONE of those things. Man, they're weird.
Believe it or not, I just received this mail from Lycos as a reply to my appeal:
Dear [name removed],

It seems as though your account was removed in error and has been
reinstated. I apologize for any problems this may have caused you.

Sincerely,

Tom
The sadest thing of all is that Yahoo! Geocities, my new cyberhome, turned out to be much easier to set up and mantain. And they provide interesting site statistics free of charge.

Too bad, Lycos. I think you lost a customer because of stupidity of procedures and lack of prompt and adequate response.

lordkinbote
12th September 2003, 19:33
Nice. Well, good for you, too bad for them.

tylo
12th September 2003, 23:22
Hi all, home sweet home..

Uploaded v2.5.2, - a maintainance release with new fixes.
http://home.no.net/tylo/

DDogg
13th September 2003, 02:02
That is great news. Thanks for doing this so quick. Now my request would be a very simple one. Would either you or r6d2 do a short piece on this automation of facar? There is no documentation or explanation except for like three words :)

Update: Tylo, I just did a test D2SRoBa opv 1 disk encode with 2000 set in the disk size (DVD2DVD). D2S was also set to 2000. The resulting MPV was 4.04 gigs.

D2SRoBa v2.5.2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-12 20:53:03
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 2000
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.3
- Sample GOPs : 1
- Safety Zone : 34
--------------------------------------------------------
- Movie length : 02:51:52 (247259 frames, 23.976 fps)
- Audio size est : 577515182. bytes (448 + 0 kbps)
- CD mpv data size : 4000066093. (3103 kbps, 1 CDs)
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 2484
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 4000066093. (3103 kbps)

tylo
13th September 2003, 11:15
Now my request would be a very simple one. Would either you or r6d2 do a short piece on this automation of facar? There is no documentation or explanation except for like three words
I've sent r6d2 a InnoSetup script, that will install everything automatically. I want him to maintain this, so go to his site to look for updates.
/Edit: See the FACAR thread or http://www.geocities.com/r6d2_stuff

/Add: Usage: Select "FACAR DetectBorders" in Frameserver tab - do a preview in Convertion tab. Close preview window, the Frameserver tab will automatically be selected. Choose "FACAR", and detected top and height is already filled in. :D Two new directories in 'Avisynth2.5 Plugins' are added. If it doesn't work, Check D2SRoBa.ini - It should have 'autocrop_report=AVISYNTH_FACAR'.

@DDogg: I'll look into your reported error.

@r6d2: Add 'EnableDirDoesntExistWarning=yes' in the [Setup] section.

@all: update D2SRoBa v2.5.3 : just a small final close bug fix.

r6d2
16th September 2003, 06:59
Tylo,

Is it really needed to shut down CCE during search? Why not just change the Q, the file name and press "Encode"?

tylo
16th September 2003, 09:22
Is it really needed to shut down CCE during search? Why not just change the Q, the file name and press "Encode"?
It is easier and safer to use the EclCCE comand line arguments -ecl <file> -batch to run CCE 2.66+, than emulating GUI input (which is a little different than for CCE 2.50). Thus, CCE 2.50 doesn't close during Q-search.

JoLander
16th September 2003, 12:02
Hi,
I just found another issue with the current versions of D2SRoBa and DVD2SVCD.

I tried to convert a DVD -> DVD and started D2SRoBa.
Everything worked fine until the CCE process has started.
CCE continued to run and was not shutdown by D2SRoBa.

I did some tests and found the following:
I usually use DVDDecrypter and create an ISO image from a DVD for further processing.
This image I mount with Alcohol120% and use the image-drive in DVD2SVCD.
To speed up the process, I disable DVD-Ripping.
With this setting, D2SRoBa did not interrupt CCE.
When the DVD-Rip is switched on, D2SRoBa stops CCE and everything works correct.

Greetz,
Joe

Trahald
16th September 2003, 13:45
i was wondering if there was a better way to add the video file. ie.. when d2sroba takes over it right clicks cce and adds the file that way. ctrl-o works and wont grab the mouse arrow from me if im using it

also haveing some problems with batch mode.. d2s will hang when d2sroba tries to close it the first time.(this is even when im not using hte pc) but its intermittant. also a few times d2sroba set odd values into the bitrate part of the .ini file during batch (not when the d2s first runs but after d2sroba closes d2s then reopens it the first time).. d2s complains about it (it sits there waiting for input to load default bitrates or keep the bad ones) if i can duplicate the issues ill try to post the logs .

the bitrate part looked something like this

MinsHigh1=19
MinsHigh2=0
MinsHigh3=0
MinsHigh4=46
MinsHigh5=99999

iirc

last thing, tylo .. after reading the thread and your explanation of adjust q.. would i be correct in saying if i wanted the q to be a higher number (ie if it was a choice between 34 and 35 ... d2sroba will always pick 35) if i choose a low adjust q (preferably 0.0)? id rather the images be too small than to big.. im not that anal about filling RIGHT to the edge.. 20-30 megs on the short side is fine.. just dont want 20-30 over

ok.. last last thing.. can you make it so the preview window doesnt show at all? (like it does after the final encode terminates but remains in the task bar).. the novelty of watching it work is pretty much over.. i trust the q it comes up with. since the display cant be moved i could do without it.

anywho.. thanx for the great plugin, wook

tylo
16th September 2003, 22:08
@jolander: Please don't write current/latest ver. in bug reports. did you use 2.5.3? Anyone else had this with 2.5.3?

@w00kiee: I've now replaced the RightClick with menu opening for cce266+. The batch mode is hardly tested, so thanks for you report. I'll try some more myself. On the Adjust Q thing, use 0.0 to be (quite) sure not to get too big images. Future release will do an conditional extra pass if the size is too big, to make it fit.
Status window: I may do something, but now set status_x in the ini file to something high, and it will disapear.

DDogg
16th September 2003, 22:48
Future release will do an conditional extra pass if the size is too big, to make it fit. Good news!

tylo, did you find or get a chance to fix that bitrate problem in dvd mode I reported (not honoring disk size)? It is really killing me :)

JoLander
17th September 2003, 08:12
@Tylo,
sorry for not using the version numbers.
(they were 'current' at the date of my posting).

Actually I using D2SRoBa 2.5.3 and DVD2SVCD 1.2.1 B2.
With this versions I have the reported problem.

Greetz,
Joe

tylo
19th September 2003, 15:15
§§§§§§§§§§
§§§§§
§§§§ - Introducing. . The D2SRoBa v2.6.0.
§§§§
§§§§§ - The Ultimate Encoding Plugin.
§§§§§§
§§§§§§§ - Visit - http://home.no.net/tylo
§§§§§§§§ ------------------------------
§§§§§§§§§ - True Encoding Pleasure

:D

telemike
19th September 2003, 15:35
Can't wait to try it!!!!!!!!!!! :D

homerjay
19th September 2003, 18:33
was going to give my pc a night off but will have to punish it some more now :p thanks for your continued improvements :D

DDogg
19th September 2003, 18:35
Tylo, wonderful stuff! Very clean and understandable interface.

A few questions and a report:

1> If 0% is chosen as oversize, do you look at it as 0% or do you use that as a "always"? Same question on undersize.

I noted a small anomaly (DVD2DVD mode)marked in bold at the bottom:
========================================================
D2SRoBa v2.6.0 beta1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-19 11:46:04
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 2000
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.3
- Sample GOPs : 1
- Sizing pass on : 1 (-2.0 .. 1.0)%
--------------------------------------------------------
- Movie length : 01:25:14 (122614 frames, 23.976 fps)
- Audio size calc : 286385720. bytes (448 + 0 kbps)
- DVD2SVCD mpv est : 1756030291. bytes (2747 kbps, 1 CDs)
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 1236
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 1756030291. (2747 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 2085489941. (Q=32, 3262 kbps, 21022604 sample sz)
- Estimated mpv size : 1559701666. (Q=48, 2439 kbps, 15722440 sample sz)
- Estimated mpv size : 1777601029. (Q=40, 2780 kbps, 17918956 sample sz)
- Computed mpv size : 1668651347. (Q=44, 2610 kbps, 16820698.=(Q48+Q40)/2)
- Computed mpv size : 1723126188. (Q=42, 2695 kbps, 17369827.=(Q44+Q40)/2)
- Estimated mpv size : 1746220575. (Q=41, 2731 kbps, 17602628 sample sz)
--------------------------------------------------------
- Q Weight : 1.0 - (1756030291. / 99.2022653721683 - 17602628) / (17918956 - 17602628)
- Adjust Q : (41 + (0.687394043638874) - (1.3)) = 40.3873940436389
- Determined Q. : 40
--------------------------------------------------------
- Encoding Movie
- 2003-09-19 11:48:53
--------------------------------------------------------
- Actual mpv file size:
09/19/2003 12:28 PM 1727508452 Encoded_Video_CCE_NTSC.mpv
--------------------------------------------------------
- Estimation result: 0.% on target ( 1727508 / 1756030291.)
- Executing VBR Sizing Pass.
(rest of test still in progress)

tylo
19th September 2003, 19:24
Yepp, seems there is a problem related to that I have norwegian date format on my machine. In your case, it threrefore WILL do the Sizing pass (it thinks you're way off), but I think it will work OK otherwise. I will upload a fix for this tonight hopefully. For your other question: 0% Above/Below means: don't tolerate any oversize/undersize, so both set to 0.0 will guarantee always do the pass. I wonder If it would be better to set 98% and 101% as limits? Thanks for reporting so fast!

/Add: BTW: Now when we have the conditional sizing pass, I think we can normally increase the 'Adjust Q' to at least 1.6. Four out of five times (at least) you will get a closer fit, and one of five it will then oversize. (numbers are good guesses only). Found the bug - Should be uploaded within 20 mins.
/Add: 1.6.0 beta2 uploaded. :)

r6d2
20th September 2003, 02:34
Originally posted by tylo
§§§§ - Introducing. . The D2SRoBa v2.6.0.

Congratulations, Tylo, for a job well done.

PD: I'm not back, just hanging in from vacations ;)

Holomatrix
20th September 2003, 15:28
Sound like you guys have been busy :) New versions look great :)

DDogg
21st September 2003, 00:16
tylo, got a few problems on a svcd encode so here is the report. I ended up with two mpgs and images. bbMPEG_Muxed_File01.mpg was 68,023 k so it was way off by quite a margin even after the sizing pass which suggests there is a internal calulation problem. Encoded_audio_1.mp2 was 123,314 k. The Target mpv size value seems whacked? I thought you were generating the second pass using the d2s internal calculations? It did not seem so, but I was in and out. Pulldown.mpv after sizing pass was 730,788 k.

Btw, I ran this test twice and both times I got a large second image so I know this is not a fluke. I am pretty confused at the moment :)

Notice I actually used a 5% sample.

D2SRoBa v2.6.0 beta2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-20 15:20:17
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 5.0
- Adjust Q. : 1.3
- Sample GOPs : 1
- Sizing pass on : 1 (-2.0 .. 1.0)%
--------------------------------------------------------
- Movie length : 01:45:13 (151371 frames, 23.976 fps)
- Audio size calc : 126268769. bytes (160 + 0 kbps)
- DVD2SVCD mpv est : 749720815. bytes (1900 kbps, 2 CDs)
- SelectRangeEvery : every 240, select 12 frames
- Num. sample frames : 7572
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 749720815. (950 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 749127403. (Q=32, 949 kbps, 37473444 sample sz)
- Estimated mpv size : 1124580419. (Q=16, 1424 kbps, 56254652 sample sz)
- Computed mpv size : 936853911. (Q=24, 1187 kbps, 46864048.=(Q32+Q16)/2)
- Computed mpv size : 842990657. (Q=28, 1068 kbps, 42168746.=(Q32+Q24)/2)
- Computed mpv size : 796059030. (Q=30, 1008 kbps, 39821095.=(Q32+Q28)/2)
- Computed mpv size : 772593226. (Q=31, 978 kbps, 38647270.=(Q32+Q30)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (749720815. / 19.9908874801902 - 37473444) / (38647270. - 37473444)
- Adjust Q : (32 + (0.974711626842667) - (1.3)) = 31.6747116268427
- Determined Q. : 31
--------------------------------------------------------
- Encoding Movie
- 2003-09-20 15:29:46
--------------------------------------------------------
- Actual mpv file size:
09/20/2003 04:35 PM 729933828 Encoded_Video_CCE_NTSC.mpv
--------------------------------------------------------
- Estimation result: 97.3% on target ( 729933828 / 749720815.)
- Executing VBR Sizing Pass.

Holomatrix
21st September 2003, 06:38
Seemed alright for me. Right on target. One file 811 Meg mpg.


========================================================
D2SRoBa v2.6.0 beta2 - DVD2SVCD plugin, by tylo
OS Version: WIN_2000
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-20 19:02:09
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 128
- Sample percentage : 3.0
- Adjust Q. : 0.8
- Sample GOPs : 1
- Sizing pass on : 1 (-2.0 .. 1.0)%
--------------------------------------------------------
- Movie length : 01:31:34 (131742 frames, 23.976 fps)
- Audio size calc : 87915916. bytes (128 + 0 kbps)
- DVD2SVCD mpv est : 721872091. bytes (1051 kbps, 1 CDs)
- SelectRangeEvery : every 500, select 15 frames
- Num. sample frames : 3960
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 721872091. (1051 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 476097358. (Q=64, 693 kbps, 14310892 sample sz)
- Estimated mpv size : 665901783. (Q=32, 969 kbps, 20016176 sample sz)
- Estimated mpv size : 930042497. (Q=16, 1354 kbps, 27955916 sample sz)
- Computed mpv size : 797972140. (Q=24, 1161 kbps, 23986046.=(Q32+Q16)/2)
- Estimated mpv size : 712087734. (Q=28, 1036 kbps, 21404468 sample sz)
- Computed mpv size : 755029937. (Q=26, 1099 kbps, 22695257.=(Q28+Q24)/2)
- Computed mpv size : 733558852. (Q=27, 1068 kbps, 22049863.=(Q28+Q26)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (721872091. / 33.2681818181818 - 21404468) / (22049863. - 21404468)
- Adjust Q : (28 + (0.544301430352402) - (0.8)) = 27.7443014303524
- Determined Q. : 27
--------------------------------------------------------
- Encoding Movie
- 2003-09-20 19:33:32
--------------------------------------------------------
- Actual mpv file size:
20/09/2003 10:25p 678854768 Encoded_Video_CCE_NTSC.mpv
--------------------------------------------------------
- Estimation result: 94.% on target ( 678854768 / 721872091.)
- Executing VBR Sizing Pass.

tylo
21st September 2003, 16:45
I am pretty confused at the moment
I was too when I read this, but when I looked closer at both of your logs, it stroke me that I have made a blunder with the calulations since v2.5.0: In the log line:
DVD2SVCD mpv est : 749720815. bytes (1900 kbps, 2 CDs)
the numbers 1900 kbps and 2 CDs are picked up from DVD2SVCDs calculations.

The current math:
roba_video_br = d2s_video_br * roba_cds / d2s_cds
(1900 * 1 / 2) = 950 --> Wrong

The math should be:
roba_video_br = (d2s_video_br * roba_cds / d2s_cds) - (audio_br * (d2s_cds - roba_cds) / d2s_cds)
(1900 * 1 / 2) - (160 * (2 - 1) / 2) = 950 - 80 = 870

In holos case:
DVD2SVCD mpv est : 721872091. bytes (1051 kbps, 1 CDs)

Current math:
(1051 * 1 / 1) = 1051

Should be:
(1051 * 1 / 1) - (128 * (1 - 1) / 1) = 1051 - 0 = 1051,
which is the same, so therefore it works for him!

Beta3 will be uploaded tonight with these fixes.

Btw: both of you should increase the Adjust Q. Dogg, was closer on target (97.3%) because of the error, holo 94%: I will change the default value to 1.6.

DDogg
21st September 2003, 17:46
That makes sense and would explain why on some encodes I was getting perfect sizing and on some it was messed up. Just to double check, I am doing the same encode again, but this time I made sure the time-bands in the d2s bitrate tab were set correctly to properly reflect one CD instead of two for this particular length of source. I notice the bitrate now looks correct in your log. Will let you know later, but I expect it will be fine.

homerjay
21st September 2003, 19:57
pretty glad to see this has been picked up :D
did a conversion last night that had been having a prob with oversizing so set -3.2 to force undersized ( 1cd ) but forgot to take tick out for do conditional sizing pass
the result was that it created a second mpeg 36mb in size :rolleyes:

DDogg
21st September 2003, 20:26
Yep, right on the money now that I made sure the time-band was adjusted to 1 cd. CD_Image_File_CD1.bin = 823,717 kb

========================================================
D2SRoBa v2.6.0 beta2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-21 11:18:02
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 0.0
- Sample GOPs : 1
- Sizing pass on : 1 (-2.0 .. 1.0)%
--------------------------------------------------------
- Movie length : 01:45:13 (151371 frames, 23.976 fps)
- Audio size calc : 101015016. bytes (128 + 0 kbps)
- DVD2SVCD mpv est : 707105106. bytes (896 kbps, 1 CDs)
- SelectRangeEvery : every 1500, select 15 frames
- Num. sample frames : 1515
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 707105106. (896 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 726440520. (Q=32, 920 kbps, 7270596 sample sz)
- Estimated mpv size : 562038625. (Q=48, 712 kbps, 5625176 sample sz)
- Computed mpv size : 644239573. (Q=40, 816 kbps, 6447886.=(Q48+Q32)/2)
- Computed mpv size : 685340046. (Q=36, 868 kbps, 6859241.=(Q40+Q32)/2)
- Estimated mpv size : 698883604. (Q=34, 885 kbps, 6994792 sample sz)
- Computed mpv size : 712662062. (Q=33, 903 kbps, 7132694.=(Q34+Q32)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (707105106. / 99.9148514851485 - 6994792) / (7132694. - 6994792)
- Adjust Q : (34 + (0.403307522489496) - (0.0)) = 34.4033075224895
- Determined Q. : 34
--------------------------------------------------------
- Encoding Movie
- 2003-09-21 11:20:54
--------------------------------------------------------
- Actual mpv file size:
09/21/2003 12:27 PM 684765848 Encoded_Video_CCE_NTSC.mpv
--------------------------------------------------------
- Estimation result: 96.8% on target ( 684765848 / 707105106.)
- Executing VBR Sizing Pass.

Holomatrix
22nd September 2003, 02:12
Were did I go wrong? It started doing the 'Executing VBR Sizing Pass'
again. Was it the Sample percentage 5.0 or Adjust Q. 1.6 to high ? if it's going to start this VBR Sizing Pass then I should have just selected a Milti-pass VBR 1 encode.


========================================================
D2SRoBa v2.6.0 beta2 - DVD2SVCD plugin, by tylo
OS Version: WIN_2000
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-21 16:46:16
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 128
- Sample percentage : 5.0
- Adjust Q. : 1.6
- Sample GOPs : 1
- Sizing pass on : 1 (-2.0 .. 1.0)%
--------------------------------------------------------
- Movie length : 01:45:57 (152430 frames, 23.976 fps)
- Audio size calc : 101721722. bytes (128 + 0 kbps)
- DVD2SVCD mpv est : 706489146. bytes (889 kbps, 1 CDs)
- SelectRangeEvery : every 300, select 15 frames
- Num. sample frames : 7635
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 706489146. (889 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 556603845. (Q=64, 700 kbps, 27879488 sample sz)
- Estimated mpv size : 822093981. (Q=32, 1034 kbps, 41177508 sample sz)
- Estimated mpv size : 652516515. (Q=48, 821 kbps, 32683616 sample sz)
- Computed mpv size : 737305248. (Q=40, 927 kbps, 36930562.=(Q48+Q32)/2)
- Estimated mpv size : 686090565. (Q=44, 863 kbps, 34365292 sample sz)
- Estimated mpv size : 704069599. (Q=42, 885 kbps, 35265836 sample sz)
- Computed mpv size : 720687423. (Q=41, 906 kbps, 36098199.=(Q42+Q40)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (706489146. / 19.9646365422397 - 35265836) / (36098199. - 35265836)
- Adjust Q : (42 + (0.854400444353716) - (1.6)) = 41.2544004443537
- Determined Q. : 41
--------------------------------------------------------
- Encoding Movie
- 2003-09-21 17:54:09
--------------------------------------------------------
- Actual mpv file size:
21/09/2003 08:55p 623552972 Encoded_Video_CCE_NTSC.mpv
--------------------------------------------------------
- Estimation result: 88.2% on target ( 623552972 / 706489146.)
- Executing VBR Sizing Pass.

DDogg
22nd September 2003, 02:22
It started doing the 'Executing VBR Sizing Pass' again.
Holo, clarity bro :) Are you saying you did not want the sizing pass, or that it did the sizing pass twice meaning three passes? Also I am surprised it is 18% off target, especially with a 5% sample. Frankly I would nearly think that impossible so maybe you found another pest for tylo to squish

Holomatrix
22nd September 2003, 02:37
Seems to have been better with the 3% sample, true, anyway it didn't do it three times, I just didn't wan't it to do a VBR bitrate encode instead of the OPV encode. If at the end it's going to give me a Multipass VBR encode anyway (most of the time) then I should have set DVD2SVCD up that way in the first place and not use the plugin.

DDogg
22nd September 2003, 03:20
Just tweak you undersize parameter to 5%. Then the sizing pass will not run normally unless the encode is off by 5% which is rare. That's why I remarked on your 18% error. I expect that will show there is some problem that tylo will have fixed soon from what he said above. This is just the second beta with the conditional sizing pass and it is near perfect already. Hang in there. We are about to have a very special new tool. I am sure you will be very pleased.

BTW, there is a heap of difference between OPV with sizing (RoBa) versus multipass. It is a completely different animal.

r6d2
22nd September 2003, 03:20
Originally posted by Holomatrix
Seems to have been better with the 3% sample, true, anyway it didn't do it three times, I just didn't wan't it to do a VBR bitrate encode instead of the OPV encode. If at the end it's going to give me a Multipass VBR encode anyway (most of the time) then I should have set DVD2SVCD up that way in the first place and not use the plugin.
@Holo, for some reason this RoBa stuff does not fit easily in everybody's minds, but:

1. Did you uncheck "Conditional Sizing Pass"? If you don't, and the plugin misses the Q (as in this case), it will do it.

2. Multipass (VAF+1), is not likely to give you a better encode than OPV + 1VBR. So the plugin gets a better job done in more or less the same time.

3. Sample size does not matter! Choose 1% and you'll be good enough. There is not sample size which will give you a "closer Q". It is just a gamble, as it is the adjust Q.

No one has found a recipe that will work for every movie, so in the meantime, you're free to gamble, or just let the plugin do a conditional second pass.

Cheers,

DDogg
22nd September 2003, 03:25
Sample size does not matter! Choose 1% and you'll be good enough. There is not sample size which will give you a "closer Q". It is just a gamble, as it is the adjust Q. Now that is very interesting! Coming from you I take it as the gospel, but if you get the itch to type I wouldn't mind a bit more education on the topic. Is this more math stuff about Babylonians that is gonna cross my eyes again? :D

tylo
22nd September 2003, 09:23
Now, things are getting a little out of hands again. :rolleyes:

First, r6d2, shouldn't you be on vacation :). Sample size % does matter! On average, you will be closer on target when you increase sample %, but on certain movies, you will get a worse result. It is statistical probablity that comes into play here. However, I agree that you actually may use 1%-2% as max because the statistical probability varies so much depending on the movie at hand.

Still, I haven't got it as bad as 11.8% off, like holo did, at least not on a 5% sample (DDogg, you really are terrible at math :p). There shouldn't be any differences from earlier versions on this part, so you may rerun it on any older version to verify that you get this bad estimation result.

Another interesting thing is that DDogg got a bitrate of 896 from DVD2SCVD's one CD computation. In beta3, I compute it to be 870, which is then too low (see post above). This is probably due to the fact that there is less overhead data on a one CD encode than on a two CD encode in total. It's not straight forward to take the DVD2SVCD bitrate calculation for e.g. two CDs, and translate that to what the bitrate will be for one CD (sorry, r6d2). Fortunately, by trial and error, it think it is possible to figure out a formula (which also takes subtitles into account), that will make this translation more accurate. I'll do some investigations. :)

/Add 1: As a resort, we can let DVD2SVCD recalculate bitrate with the number of CDs that we have decided to use, if it is different from what DVD2SVCD calculated initially. The number of CDs would in that case be chosen on slightly wrong premises... So we must recover from 'Video Encoding', and breaking it a second time. (r6d2, I think you suggested this once). Then we can search Q, and continue as before. It wouldn't work well with the '?' mode as this would lead to even more sample tests, but otherwise this may be the way to go...

/Add 2: I think it's better to have a 'Adjust %' settings instead of the 'Adjust Q'. I.e. the Q-search should compare sample_size*(frames/sample_frames)*(100+adjust_percent)/100 with the target size. This will make it easier for users to quantify how much to compensate for the typical estimation error you get, and is also a better way. Much less complicated than the Q adjust implementation too. :)

r6d2
22nd September 2003, 12:50
Originally posted by tylo
First, r6d2, shouldn't you be on vacation :). Sample size % does matter! On average, you will be closer on target when you increase sample %, but on certain movies, you will get a worse result.
You are seeing the same kind of data as I am and are getting into different conclusions ;). My statement comes from the following analysis:

If sample size does matter, then the bigger the sample the more accurate the target BR gotten (it's BR we're ultimately estimating, not Q). This is not but a common sense statement.

Well, try this: encode n samples with 2^(n-1)% sample size each. For non babylonians ;), this is 1%, 2%, 4%, 8%, etc. Tabulate the results obtained (Sample size, BR) in Excel. Add a [100%, Actual_BR] pair to your list and draw a curve in X-Y graphic mode.

Common sense says that since you're doubling the sample on each try, the error should halve accordingly.

You'd be surprised. It does not in the general case. Some movies get it even more accurate with 1%, even with 0.5%!

The conclusion is common sense did not work. So anything about sample size you may find adequate for one movie will not be for the next one.
It's not straight forward to take the DVD2SVCD bitrate calculation for e.g. two CDs, and translate that to what the bitrate will be for one CD (sorry, r6d2).
Actually, I did manage to find a way to estimate the BR for any number of CDs within 0.5% precision of FitCD's calculations (which is even more precise tan DVD2SVCD's). See my RoBa Q Finder for reference. It does not support subtitles yet, though, but it is a starting point for your further investigations.

/Add 1: As a resort, we can let DVD2SVCD recalculate bitrate with the number of CDs that we have decided to use, if it is different from what DVD2SVCD calculated initially. [...] So we must recover from 'Video Encoding', and breaking it a second time. (r6d2, I think you suggested this once).

Yes, but if you take my suggestion of determining first the number of CDs, then the video BR and then the Audio BR, you'll save all the hassle. D2S will have the correct number of CDs when it runs Video Encoding.
Then we can search Q, and continue as before. It wouldn't work well with the '?' mode as this would lead to even more sample tests, but otherwise this may be the way to go...

If you use Newton, sampling different resolutions, resizers (and even denoisers) would be very straightforward with the new FACAR. Just change a parameter. And since you can use 1% samples and it converges faster, the user won't notice the additional samples.

I'm still on vacation, but this stuff is too hot! :D

Holomatrix
22nd September 2003, 13:30
Originally posted by r6d2
@Holo, for some reason this RoBa stuff does not fit easily in everybody's minds, but:
I think I've missed a few pieces of the puzzle :)


1. Did you uncheck "Conditional Sizing Pass"? If you don't, and the plugin misses the Q (as in this case), it will do it.
[/B]

Should I always have it checked then? If I want to be most acurate?

DDogg
22nd September 2003, 14:32
Gee, it must be true...Whiskey does impair math ability!

Tylo, this thing is working so darn good now I hope it doesn't get broken trying to fix it. I did 5 encodes back to back using 1% sample size and every one was within 2 to 4%. An oddity was a reverse of yesterday as I inadvertently had d2s set at 1 cd for the source length and I set up the plug-in for 2 cds. Results with a 1% sample were 100.2%. I don't know if that has any relevance or was just a statistical anomaly.

Granted I don't use subs or multiple audio tracks but this thing is working really good and it is so much more elegant and streamlined in operation with fewer breaks than earlier versions. Er, I guess I'm just suggesting caution :)Should I always have it checked then? If I want to be most acurate? Holo, all the conditional says is IF the OPV is off by more than the X% you have selected THEN do the sizing pass. You make the election how much sizing error you are willing to accept as a trade-off for saving the time of not having to do the second pass.

It is more or less accurate to say the effect on quality by the second pass is neglible whether the size correction is up or down. It is only for sizing, so if you are willing to accept a 5% error of 30-35 megs too small then set it there. I personally think 3% is more realistic for those that speed is the most important. If you use a 1% sample the time saved could well contribute to the second pass if needed so you may save time in the long run if you tend to redo encodes because you are unhappy with the final size. With the sizing pass on you will always get it just right the first time.

r6d2
22nd September 2003, 15:00
Originally posted by DDogg
It is more or less accurate to say the effect on quality by the second pass is neglible whether the size correction is up or down. It is only for sizing
I thought we had already settled the matter but seems that whiskey is bad for memory too ;)

If the MPV is oversized, the second pass is needed to reduce or it won't fit.

If the MPV is undersized by x%, the second pass will improve the BR by x%.

Example: If you are doing a 1 CD rip on a 90 min movie with audio=128 (hence video avg=1088), that "negligible" 5% error will give you just a 1034 output video, that's 54 kbps less than expected, which can really make a difference.

DDogg
22nd September 2003, 15:04
I wish you had left that can sealed. Note the word negligible. I thought we had agreed that given the accuracy of the opv which seems to get it within 3% most of the time that the effect on quality was more theoretical than practical reality so I felt the statement would help alleviate confusion. Instead I guess it will now cause more. In order not to cause any confusion let me restate it:

IMHO, and as a general rule of thumb the effect on quality by the second pass is negligible whether the size correction is up or down unless the sizing correction is substantial like 5% or so.

Technically speaking, if the OPV is smaller than the targeted size then the size correction will increase the bitrate so that should increase quality. If the OPV is too big (rarely it seems) then the resizing pass will slightly reduce bitrate thus decreasing quality.

Practically speaking, I think the quality difference for a 2 or 3% upsizing correction is not going to be noticeable to anybody and if the OPV pass is 1% too big then most probably a extra mpg/image file will be created with a few seconds of Credits and can be discarded. If you have used frame-selection to already cut credits this may not work out so be forewarned.

Not disregarding the above, as a practical matter, if you want the best efficient and quality it would be best to leave the conditional sizing pass on for all encodes. Sometimes that will cost you an extra pass, but given that it is fully automatic and hopefully at off times or night who cares?

Trahald
22nd September 2003, 15:33
because the estimated Q's are integers and even a 1% sampling is going to be fairly accurate, raising the % a few notches CAN end up with a less than accurate Q (by dumb luck of which movie you pick). although obviously if you really think it out.. basically you would have to say 1% sampling can be better (more accurate) than 100%... which uhhmmm.. would be impossible. not nearly impossible. but impossible. its just that 100% is the only % that wouldnt be effected by the fact the Q input has to be an integer. the derived q would be the same as the ultimate q (unless your pc is busted :D )(obviously were talking about the final encode being OPV and not multipass-VBR)

if you do the excel thing and take % starting from 1% sampling to 100 % and draw an average line through it you would see the trend from less accuracy to more accuracy (would work better if you factor in multiple movies)

DDogg
22nd September 2003, 15:52
As an FYI adaptive filters like Peachsmoother will negatively effect the accuracy of sampling prediction because the rapid fire scene changes of a sample can cause adaptive filters to return different results in the sample versus the full encoding pass. That pretty well wrecks the sampling accuracy. Peachsmoother is the only one I have verified this with, but I assume there may be a few others out there so be forewarned.

r6d2
22nd September 2003, 16:12
Originally posted by w00kiee
its just that 100% is the only % that wouldnt be effected by the fact the Q input has to be an integer.
Nope, even for 100% "samples", i.e, the whole movie, the integer nature of Q will not give you a filled CD in the general case. Increasing Q by 1 unit may give you anywhere between 20-50 less MB, depending on the source.
if you do the excel thing and take % starting from 1% sampling to 100 % and draw an average line through it you would see the trend from less accuracy to more accuracy
Nope, that is an unexisting trend and it won't show up. Try it yourself.
(would work better if you factor in multiple movies)
Sorry, this assumes movies behave alike, which in my experience, they don't.

r6d2
22nd September 2003, 16:40
Originally posted by DDogg
IMHO, and as a general rule of thumb the effect on quality by the second pass is negligible whether the size correction is up or down unless the sizing correction is substantial like 5% or so.

Actually, believe it or not, the aforementioned error being "negligible" depends on the number of CDs. 5% more BR is important in 1 CD, but not in 2 or 3.

I know this sounds like black magic again, but let me explain. On the same example above, with 2 CDs, audio=192 (10% rule), video avg=2240. Error=5% means output BR of 2128, which is as good as 2240.

So, quality wise, the error x% is important as the target BR is far from the max by spec. Or something babylonian ;) as:

Let y% the error you are willing to accept on Avg=Max. (for instance, 10%)

Target_BR * y%
Then x% = --------------
Max

Sorry guys, the can was open! :D:D:D

DDogg
22nd September 2003, 17:22
I know this sounds like black magic again Not at all. Perhaps Babylonian anality, but definitely not black magic (cracking myself up):)

Trahald
23rd September 2003, 06:17
hehe.. i guess i'll call this agreeing to disagree (closes the can)
if im bored maybe i'll do the chart (read -- never) :D

anywho.. so far with 2.6.0 beta3.. been flawless

good work tylo

tylo
23rd September 2003, 10:43
Thanks, folks.

For the moment, adjust the time bands so that D2S selects the number of CDs you want, like DDogg did, and you'll get an exact target bitrate.

When you get back, r6d2, if you try with e.g the logs posted by DDogg, wherein the first, DVD2SVCD computed the bitrate for 2 CDs, and in the second for 1. - DVD2SVCD mpv est : 707105106. bytes (896 kbps, 1 CDs)
Using your sheet, I don't get close numbers. What may be wrong is the bbmpeg mux overhead, which I think is different depending on certain options given to it..? Also, for the 'Reduce size' DVD2SVCD uses 5 (in .d2s file). I will try a bit more to translate a given bitrate for X CDs to Y CDs. That may still be simpler than a full-blown computation of the bitrate.

Btw: In the next beta, I've added a checkbox which allows you to do the Audio encoding after the Video. It doesn't do anything more fancy than that now, but in a future version it can be modified to e.g. let audio bitrate be X% of the video bitrate (maybe within min/max) :)

r6d2
23rd September 2003, 14:33
Originally posted by tylo
When you get back, r6d2, if you try with e.g the logs posted by DDogg, wherein the first, DVD2SVCD computed the bitrate for 2 CDs, and in the second for 1. - DVD2SVCD mpv est : 707105106. bytes (896 kbps, 1 CDs)
Using your sheet, I don't get close numbers. What may be wrong is the bbmpeg mux overhead, which I think is different depending on certain options given to it..? Also, for the 'Reduce size' DVD2SVCD uses 5 (in .d2s file). I will try a bit more to translate a given bitrate for X CDs to Y CDs. That may still be simpler than a full-blown computation of the bitrate.

Well, I don't have the oher parametes used by DDogg so I cannot check his D2S's calculations, but I still get 1kbps error comparing to FitCD in my movies (using RoBa Finder 1.2, dated 30/8).

The sheet is made using my usual muxing parameters: uncheck scan offsets and uncheck seq.header alignments. If I change that in FitCD with the DDogg log's data, I get 893 where D2S got 896. Still pretty close.

I'll try to include these parameters in the sheet.

tylo
23rd September 2003, 15:36
Great! That's only 0.33% difference (or about 2.5MB for a typical movie). So, I gather you know (from FitCD) how much those two options impacts the muxing-size, in order to get it in the sheet?

I'll wait for your new sheet then, and see if I can reproduce it myself. Maybe you even can mail me the filled in sheet that shows it.
Thanks.

r6d2
23rd September 2003, 15:37
Originally posted by tylo
Btw: In the next beta, I've added a checkbox which allows you to do the Audio encoding after the Video. It doesn't do anything more fancy than that now, but in a future version it can be modified to e.g. let audio bitrate be X% of the video bitrate (maybe within min/max) :)
@Tylo, what about this:

1. Let D2S start and do the DVD2AVI thing, frame selection. Abort.

2. Do the first sample encode. Determine number of CDs. Choose audio by the 10% rule and let the user specify a "manual minimum override". Let the user confirm the audio size. Set all NumCD variables to the number of CD found.

3. Resume D2S from audio extraction. Let D2S do audio encoding and picture conversion.

3. Let D2S start Video Encoding in OPV mode (if you check "Calc. bitrate as max", D2S will give CCE the AVG you need for both Q finding and for the eventual second pass.) Abort as usual.

4. Find Q.

5. Do the OPV pass and VBR pass if needed.

6. Resume D2S from pulldown/muxing as today.

7. You're done.

The flaw is at stage 2 you don't have the target BR. But since this is just the number of CDs estimation, a simple and inexact calculation like this will do:

(800*n)/Duration = Video_BR + Audio_BR

DDogg
23rd September 2003, 15:54
Sounds feasible but it needs to support DVD2DVD also which may may have 3-6 subs, 2 audio avs or mp2 plus the scenarist muxing overhead. tylo, can I do any certain tests for you to help get you data? If so just instruct your humble servant :) I still urge caution :) It is just so good now. Perhaps different methods for dvd2svcd and dvd2dvd as dvd2dvd is normally only going to be one disk and people will not be using auto mode I would think.

r6d2
23rd September 2003, 16:02
Originally posted by DDogg
Sounds feasible but it needs to support DVD2DVD also which may may have 3-6 subs, 2 audio avs or mp2 plus the scenarist muxing overhead.
Actually, the approach described above can be easily generalized for multiples audio and subs, and target media also.

While my RoBa sheet gives a much better BR estimation for the VBR pass than D2S, it just mimics FitCD, which does not support DVD targets well (that's Fit2Disc).

(Remember the discusion of DVD2SVCD and shh about the former using the latter's FitCD code released under GPL without intending to release the sources himself? ;))

tylo
23rd September 2003, 16:19
Yes, the DVD2DVD case shouldn't be considered here, because D2S allows only one disk - i.e. it works as it should. The r6d2 suggestion will solve the "auto" mode, however it won't solve the "?" mode. Also, it makes the process less streamlined. I still think it would be the best if I could calculate the target (video+audio) bitrate myself within 0.5% of D2Ss numbers for any number of CDs (SVCD/VCD case).

/Add: Just to summarise: the problem we discuss only affects:
SVCD/VCD, "auto" and "?" mode when you/D2SRoBa choose a different number of CDs than D2S selects. The "manual override" number of CDs shouldnt be a problem either (from the next beta) - I'll set D2S num CDs to that for each time band.

r6d2
23rd September 2003, 20:22
Originally posted by tylo
The r6d2 suggestion will solve the "auto" mode, however it won't solve the "?" mode. Also, it makes the process less streamlined. I still think it would be the best if I could calculate the target (video+audio) bitrate myself within 0.5% of D2Ss numbers for any number of CDs (SVCD/VCD case).
@Tylo, I think your wish is granted. If you look at the RoBa Q finder sheet you'll see how the BR is extrapolated. The math is simple:

Total_BR(n) = Audio_BR(n) + Video_BR(n)

You have from D2S both Audio and Video for a given n, hence you have the total for n. Thus I sustain that:

Total_BR(n) Total_BR(m)
----------- = ----------- = Constant For any n and m
n m

From which we have:

m
Total_BR(m) = --- Total_BR(n) = Audio_BR(m) + Video_BR(m)
n

Remember that in the current status of the plugin, Audio_BR(m) = Audio_BR(n). But the sheet formula works for any general case.

You can clear Video_BR(m) from the above equation, the only unknown value, and you're set. (Of course this works for any m, but the proof is left as an excersise to Babylonian readers ;))

BTW, my approach can solve "?" mode too, with minor changes. You have all the data you need.

Edit: Clarity of math.

tylo
24th September 2003, 08:19
Eureka! I now get all the numbers correct - full bitrate computation with FitCD and with r6d2's spreadsheet, but also by computing the bitrate for n CDs from a given bitrate for m CDs. Actually, my math in a few posts ago was the same as r6d2's: For Babylonian readers, here's the equation, but with fixed audio br:
--------
(Video_BR(n) + Audio_BR)/n = (Video_BR(m) + Audio_BR)/m

; mult by n, subtract Audio_BR (both sides)
Video_BR(n) = n*(Video_BR(m) + Audio_BR)/m - Audio_BR
; loose the paranthesis
Video_BR(n) = n*Video_BR(m)/m + n*Audio_BR/m - Audio_BR
; factorize
Video_BR(n) = n*Video_BR(m)/m + (n*Audio_BR - m*Audio_BR)/m
;
Video_BR(n) = n*Video_BR(m)/m + Audio_BR*(n - m)/m
; restructure
Video_BR(n) = Video_BR(m)*n/m - Audio_BR*(m - n)/m
--------
which is exactly the equation I came up with, and is used in beta3. :) The reason I didn't get the numbers right was that I used wrong input data (as usual).

If we want to adjust audio along with the video bitrate, we must use the total bitrate to decide on num CDs and target bitrates. I'll take that in the next step.

Although I compute correct bitrates in beta3, I found that I still compute the target sizes wrong (when m differs from n), which is what we compare against when searching for Q. Expect better precision in the next version.

r6d2
24th September 2003, 13:19
Originally posted by tylo
[If we want to adjust audio along with the video bitrate, we must use the total bitrate to decide on num CDs and target bitrates. I'll take that in the next step.
If you do this you might adjust Max to be (2756 - Audio) too, which is something I dream of from a very long time ;)

This, however, introduces a new complexity: samples from different number of CD tests are not strictly comparable and if reused can lead to some distortions :(

Trahald
24th September 2003, 15:08
tylo - can you throw some sample figures in your formula and tell where you got them ( m , n , etc) w00k == babylonian

btw - for some strange reason last night i decided not to plug in disk sizes (i was doing a disk=1 encode) in d2s' bitrate tab and i got bit.. the video was oversized - lol oh well, at least i now see what ddogg was talking about. d2s' figures send you a bitrate that only accounts for 1/2 the audio bitrate (figuring itll get split over 2 cds) but i setup roba for 1 disk

in this case just manually pluging in the bitrate tabs when roba first opens d2s would do lovely <as tylo stated earlier>

i guess for ? and auto you could reopen d2s (only if the calculated amount of disks roba gets is not = to the amount of cds d2s origionally used) after you get your first estimated q. set all the bitrate tabs in d2s to match the calculated # of disks needed before hand. then get d2s' new bitrate. and do more q calculation (might require 1 or 2 more sampling passes) if necesary. then continue as usual (unless the amount of calculated disks changes, then repeat)

r6d2
24th September 2003, 15:26
Originally posted by w00kiee
in this case just manually pluging in the bitrate tabs when roba first opens d2s would do lovely [...] i guess for ? and auto you could reopen d2s (only if the calculated amount of disks roba gets is not = to the amount of cds d2s origionally used) after you get your first estimated q.
@w00kiee, fortunately, all that hassle will not be needed. Tylo just needs to correct the MPV calculation in function of n, using the BR obtained by the Babylonians.

tylo
24th September 2003, 15:56
This, however, introduces a new complexity: samples from different number of CD tests are not strictly comparable and if reused can lead to some distortions First, good idea - but also necessary. I see no problem here. The samples must be created with corrected max bitrate, and labeled with intended numCDs, e.g.: D2SRoBa_N1_Q30.mpv - we know the numCDs the samples are intended for.
But it adds complexity, yes.

w00kiee: The eq. above is for fixed audio br. Otherwise, we'll compute the total bitrate, and determine both video and audio br. Anyway:
/edited:
- n: the numCDs that you or the plugin chooses
- m: the numCDs that D2S selects based on time bands and movie length ('Number of Images' key in the .d2s file)
- Video_BR(n): the bitrate we seek for n num CDs
- Video_BR(m): bitrate that D2S computes for m CDs (taken from the 'Avg Bitrate' key in the .d2s project file)
- Audio_BR: you know.

r6d2
24th September 2003, 16:35
Originally posted by tylo
we'll compute the total bitrate, and determine both video and audio br.
Careful here. If you're calculating a new audio for different CD sizes, you'll need to encode audio too. Which leads to the approach I mentioned some posts ago.

Since that process was not "streamlined" :), I propose the following:

1. Let the user specify in D2S his minimum accepted audio. Have a flag in the plugin indicating if this audio BR is mandatory(*).

2. Let D2S extract audio and start beSweet. Abort beSweet (not D2S).

3. D2S will think beSweet is done and proceed to picture conversion and video encoding, where the plugin calculates the number of CDs, the video BR and the audio BR (by the 10% rule, unless the user's minimum is higher or the mandatory flag is true).

4. Resume D2S from audio encoding with correct BR.

5. Let D2S encode OPV pass with found Q.

6. Let the plugin do the VBR pass, if needed.

(*) This is useful when original audio is encoded at low BRs. Some translations are encoded at 96kbps! No need to increase the audio BR in those cases.

tylo
24th September 2003, 17:00
Indeed that would work, and I think I will use point 1. But as always I did it a little different. I temporarily let D2S point to a BeSweetLater.bat file that I made, which only picks up the arguments it gets, and writes them to a <output>.mp2.ini file. After the complete video encoding phase, I start BeSweet.exe myself, with the arguments in the <output>.mp2.ini file, but the bitrate substituted.

This opens another option: if you choose not to do the video sizing pass or because its only e.g. 2% undersized, and you set 2.5% as limit, it would be possible to adjust the audio bitrate instead, to fill the CD. (Sizing with audio).

Pretty clever, ey. - Gee, my eyes start to cross. See ya :D.

r6d2
24th September 2003, 18:59
Originally posted by tylo
Pretty clever, ey. - Gee, my eyes start to cross. See ya :D. [/B]
Your eyes will roll over when somebody asks for 2 audio tracks :D:D:D

r6d2
24th September 2003, 20:39
@Tylo, It would be nice if you support a "Resume plugin" function.

For instance, I used your defaults and ended up with a 100.5% on target, assuming I'd be ableto overburn. But guess what: it did not fit in 2 disks, and bbMPEG insisted on creating 3 images so I could not overburn without remuxing and "iterating" on messing up with the project file.

I rather have resumed the plugin changing the "above" figure to get the sizing pass, but had to do it manually.

Of course I set "above" to 0% for my next encodes, but the resume would be useful if you change your mind for "below" after the OPV encode.

Also, you might consider specifying the below figure to depend on the number of CDs and max by spec, as presented in an earlier post. It would make much more sense.

DDogg
25th September 2003, 01:49
There seems to be a problem with Beta three. Even if the time band is set as 1 cd in D2S the d2sroba log always shows 2. When I shift back to beta 2 it shows 1, assuming I have set the time band correctly. See beta two below, but the numbers seem all whacked on it now. DAMN!!!!!!!!! Gee, is my frustration showing? :)


========================================================
D2SRoBa v2.6.0 beta3 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-24 18:03:25
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.6
- Sample GOPs : 1
- Sizing pass on : 1 (-2.0 .. 1.0)%
--------------------------------------------------------
- Movie length : 01:40:43 (144891 frames, 23.976 fps)
- Audio size calc : 96690691. bytes (128 + 0 kbps)
- DVD2SVCD mpv est : 764838472. bytes (2025 kbps, 2 CDs)
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 1452
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 764838472. (947 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 726510617. (Q=32, 961 kbps, 7280600 sample sz)
- Estimated mpv size : 1019926467. (Q=16, 1350 kbps, 10221016 sample sz)
- Computed mpv size : 873218542. (Q=24, 1155 kbps, 8750808.=(Q32+Q16)/2)
- Computed mpv size : 799864579. (Q=28, 1058 kbps, 8015704.=(Q32+Q24)/2)
- Estimated mpv size : 753045228. (Q=30, 996 kbps, 7546512 sample sz)
- Computed mpv size : 776454904. (Q=29, 1027 kbps, 7781108.=(Q30+Q28)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (764838472. / 99.7871900826446 - 7546512) / (7781108. - 7546512)
- Adjust Q : (30 + (0.496223494333304) - (1.6)) = 28.8962234943333
- Determined Q. : 28
--------------------------------------------------------
- Encoding Movie
- 2003-09-24 18:08:43
--------------------------------------------------------
- Actual mpv file size:
09/24/2003 07:35 PM 753227084 Encoded_Video_CCE_NTSC_FS1.mpv
--------------------------------------------------------
- Estimation result: 98.4% on target ( 753227084 / 764838472.)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

========================================================
D2SRoBa v2.6.0 beta2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-24 22:04:36
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.6
- Sample GOPs : 1
- Sizing pass on : 1 (-2.0 .. 1.0)%
--------------------------------------------------------
- Movie length : 01:40:43 (144891 frames, 23.976 fps)
- Audio size calc : 0. bytes (0 + 0 kbps)
- DVD2SVCD mpv est : 806007555. bytes (1067 kbps, 1 CDs)
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 1452
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 806007555. (1067 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 726510617. (Q=32, 961 kbps, 7280600 sample sz)
- Estimated mpv size : 1019926467. (Q=16, 1350 kbps, 10221016 sample sz)
- Computed mpv size : 873218542. (Q=24, 1155 kbps, 8750808.=(Q32+Q16)/2)
- Estimated mpv size : 781980320. (Q=28, 1035 kbps, 7836480 sample sz)
- Computed mpv size : 827599431. (Q=26, 1095 kbps, 8293644.=(Q28+Q24)/2)
- Estimated mpv size : 797534349. (Q=27, 1055 kbps, 7992352 sample sz)
--------------------------------------------------------
- Q Weight : 1.0 - (806007555. / 99.7871900826446 - 7992352) / (8293644. - 7992352)
- Adjust Q : (27 + (0.718171174532876) - (1.6)) = 26.1181711745329
- Determined Q. : 26
--------------------------------------------------------
- Encoding Movie
- 2003-09-24 22:11:48

tylo
25th September 2003, 12:15
For instance, I used your defaults and ended up with a 100.5% on target, assuming I'd be ableto overburn. But guess what: it did not fit in 2 disks, and bbMPEG insisted on creating 3 images so I could not overburn without remuxing and "iterating" on messing up with the project file.Doesn't seem to be such a big deal. When you get over 100%, I increase the bbMPEG number of images on purpose. I could make that optional, but every one else has asked for cutting at 100%, so they can discard the last image (with credits).

DDogg: I see that you are using frame selection in the beta3 log, so it may be the reason you get 2 CDs - very little tested by me.
The output from beta2 log is just veird (no audio?) - dunno the reason. You still use a GOP-len of 12 - bad. I though the plugin set it back to 15 when you went from DVD to SVCD output? Also broken?

I'll post an "intermediate" version probably tonight that has accurate bitrate calculations. (including audio/video gen switch, but only fixed audio bitrate for now). This time it shouldn't matter which number of CDs D2S selects - D2SRoBa (hopefully) computes the correct bitrate anyway :)

DDogg
25th September 2003, 12:46
I ran beta 2 from scratch on the same source and it did its normal great job. You still use a GOP-len of 12 - bad Well in casual tests I found 12 decreased size of encode. I'm alarmed that you might be considering changing that with the plugin as that is a choice I choose to make and would not want it changed by any external program. Why do you say it is bad? Got a link for me? I'm happy to learn something.

========================================================
D2SRoBa v2.6.0 beta2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-24 22:40:59
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.6
- Sample GOPs : 1
- Sizing pass on : 1 (-2.0 .. 1.0)%
--------------------------------------------------------
- Movie length : 01:40:42 (144870 frames, 23.976 fps)
- Audio size calc : 96676677. bytes (128 + 0 kbps)
- DVD2SVCD mpv est : 709214058. bytes (939 kbps, 1 CDs)
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 1452
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 709214058. (939 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 767753531. (Q=32, 1016 kbps, 7695024 sample sz)
- Estimated mpv size : 605791665. (Q=48, 802 kbps, 6071716 sample sz)
- Estimated mpv size : 674021045. (Q=40, 892 kbps, 6755564 sample sz)
- Estimated mpv size : 717248577. (Q=36, 949 kbps, 7188824 sample sz)
- Computed mpv size : 695634811. (Q=38, 921 kbps, 6972194.=(Q40+Q36)/2)
- Estimated mpv size : 705772319. (Q=37, 934 kbps, 7073800 sample sz)
--------------------------------------------------------
- Q Weight : 1.0 - (709214058. / 99.7727272727273 - 7073800) / (7188824 - 7073800)
- Adjust Q : (37 + (0.700099129554756) - (1.6)) = 36.1000991295548
- Determined Q. : 36
--------------------------------------------------------
- Encoding Movie
- 2003-09-24 22:45:29
--------------------------------------------------------
- Actual mpv file size:
09/24/2003 11:42 PM 690439064 Encoded_Video_CCE_NTSC_FS1.mpv
--------------------------------------------------------
- Estimation result: 97.3% on target ( 690439064 / 709214058.)
- Executing VBR Sizing Pass.

r6d2
25th September 2003, 13:06
Originally posted by tylo
[B]Doesn't seem to be such a big deal. When you get over 100%, I increase the bbMPEG number of images on purpose. I could make that optional, but every one else has asked for cutting at 100%, so they can discard the last image (with credits).
I cut the credits with FS and this is the first time I hear you mention this "feature". ;)

DDogg: I see that you are using frame selection in the beta3 log, so it may be the reason you get 2 CDs - very little tested by me.
The output from beta2 log is just veird (no audio?)
This has happened to me too, several times. I think it may have to do with restarting/resuming manually after changing audio size in D2S, and sometimes the audio is not picked up. Starting from scratch seems to fix it. I always though I was stretching the plugin too much, but there may be a bug if somebody else is having the problem.
You still use a GOP-len of 12 - bad. I though the plugin set it back to 15 when you went from DVD to SVCD output? Also broken?
Same happened to me. Since I upgraded to the last build of D2S the GOP size is 12. However, I don't think that is bad, on the contrary. The least the GOP size, the more I-frames you get, the better the quality.

I run into another problem though. The sizing image produced 2 CDs, but the MPV was way bigger than expected. Log size from the plugin estimated 1,411.5-MB and D2S encoded 1,421.2-MB, 10-MB more. The 2nd image ended up cropped.

As you can see in the log, the reported D2S video BR the plugin received was 1843. However, according to the "CCE_Project_file_MOVIE" file, the sizing pass was done with 1857! :confused:

@Tylo, you might add to the log the BR used in the "- Executing VBR Sizing Pass." line for debugging and clarity.


========================================================
D2Sroba v2.6.0 beta3 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-24 23:56:32
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : ?
- Worst Q. : ---
- Maximum Q. : 40
- Sample percentage : 1.0
- Adjust Q. : 1.0
- Sample GOPs : 1
- Sizing pass on : 1 (-1.0 .. 0.0)%
--------------------------------------------------------
- Movie length : 01:47:04 (154037 frames, 23.976 fps)
- Audio size calc : 154191192. bytes (192 + 0 kbps)
- DVD2SVCD mpv est : 740037410. bytes (1843 kbps, 2 CDs)
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 1548
--------------------------------------------------------
Calculations:
- Estimated mpv size : 1241513941. (Q=40, 1545 kbps, 12476636 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1480074820. (1843 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1706532936. (Q=20, 2124 kbps, 17149860 sample sz)
- Estimated mpv size : 1442766665. (Q=30, 1796 kbps, 14499132 sample sz)
- Computed mpv size : 1574649800. (Q=25, 1960 kbps, 15824496.=(Q30+Q20)/2)
- Computed mpv size : 1508708232. (Q=27, 1878 kbps, 15161814.=(Q30+Q25)/2)
- Estimated mpv size : 1491907652. (Q=28, 1857 kbps, 14992976 sample sz)
- Computed mpv size : 1467337158. (Q=29, 1827 kbps, 14746054.=(Q30+Q28)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (1480074820. / 99.5071059431525 - 14746054.) / (14992976 - 14746054.)
- Adjust Q : (29 + (0.481587037736491) - (1.0)) = 28.4815870377365
- Determined Q. : 28
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 3
- Target mpv size : 2220112230. (2765 kbps)
--------------------------------------------------------
- Computing oversize num CDs: adj_target_brate = 2564
========================================================
- Selected num CDs : 2 (Q=28)
--------------------------------------------------------
- Encoding Movie
- 2003-09-25 00:06:16
--------------------------------------------------------
- Actual mpv file size:
25/09/2003 01:42 1456273528 Encoded_Video_CCE_NTSC_FS1.mpv
--------------------------------------------------------
- Estimation result: 98.3% on target ( 1456273528 / 1480074820.)
- Executing VBR Sizing Pass.

tylo
25th September 2003, 13:20
I don't think it's intended by D2S to use 12 for SVCD: If you have GOP len=15 for SVCD output and switch to DVD output, D2S forces GOPlen=12, which is OK I guess. When going back to SVCD output, D2S still has GOPlen=12.

I don't have a link, but I think longer GOP length allows for better compression. I.e. compression happens mainly within a GOP. In slow scenes, you don't need I-frames to get high quality when it consecutive frames are almost equal. I-frames require more space.

When creating DVD output, most DVD equipment/author software require GOPlen=12 (for compability), I think. You got friends in high places - why not ask them?

@r6d2: At first glance, I think this is due to the bug in the code we discussed.

Trahald
25th September 2003, 13:23
i got a weird one.. came out over a gig... i changed the bands all to 1 cd in d2s but actually just looks like a hiccup

D2SRoBa v2.6.0 beta3 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-25 01:15:46
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 720
- Number of CD's : 1
- Worst Q. : ---
- Maximum Q. : 128
- Sample percentage : 2.0
- Adjust Q. : 0.8
- Sample GOPs : 1
- Sizing pass on : 0 (-3.0 .. 1.0)%
--------------------------------------------------------
- Movie length : 00:56:03 (80650 frames, 23.976 fps)
- Audio size calc : 40365366. bytes (96 + 0 kbps)
- DVD2SVCD mpv est : 689574992. bytes (1640 kbps, 1 CDs)
- SelectRangeEvery : every 600, select 12 frames
- Num. sample frames : 1620
--------------------------------------------------------
Calculations:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 689574992. (1640 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 561169670. (Q=64, 1334 kbps, 11272100 sample sz)
- Estimated mpv size : 898131942. (Q=32, 2136 kbps, 18040592 sample sz)
- Estimated mpv size : 697096981. (Q=48, 1657 kbps, 14002444 sample sz)
- Computed mpv size : 629133326. (Q=56, 1496 kbps, 12637272.=(Q64+Q48)/2)
- Computed mpv size : 663115153. (Q=52, 1577 kbps, 13319858.=(Q56+Q48)/2)
- Computed mpv size : 680106067. (Q=50, 1617 kbps, 13661151.=(Q52+Q48)/2)
- Estimated mpv size : # AUTOIT - Unknown function/variable! (Q=49, 0 kbps, AutoIt Clipboard overflow sample sz)
--------------------------------------------------------
- Q Weight : 1.0 - (689574992. / 49.7839506172839 - AutoIt Clipboard overflow) / (AutoIt Clipboard overflow - AutoIt Clipboard overflow)
- Adjust Q : (49 + (# AUTOIT - Unknown function/variable!) - (0.8)) = 1
- Determined Q. : 1
--------------------------------------------------------
- Encoding Movie
- 2003-09-25 01:26:12
--------------------------------------------------------
- Actual mpv file size:
09/25/2003 02:40 AM 1048897564 Encoded_Video_CCE_NTSC.mpv
--------------------------------------------------------
- Estimation result: 152.1% on target ( 1048897564 / 689574992.)

i didnt have the vbr resize option on, btw. (just ran a manual vbr pass myself and muxed)

r6d2
25th September 2003, 13:27
Originally posted by tylo
@r6d2: At first glance, I think this is due to the bug in the code we discussed.
I don't think so. Looking at your code I noticed that when you do the VBR pass you don't set the BR, you use the last one which was there. In this case, 1857 was the last BR "estimated", the one for Q=28. Since after that Q=29 was "computed", the ECL file was not updated.

The easy fix is to put in D2S's bitrate back in before the VBR pass.

DDogg
25th September 2003, 13:40
but I think longer GOP length allows for better compression Yeah, I thought so too, but some tests I did showed different. Could have been a fluke though. Also, I read somewhere that some DVD players have a problem with 15 even on SVCD so I plan to continue to use 12. Actually this has been recommended as good practice for a long time but at the moment I don't have a link. Hopefully using 12 will not cause any problems using the plugin. I do think it would be intrusive for the plugin to change that setting.

Also, though the last few weeks I have seen many times that too many complex restarts cause problems. I reported one of those to you quite a while back. The audio names in the d2s actually disappeared. I've seen this a half dozen times. That may have nothing to do with the plugin. I have been curious if you are changing any values and restoring them later in such a way that a crash or end task might cause a corruption of the d2s or other d2s files? Anyway, once d2sroba is stabilized those multiple restarts will be a thing of the past and may not cause future problems.

BTW, just in case I have not said it often enough, you are doing a damn fine job on d2sroba and it is truly getting to be a thing of beauty and elegance. It is the type of work that will be appreciated by a lot of tool users who don't even really understand what d2sroba is doing. They will only know they end up with great encodes in half the time. That is the way great software should be.The easy fix is to put in D2S's bitrate back in before the VBR pass That's what I was thinking also.

tylo
25th September 2003, 13:41
The easy fix is to put in D2S's bitrate back in before the VBR pass.I've rewritten that section, and now the computed bitrate is restored.

@w00kiee: It's a hiccup, alright. The plugin uses heavily the clipboard buffer to temorarily store data. It seems you've overloaded it. Did you by any chance use other programs that uses clipboard (e.g copy paste)? Don't.

DDogg
25th September 2003, 13:48
The plugin uses heavily the clipboard buffer to temporarily store data. After the dust clears a bit, could you entertain reexamining this and perhaps using a temp file to store your data? Given the time it takes to encode, tying up the clipboard may cause a loss of productivity for a lot of folks. I completely understand this may be something you don't want to mess with :)

DDogg
25th September 2003, 16:13
Sounds like GOP length may be different for Pal and NTSC. A hard read but may help the discussion.

http://forum.doom9.org/showthread.php?s=&threadid=20709&highlight=cce+and+gop+and+n%2Fm%3D

r6d2
25th September 2003, 17:55
Originally posted by DDogg
After the dust clears a bit, could you entertain reexamining this and perhaps using a temp file to store your data? Given the time it takes to encode, tying up the clipboard may cause a loss of productivity for a lot of folks.
Autoit is a very, and let me emphasize this, very limited language. The math is like in assembly code. To overcome this, Tylo uses an external calculator he bundles in the plugin.

Communication with this tool is done via the clipboard. It may also be done via a temporal file, but guys, that would require a serious software revision and all Tylo is asking is "don't touch the keyboard while D2Sroba is doing its magic". That restriction applies only during the calculations, not during the sample encodes.

It'd be very unsual if you have another tool using the clipboard at those times. So, I light several candles for Tylo. He is a serious programmer and has done a wonderful job with a crappy programming language.

DVD2SVCD uses inter process communication to interact with CCE, so he does not have this problem. AutoFitCD Detect Borders, by RB, also does it this way.

There's a saying in Computer Science, coming from a paper published by a notorious professor, called "Real programmers don't use Pascal".

Well, I think Tylo is the most real programmer I've ever met. ;)

DDogg
25th September 2003, 18:28
OK, I completely retract my request :D

Trahald
25th September 2003, 18:39
i was doing work with photoshop restoring some old photos before the encode. during the encode i was sleeping ;). i'll just remember to clean up the clipboard before an encode. no harm.

one thing that is a special request. even if you just put it in as an undocumented option in the d2sroba.ini file. request--> it seems as though when d2sroba closes cce and d2s , it is calling eclcce before it is completely closed , so ECLCCE throws up a 'only one instance of eclcce' is allowed and just sits there. i can just reopen the plugin and start recover cce from video encode, but im not usually there during encode. but wait.. the request is coming! :D anyways, the problem is my ram deprived pc swaps hard while cce and d2s are closing and its not fast enough to close eclcce before the next eclcce is called, so would be nice if the program would acknowlege a WaitForCCE=x (x == length in seconds before reopening cce/eclcce).. or i could just buy more ram ;)

tylo
25th September 2003, 19:48
Thanks for backing me up, guys. I just learned that one of the problem with using the clipboard is that it is really slow (Microsoft!!). Therefore w00kiee got the error on his slow machine. As, r6d2 says, the AutoIt programming language is lacking some serious things like floating point math, and only has GOTO's which is the most primitive program control mechanism. I must add that it has some very strong points too. Well, there might be some got news here: AutoIt3 is now out (beta but stable), and its a total new language which is great to program in! I consider strongly to convert the plugin to AutoIt3, because it should be fairly easy to do. I guess I should upload the latest D2SRoBa version for you before dvelving into that...

With AutoIt3 we get:
- A real log window, which we can minimize
- No usage of clipboard
- Built in floating point math, structured programming (loops, if-else), and functions.
- A much easier maintainable program - maybe r6d2 or someone else takes over /maintains at some point - (you're gonna like AutoIt3).
:)

Trahald
25th September 2003, 20:07
With AutoIt3 we get:
- A real log window, which we can minimize
- No usage of clipboard
- Built in floating point math, structured programming (loops, if-else), and functions.
- A much easier maintainable program - maybe r6d2 or someone else takes over /maintains at some point - (you're gonna like AutoIt3).


woohoo!

r6d2
25th September 2003, 20:11
Originally posted by tylo
With AutoIt3 we get:
- A real log window, which we can minimize
- No usage of clipboard
- Built in floating point math, structured programming (loops, if-else), and functions.
- A much easier maintainable program - maybe r6d2 or someone else takes over /maintains at some point - (you're gonna like AutoIt3).
:)
If it does all that, I'll code Newton on it. ;)

r6d2
25th September 2003, 20:41
Originally posted by DDogg
Sounds like GOP length may be different for Pal and NTSC. A hard read but may help the discussion.

http://forum.doom9.org/showthread.php?s=&threadid=20709&highlight=cce+and+gop+and+n%2Fm%3D
Gee, you're not going to believe this! I read the thread above completely, which includes some posts by a guy named Mozart (rings a bell?). Well, see his unique style (flames included) and you'll know it was Bach's previous incarnation into this world.

Now look at this post:

http://forum.doom9.org/showthread.php?s=&postid=108215#post108215

So, it seems that we have been giving the credit to Bach for an idea which was first presented by a guy nicknamed juhan in Mar. 25, 2002!!! His last post in this forum was in Aug. 8, 2002.

Bach's introduction to the now called RoBa method is dated Jul. 11, 2002.

Interesting, don't you think?

DDogg
25th September 2003, 21:42
Interesting, don't you think? HeyHey, You are gonna get struck by lightning if you keep this up! :D

@tyloI guess I should upload the latest D2SRoBa version for you before dvelving into that... <Cough!>, yes please :)

r6d2
25th September 2003, 23:49
Originally posted by DDogg
HeyHey, You are gonna get struck by lightning if you keep this up! :D
@DDogg, it was you who announced the thread! Beware of the Lord! :D:D

Regarding the GOP size discussion, the less B pictures the GOP has, the better. You can even encode without B pictures.

tylo
26th September 2003, 11:47
Ok, the new version 2.7.0 beta1 is looking good (haven't I said that before?). I've put in some cure for both the problems w00kie and Dogg reported, and hopefully they'll help. The problems with wrong bitrates/sizes should be gone, and I've added audio settings (e.g. % of Video). A little more work before its done. I'm putting AutoIt3 on the shelf for a while.

@r6d2: maybe he took his name too: "juhan" sebastian ...

r6d2
26th September 2003, 14:29
Originally posted by tylo
@r6d2: maybe he took his name too: "juhan" sebastian ...
Well, you may be right. I had not thought of that.

I guess the plugin should be called RoJuBa :)

DDogg
26th September 2003, 18:32
Ok, ya Bach bashers :) We are just a little OT? Anyway, one could certainly argue that all of our ideas are a iterative process built upon small pieces of information and mis-information we pick up here and there. Eventually they morph into a theory or method. I think Juhan's stuff was just a small subsection and more concerned with robshot. Bach thought it out many iterations past that and properly presented it. I consider at least one of his multiple personalities a friend and I wanted to make that point. Also I now feel much safer walking in the rain :)

r6d2
26th September 2003, 19:26
Originally posted by DDogg
One could certainly argue that all of our ideas are a iterative process built upon small pieces of information and mis-information we pick up here and there. Eventually they morph into a theory or method. I think Juhan's stuff was just a small subsection and more concerned with robshot.
Well, if you look closely to the CCE manual, it's all in there. ;) Juhan in fact suggests to look at it for special settings.

The OPV+VAF then VBR is laying in there too.

Differential Calculus was invented almost simultaneously by both Newton and Leibnitz, without any collaboration whatsoever, and the authorship is disputed until today. Then that is creating from scratch.

But just being RTFM consciuous where everyone else is lazy... Maybe does not deserve something named after him at all, even though presenting it as something usable by normal people has a merit indeed. :D

I can already hear the thunders! Oh, my...

DDogg
26th September 2003, 20:28
Just remember he never named it, d2s did. Bach was uncomfortable from the start with the name. He just presented a well thought out presentation of how the RobShot method was flawed, silly and unnecessarily cumbersome. He then quoted from the manual if I remember correctly. In fact, he tended to use the same techniques you do to present ideas based upon fact and not BS. Bach's main problem was he was a natural hothead plus he speaks Portuguese and his English tended to come out, erm, shall we say rather more directly than yours :) Anyway, we really are off topic so I shall cease and desist unless you crank me up again (as I know you do enjoy doing - lol)

r6d2
26th September 2003, 22:04
Originally posted by DDogg
Anyway, we really are off topic
I guess we two are just too eager to see Tylo's anouncement of its new version and cannot step out of this thread :D

/Add:
Back on topic: what do you guys think of improving the plugin with the following stuff:

On its current status, the plugin uses Q as its only quality indicator. Actually, Q is a measure of how similar the encode is from the source. It is not "absolute" quality. i.e., if the source sucks, a low Q will produce a "high quality" encode that will also suck.

On the other hand, sharpness comes from the resolution used. Say you set "Minimum Sharpness"=CVD. Using FACAR, the plugin optimizes the pair Q/Sharpness to provide the best alternative.

Any comments?

DDogg
27th September 2003, 00:16
Any comments? Maybe later. It is a very intriguing thought, but I think conservative stability now for a while may be more important than any new features. That way more people will start using it and it will get some critical mass building. The concept of a declared stable build with a parallel development alpha for us screwball types might be a good one :)

tylo
30th September 2003, 11:07
If I'm not fed up with the plug-in, I may put audio encoding after the video encoding. We can adjust the audio bitrate in various ways, depending on the size of the video created.
No comment except to suggest you may be opening a can of worms for yourself and you might end up losing all your hair (assuming you have any ).
Well, the worms were all over me at some point, :scared: and I think I lost a few hairs too.

Hopefully, I got all the worms back in the can. Just go and try out the new v2.7.0 beta1.
http://home.no.net/tylo/

DDogg
30th September 2003, 13:35
Looks like you have been very busy! Hmmm, maybe I am just confused but on my first test the plugin did not do any prediction tests. It's first pass started doing a OPV @ Q1 100-2644. :confused:

tylo
30th September 2003, 14:39
Sorry 'bout that. One line jumped out of the code just before I uploaded it. You must use 'auto' or '?' until beta2 - tonight.

r6d2
30th September 2003, 15:10
@Tylo,

I noticed that if you don't use the plugin the BeSweetlater.bat is still there... It it supposed to? Perhaps you should set it only during the plugin.

DDogg
30th September 2003, 15:20
Thanks. Doing test with Auto now. Seems to be working fine so far. I will edit in results and log in 2 hours. Actually I am glad this "forced" me to use auto mode as I normally don't. I think I am getting close to trusting it :)

tylo
30th September 2003, 16:18
FAQ: I noticed that if you don't use the plugin the BeSweetlater.bat is still there... It it supposed to? Perhaps you should set it only during the plugin. The only time you'll get this, is when you exit the plugin from the tray while it's in the [Sleep - wait for CCE] mode. If you then start D2S (and not the plugin), BeSweetLater.bat is active, and you must manually reset it to BeSweet.exe. However, if you start the plugin instead (after such exit), the plugin will take care of it.

DDogg
30th September 2003, 16:45
Well I have some more news you will not like. The audio was never done and then of course muxing failed as there was no mp2 file.


========================================================
D2SRoBa v2.7.0 beta1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-30 09:03:05
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 40
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.6
- Sample GOPs : 1
- Sizing pass : on=1 (-3.0 .. 1.0)%
- Audio with plugin : on=1 (% of Video, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 01:40:43 (144899 frames, 23.976 fps)
- D2S audio settings : (128 kbps + 0) kbps
- D2S video estimate : 2025 kbps, 2 CDs
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 1452
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=941 Audio0 BR=128 Video SZ=710866904.
- 2 CD: Video BR=1961 Audio0 BR=192 Video SZ=1481413388.
- 3 CD: Video BR=2982 Audio0 BR=256 Video SZ=2252715310.
- 4 CD: Video BR=4002 Audio0 BR=320 Video SZ=3023261794.
--------------------------------------------------------
- Using Max bitrate=2564 for auto samples (adj. for 2 CDs)
- Estimated mpv size : 683203176. (Q=40, 904 kbps, 6846224 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 710866904. (941 / max 2628) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1021366706. (Q=20, 1352 kbps, 10234884 sample sz)
- Computed mpv size : 852284941. (Q=30, 1128 kbps, 8540554.=(Q40+Q20)/2)
- Computed mpv size : 767744059. (Q=35, 1016 kbps, 7693389.=(Q40+Q30)/2)
- Computed mpv size : 725473668. (Q=37, 960 kbps, 7269807.=(Q40+Q35)/2)
- Estimated mpv size : 704783148. (Q=38, 932 kbps, 7062472 sample sz)
--------------------------------------------------------
- Q Weight : 1.0 - (710866904. / 99.7926997245179 - 7062472) / (7269807. - 7062472)
- Adjust Q : (38 + (0.705964056564278) - (1.6)) = 37.1059640565643
- Determined Q. : 37
--------------------------------------------------------
- Encoding Movie
- 2003-09-30 09:08:26
--------------------------------------------------------
- Actual mpv file size:
09/30/2003 10:36 AM 690842600 Encoded_Video_CCE_NTSC_FS1.mpv
--------------------------------------------------------
- OPV pass result: 97.2% on target ( 690842600 / 710866904.)

tylo
30th September 2003, 18:25
Could be the 'NumOfAudioStreams' under 'Settings' in the .d2s file that isn't set when using frame selection. Using another way now.

Ok, beta2 is uploaded.

DDogg
30th September 2003, 18:38
OK, I'll do another Texas ass-whooping on it and see if I can break it :)

tylo
30th September 2003, 19:57
Ok, beta2 will not work with frame selection + audio. I've fixed it, but I'm not able to upload the latest version at the moment. The bug was caused by a "feature" in D2S: In the ".d2s" file, it says:
MP2FileName0=....\Encoded_audio_1.mp2

So I must get the name from the "bbMPEG Movie Settings1.ini", where I find:
AudioFilename=....\Encoded_audio_1_FS1.mp2

I'll upload ASAP.

/Add: beta3 uploading...

r6d2
30th September 2003, 20:09
Originally posted by tylo
/Add: beta3 uploading...
How I understand you, my friend... I found a "bug" in the original SemiAuto... (It does not show "As seen on TV" when frame size is based on 704. It shrinks them vertically, which is not supposed to.) I've been trying to fix it in FACAR, since it slept through... but I found also FitCD is giving wrong output too!

So back to the sources and FACAR 2.0 is in alpha stage.

DDogg
30th September 2003, 20:36
So I must get the name from the "bbMPEG Movie Settings1.ini", where I find: AudioFilename=....\Encoded_audio_1_FS1.mp2
:confused: So I guess you are now having to kill the mux process? Or can you wait till the ini is created and keep muxing from starting? When frame Selection is used, isn't the name of the audio always the base name plus "_FS'X'.mp2"? Since you only support 1 FS (I think) then the name if FS is on would always be "Encoded_audio_1_FS1.mp2". Wouldn't it? I think I am missing something obvious. ANyway, I stopped the Beta 2 pass at 98% (growl :) ) and have a Beta 3 test started.

tylo
30th September 2003, 20:59
You're surely right. Too fast around the corners.
Ok, I do a last go at it (beta4), and then I quit for the day.

DDogg
30th September 2003, 21:19
Ok, I do a last go at it (beta4), and then I quit for the day. ok, then I can beat it up while you get some sleep :) I expect our time of day is 7 or 8 hours different. Afternoon here. At time of this post is is approx 3:20 PM. Hey, its still "early" there. You still got time to hit Beta 6 :) No self respecting programmer needs more than a couple of hours sleep :D

r6d2
1st October 2003, 14:07
Just finished LOTR:TTT and ended up with 3 filled disks a 80-MB third image, even though they should have been 3. Here is the log:

========================================================
D2Sroba v2.7.0 beta4 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-09-30 22:07:36
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 803
- Number of CD's : auto
- Auto Q. (worst) : 30
- Maximum Q. : 40
- Sample percentage : 1.0
- Adjust Q. : 1.0
- Sample GOPs : 1
- Sizing pass : on=1 (-1.0 .. 0.0)%
- Audio after video : on=1 (% of Video, 10%, min 112 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 02:51:39 (246941 frames, 23.976 fps)
- D2S audio settings : (112 kbps + 0) kbps
- D2S video estimate : 1797 kbps, 3 CDs
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 2472
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=514 Audio 1 BR=112 Video SZ=661743379.
- 2 CD: Video BR=1156 Audio 1 BR=112 Video SZ=1488278884.
- 3 CD: Video BR=1749 Audio 1 BR=160 Video SZ=2251729902.
- 4 CD: Video BR=2327 Audio 1 BR=224 Video SZ=2995869344.
--------------------------------------------------------
- Using Max bitrate=2532 for auto samples (adj. for 4 CDs)
- Estimated mpv size : 1733327628. (Q=30, 1346 kbps, 17351456 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 3
- Target mpv size : 2251729902. (1749 / max 2596) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 2443071225. (Q=15, 1897 kbps, 24456336 sample sz)
- Computed mpv size : 2088199427. (Q=22, 1621 kbps, 20903896.=(Q30+Q15)/2)
- Estimated mpv size : 2277438547. (Q=18, 1768 kbps, 22798272 sample sz)
- Computed mpv size : 2182818987. (Q=20, 1695 kbps, 21851084.=(Q22+Q18)/2)
- Computed mpv size : 2230128767. (Q=19, 1732 kbps, 22324678.=(Q20+Q18)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (2251729902. / 99.8952265372168 - 22324678.) / (22798272 - 22324678.)
- Adjust Q : (19 + (0.543410773467367) - (1.0)) = 18.5434107734674
- Determined Q. : 18
--------------------------------------------------------
- Encoding Movie
- 2003-09-30 22:13:13
- Actual mpv file size:
01/10/2003 00:13 2227166600 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 98.9% on target ( 2227166600 / 2251729902.)
--------------------------------------------------------
- Executing VBR Sizing Pass - 1749 kbps.
- Actual mpv file size:
01/10/2003 02:06 2249095588 Encoded_Video_CCE_NTSC.mpv
- Sizing pass result: 99.9% on target ( 2249095588 / 2251729902.)
--------------------------------------------------------
- Executing: C:\Archivos de programa\DVD2SVCD\BeSweet\BeSweet.exe -core( -input "H:\LOTR II\Audio\Extracted_audio_1.ac3" -output "H:\LOTRII~1\Audio\Encoded_audio_1.mp2" -logfile "H:\LOTRII~1\Audio\Encoded_audio_1.log" ) -azid( -L -3db -l 0db -c normal -s surround -g max ) -2lame( -e -b 160 -m s )
--------------------------------------------------------
- Recover
- 2003-10-01 02:25:37

I'm clueless. The DVD2SVCD.INI file (relevant parts) contains:

MinsHigh1=93
MinsHigh2=139
MinsHigh3=185
MinsHigh4=231
MinsHigh5=278
NumCd1=1
NumCd2=2
NumCd3=3
NumCd4=4
NumCd5=5
NumCd6=6
CDSize 1=803
CDSize 2=803
CDSize 3=803
CDSize 4=803
CDSize 5=803
CDSize 6=803

And the project file:

Number of images=3
Volumes=3
Images=3

Siku
1st October 2003, 14:45
I'm using AVI2SVCD and I'm stucked with CCE encoding part. CCE starts normally but when D2SRoBa closes CCE first time, the GUI dissapears but the cctspt.exe still runs in the backround. Thus a new CCE window is not opened. You can see the EclCCE.exe and cctspt.exe running in the taskmanager. So D2SRoBa does not close the CCE properly. With earlier versions it worked just fine.

Here is the log:
========================================================
D2SRoBa v2.7.0 beta4 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-01 16:17:27
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 2
- Auto Q. (worst) : ---
- Maximum Q. : 128
- Sample percentage : 2.0
- Adjust Q. : 0.8
- Sample GOPs : 1
- Sizing pass : on=1 (-2.0 .. 1.0)%
- Audio after video : on=1 (% of Video, 10%, min 192 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 01:47:41 (154910 frames, 23.976 fps)
- D2S audio settings : (224 kbps + 0) kbps
- D2S video estimate : 1793 kbps, 2 CDs
- SelectRangeEvery : every 750, select 15 frames
- Num. sample frames : 3105
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=809 Audio 1 BR=192 Video SZ=653373113.
- 2 CD: Video BR=1825 Audio 1 BR=192 Video SZ=1473925749.
- 3 CD: Video BR=2778 Audio 1 BR=256 Video SZ=2243597661.
- 4 CD: Video BR=3730 Audio 1 BR=320 Video SZ=3012461942.
--------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1473925749. (1825 / max 2564) kbps
--------------------------------------------------------
- Binary search for Q:

Am I doing something wrong or is this a D2SRoBa issue?

Regards,
Siku

tylo
1st October 2003, 15:47
@r6d2: I interpret that as you are getting 4 images, and the last one is 80mb - i.e it was oversized. Strange - all the number looks perfect to me. I.e: you encoded with the total bitrate (1749 + 160) = 1909, whereas D2S computed (1797 + 112) = 1909.

Hmm. I don't update the project .d2s file to reflect the bitrate changes in audio, so bbMPEG thinks it muxes with a lower audio bitrate than it really does. Could that make a difference for muxing overhead? I would think not, because it does that all the time with the video part. To make sure, I'll update the .d2s file before the recover.

@siku: Thanks, Siku. Did 2.6.0 beta3 work for you as well?

r6d2
1st October 2003, 16:09
Originally posted by tylo
@r6d2: I interpret that as you are getting 4 images, and the last one is 80mb - i.e it was oversized.
No, I get 3 images, the last only 80-Mb size. I checked the muxed files and the are wrong. They are not continuous, they overlap! Audio is in synch, though.
Hmm. I don't update the project .d2s file to reflect the bitrate changes in audio, so bbMPEG thinks it muxes with a lower audio bitrate than it really does. Could that make a difference for muxing overhead? I would think not,
I agree with you, since bbMPEg sort of analyses before actually muxing. But I cannot think of any other explanation that the project file. Please also fix the Movie info and other stuff to reflect correct audio...

Siku
1st October 2003, 16:20
Originally posted by tylo
Did 2.6.0 beta3 work for you as well?

Yep, 2.6.0 beta 3 worked fine. 2.7.0 beta1 was the first version with this problem.

tylo
1st October 2003, 16:29
Ok, I'll do the CCE termination as in 2.6.0, and update audio bitrate in the project files if audio bitrate was changed. --> beta5.

r6d2
1st October 2003, 16:42
Originally posted by tylo
Ok, I'll do the CCE termination as in 2.6.0, and update audio bitrate in the project files if audio bitrate was changed. --> beta5.
I manually fixed the 2 112 mentions to 160 on the D2S file and the recover worked great!

DDogg
1st October 2003, 17:00
Reporting in sir :) Did a episode of 24. Set disk size as 400. Ended up with 2 mpgs, one 404,258 k and second 436 k.

/ADD: Given that I had fixed bitrate for audio chosen and the sizing pass was executed, why do you think it was oversized?

Here are logs for your data:
========================================================
D2SRoBa v2.7.0 beta4 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-01 08:44:44
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 400
- Number of CD's : 1
- Auto Q. (worst) : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.6
- Sample GOPs : 1
- Sizing pass : on=1 (-2.0 .. 1.0)%
- Audio after video : on=1 (Fixed bitrate, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 00:42:43 (61466 frames, 23.976 fps)
- D2S audio settings : (128 kbps + 0) kbps
- D2S video estimate : 1128 kbps, 1 CDs
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 624
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=1128 Audio 1 BR=128 Video SZ=361474225.
- 2 CD: Video BR=2400 Audio 1 BR=128 Video SZ=769094095.
- 3 CD: Video BR=3672 Audio 1 BR=128 Video SZ=1176713964.
- 4 CD: Video BR=4944 Audio 1 BR=128 Video SZ=1584333834.
--------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 361474225. (1128 / max 2628) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 403389932. (Q=32, 1258 kbps, 4095196 sample sz)
- Estimated mpv size : 322996738. (Q=48, 1007 kbps, 3279048 sample sz)
- Estimated mpv size : 356635583. (Q=40, 1112 kbps, 3620548 sample sz)
- Computed mpv size : 380012757. (Q=36, 1185 kbps, 3857872.=(Q40+Q32)/2)
- Computed mpv size : 368324170. (Q=38, 1149 kbps, 3739210.=(Q40+Q36)/2)
- Estimated mpv size : 361373981. (Q=39, 1127 kbps, 3668652 sample sz)
--------------------------------------------------------
- Q Weight : 1.0 - (361474225. / 98.5032051282051 - 3668652) / (3739210. - 3668652)
- Adjust Q : (39 + (0.985576723471315) - (1.6)) = 38.3855767234713
- Determined Q. : 38
--------------------------------------------------------
- Encoding Movie
- 2003-10-01 08:49:29
- Actual mpv file size:
10/01/2003 09:47 AM 393383692 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 108.8% on target ( 393383692 / 361474225.)
--------------------------------------------------------
- Executing VBR Sizing Pass - 1128 kbps.
- Actual mpv file size:
10/01/2003 10:42 AM 361127208 Encoded_Video_CCE_NTSC.mpv
- Sizing pass result: 99.9% on target ( 361127208 / 361474225.)
--------------------------------------------------------
- Executing: C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe -core( -input "C:\24\Extracted_audio_1.ac3" -output

"C:\24\Encoded_audio_1.mp2" -logfile "C:\24\Encoded_audio_1.log" ) -azid( -L -3db -l 0db -c normal -s surround -g max ) -2lame( -e -b 128

-m s )
--------------------------------------------------------
- Recover
- 2003-10-01 10:45:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dvd2svcd Log
--------------------------------------------------------
- 10/1/2003 8:43:39 AM
- Free on drive C: 17338.40 mb
- Crash Recovery
- Restarting from: Video encoding
--------------------------------------------------------
- 10/1/2003 8:43:42 AM
- Free on drive C: 17338.40 mb
- Video Encoding using Cinema Craft
--------------------------------------------------------
- Editing AVS script file

Executing Cinema Craft Encoder.
StreamSectors: 415614864
AudioSectors: 41655376
VideoPAPO: 5792832
ScanOffsetBytes: 92199
SeqAligningBytes: 5859759
DVDBytes: 0
VideoEndHeader: 4
SubtitleSectors: 0
EmptySectors: 238.00
PictureSectors: 1.00
PureMPEGStream: 362214694.33
Seconds: 2568.65
CalcMPEGStream: 362214694.33
Frames: 61466
CDSize: 400.00
Number of CDs: 1
Cut point 395.00
Variable Settings:
Frames: 61466
Anti Noise Filter: Off
Passes: 1
Image Quality: 17
VAF file creation: On
Video Encoding Mode: One Pass VBR
Q. Factor: 33
Min. bitrate: 100
Max. bitrate: 1128
Aspect Ratio: 16:9 (borders added, encoded as 4:3)

---AVS Begin---
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\INVERS~1\decomb.dll")
mpeg2source("C:\24\DVD2AV~1.D2V")
Telecide()
Decimate(5)
DetectedTop=0 DetectedHeight=480
ResizeTo=0 global ResizeMethod=1
GammaCorrection=1.0 Hue=0 Saturation=1.0 Brightness=0 Contrast=1.0
OverscanH=0.04 OverscanV=0.04 BlockOptimization=0
global Bicubic_b_Value=0 global Bicubic_c_Value=0.6
DebugMode=0
DestinationWidth=720
DestinationHeight=360
# Import("C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\FACAR\qmf15b1.avs")
# Import("C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\FACAR\QMF_functions.avs")
Import("C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\FACAR\PreResize.avs")
Import("C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\FACAR\FACAR.avs")
Import("C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\FACAR\PostResize.avs")
ConvertToYUY2()
----AVS End----

--------------------------------------------------------
- 10/1/2003 10:45:19 AM
- DVD to SVCD Conversion
- DVD2SVCD ver. 1.2.1 build 2b
--------------------------------------------------------
Initializing
-
Initializing finished.

--------------------------------------------------------
- 10/1/2003 10:45:19 AM
- Free on drive C: 17370.28 mb
- Restarting from: Pulldown
--------------------------------------------------------
- 10/1/2003 10:45:21 AM
- Free on drive C: 17714.27 mb
- Video Pulldown
--------------------------------------------------------
Executing Pulldown. Commandline:
"C:\Program Files\DVD2SVCD\Pulldown\PULLDOWN.EXE" "C:\24\Encoded_Video_CCE_NTSC.mpv" "C:\24\Pulldown_Encoded_Video_NTSC.mpv"
Video pulldown finished.

--------------------------------------------------------
- 10/1/2003 10:46:12 AM
- Free on drive C: 17369.86 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 10/1/2003 10:46:14 AM
- Free on drive C: 17369.84 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 10/1/2003 10:46:17 AM
- Free on drive C: 17369.84 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 10/1/2003 10:46:19 AM
- Free on drive C: 17369.82 mb
- Multiplexing and cutting
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
Offset in Seconds: 2
Executing bbMPEG.
Variable Settings:
Movie offset: 2 seconds
Cut point: 395 mb

Executing RunbbMPEG. Commandline:
"C:\Program Files\DVD2SVCD\bbMPEG\RunbbMPEG.exe" "C:\24\bbMPEG_Muxed_File.mpg"
Multiplexing and cutting finished.

--------------------------------------------------------
- 10/1/2003 10:48:19 AM
- Free on drive C: 16974.53 mb
- Determining length of audio
--------------------------------------------------------
Analyzing: C:\24\bbMPEG_Muxed_File00.mpg
2557.848 seconds C:\24\bbMPEG_Muxed_File00.mpg
Analyzing: C:\24\bbMPEG_Muxed_File01.mpg
4.008 seconds C:\24\bbMPEG_Muxed_File01.mpg
Analyzing finished.

--------------------------------------------------------
- 10/1/2003 10:48:48 AM
- Free on drive C: 16974.53 mb
- Creating CD-Images using VCDXBuild
--------------------------------------------------------
- No. of chapters to create: 1

CD image #1: CD_Image_File_CD1.bin

Executing VCDXBuild. Commandline:
"C:\Program Files\DVD2SVCD\VCDImager\vcdxbuild.exe" --verbose --cue-file="C:\24\CD_Image_File_CD1.cue" --bin-file="C:\24\CD_Image_File_CD1.bin" "C:\24\VCDXBU~1.XML"
--------------------------------------------------------
- 10/1/2003 10:50:25 AM
- Free on drive C: 16572.23 mb
- Creating CD-Images using VCDXBuild
--------------------------------------------------------
- No. of chapters to create: 1

CD image #2: CD_Image_File_CD2.bin

Executing VCDXBuild. Commandline:
"C:\Program Files\DVD2SVCD\VCDImager\vcdxbuild.exe" --verbose --cue-file="C:\24\CD_Image_File_CD2.cue" --bin-file="C:\24\CD_Image_File_CD2.bin" "C:\24\VCDXBU~2.XML"
Image creation finished.

--------------------------------------------------------
- 10/1/2003 10:50:30 AM
- Free on drive C: 16570.42 mb
- Conversion done!
--------------------------------------------------------

Trahald
1st October 2003, 19:59
havent tried the new version yet. prolly give it a whirl tomorrow.. started experimenting with "kvcd". cant have 2 x factors at the same time. ;) anywho.. i changed the sleep, 3000 (i think thats what it was) line before d2sr loads eclcce the first time to 30000 ... works like i charm ( i woke up to the 'sorry, only one instances of eclcce" message again.. :( .. so i did a little tweaking ). thankfully RB is removing that from the next version of eclcce so i'll just manually add the extra sleep time when i try new betas for now.

telemike
1st October 2003, 20:20
How soon before a stable version is ready? Which previous version should I use when I need to do a backup? :confused:

DDogg
1st October 2003, 21:23
@TeleMike - Beta 4 is working well. Maybe uncheck the do audio thing until beta 5. Since 128 is the minimum most would want on a 1cd encode you may not end up using it anyway so just set that in d2s like you used to do. If you are uncomfortable with that then use beta 2 of the previous version. Just make sure your time bands are set properly.

@tylo, just finished a batch operation and all was well. One encode again had a very small second mpg created. tylo, I think you are real close to getting a rest. That small secondary file is the only thing I have found with beta 4. Great job! Note I have not yet tried a dvd2dvd encode.


------------------------------
Using awesome Biostar NF2 400

tylo
2nd October 2003, 08:47
Uploaded beta6:
The dynamic audio was maybe stretching the plugin too far. But hopefully, the beta6 will do the job also when it comes to recover.

@w00kie: I've put in a 5 sec sleep before the second start of CCE - I think that should be enough.

@DDogg: I'm clueless on your '24' episode encode. Almost seems like a D2S bug - can you verify that audio came out 128 kbps.
Just make sure your time bands are set properly.This is one of the things that shouldnt be needed anymore - at least not for CD sizes at 740-900. You can verify it yourself fast by:
- breaking the plugin after the first sample has started,
- then restart plugin and change num CDs within the correct time band,
- recover at video, then break the plugin after the first sample again:

Check out this: (This gave an amazing 1274 kbps encode of the 2nd Harry Potter movie)Listing 1
*********
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 40
- Maximum Q. : 128
- Sample percentage : 3.0
- Adjust Q. : 2.0
- Sample GOPs : 1
- Sizing pass : on=1 (-3.0 .. 1.0)%
- Audio after video : on=1 (% of Video, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 02:34:21 (231542 frames, 25 fps)
- D2S audio settings : (160 kbps + 0) kbps
- D2S video estimate : 1950 kbps, 3 CDs
- SelectRangeEvery : every 500, select 15 frames
- Num. sample frames : 6960
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=565 Audio 1 BR=128 Video SZ=654106150.
- 2 CD: Video BR=1274 Audio 1 BR=128 Video SZ=1474922540.
- 3 CD: Video BR=1918 Audio 1 BR=192 Video SZ=2220487780.
- 4 CD: Video BR=2563 Audio 1 BR=256 Video SZ=2967210730.

Listing 2
*********
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 40
- Maximum Q. : 128
- Sample percentage : 3.0
- Adjust Q. : 2.0
- Sample GOPs : 1
- Sizing pass : on=1 (-3.0 .. 1.0)%
- Audio after video : on=1 (% of Video, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 02:34:21 (231542 frames, 25 fps)
- D2S audio settings : (160 kbps + 0) kbps
- D2S video estimate : 1242 kbps, 2 CDs
- SelectRangeEvery : every 500, select 15 frames
- Num. sample frames : 6960
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=565 Audio 1 BR=128 Video SZ=654106150.
- 2 CD: Video BR=1274 Audio 1 BR=128 Video SZ=1474922540.
- 3 CD: Video BR=1919 Audio 1 BR=192 Video SZ=2221645490.
- 4 CD: Video BR=2564 Audio 1 BR=256 Video SZ=2968368440.

Trahald
2nd October 2003, 12:44
those results look good, tylo. great work. gonna go with newest version on tonites encode.

r6d2
2nd October 2003, 15:01
@Tylo, look at this:

Calculations:
- 1 CD: Video BR=502 Audio 1 BR=128 Video SZ=642616951.
- 2 CD: Video BR=1147 Audio 1 BR=128 Video SZ=1468290124.
- 3 CD: Video BR=1760 Audio 1 BR=160 Video SZ=2252999667.
- 4 CD: Video BR=2342 Audio 1 BR=224 Video SZ=2998025693.
--------------------------------------------------------
- Using Max bitrate=2532 for auto samples (adj. for 4 CDs)

I think that auto samples must be done with max=(adjusted for the min. audio BR). Otherwise the plugin may select a different number of CDs than needed.

I don't have time to elaborate on this now, but please give it a thought. I think you'll get it.

Siku
2nd October 2003, 19:51
@tylo

I ran a test with beta6 using AVI2SVCD and it worked like a charm. There were no issues whatsoever. Thank you. :)

Regards,
Siku

DDogg
2nd October 2003, 22:58
tylo, the plugin does not fix the corruption with the besweetlater.bat file, contrary to your previous post. Even if the plugin is started, audio is unchecked, when d2sroba launches d2s the besweetlater.bat is still there. I hope you can check this, in fact I hope there may be a way to restore all settings corrupted by the plugin. I can fully understand your need to change some settings, but not resetting them to what they were before the plugin changed them is a trifle intrusive, imo. Hope you can think about this.

Other than that it seems to be working well.

tylo
2nd October 2003, 23:50
It finally seem to work well for me now. Last two of mine encodes worked exactly as I wanted.
@DDogg: There is no corruption regarding the BeSweetLater.bat. I've tested this very thorough. If you have exited the plugin from the tray (before the sample encodings has started), The BeSweetLater.bat will be there if you open D2S alone. This cannot be avoided.

To restore besweet.exe:
Alt. 1) Start the plugin + pressing GO in the plugin GUI. D2S starts. Then either exit D2S or continue as normal.

Alt. 2) Set BeSweet back manually in D2S.

Both will work.

DDogg
2nd October 2003, 23:54
If you have exited the plugin from the tray (before the sample encodings has started), The BeSweetLater.bat will be there if you open D2S alone. This cannot be avoided.No problem with that as I can completely understand how that is unavoidable.
Alt. 1) Start the plugin + pressing GO in the plugin GUI. D2S starts. Then either exit D2S or continue as normal.
Nope. Did exactly that. Ran plugin, made sure audio was unchecked, pressed go, checked and saw BSlater.bat still there, exited d2s, reran d2s and besweetlater.bat is still there. Further, I certainly would think if you run the plugin, select no audio and then press go that by all means the besweet path should be restored to normal. Do you disagee? Obviously 2 would work but I think that would be a very bad mannered thing indeed.

No matter what I try, I can not get d2sroba to fix/ change the besweetlater.bat back to what it is supposed to be.

As said, other than that, it is awesome.

tylo
3rd October 2003, 07:17
Oh, I get it. It doesn't reset besweet when Audio is unchecked. I'll fix that for the RC1.
Here's what the plugin will set in D2S before starting it:
- Encoding mode: OPV for RoBa - Multipass for Credits Tweaking
- Unsets D2S avisynth edit when 'Batch Prepare' is set.
- The time bands and num CDs in the Bitrate Tab.
- BeSweeet exe when Audio is checked. (I will add reset always)

All other changes are on the project only. Except for maybe the 'avisynth edit' I don't see the real need to reset the other settings - it may be more confusing for the user.

/Add: 2.7.0 RC1 uploaded.
http://home.no.net/tylo/

DDogg
3rd October 2003, 14:09
Thanks for looking in to this! It now resets it perfectly. Nice to see that RC status. I'll try to do a dvd2dvd test today and get you those results. Great job!

Holomatrix
3rd October 2003, 15:25
Awesome work :) the pic you have on your website, would that be what you think the default settings should be for new users to start with?

tylo
3rd October 2003, 16:03
I'll try to do a dvd2dvd test today and get you those results. Great job!Thanks.
Awesome work the pic you have on your website, would that be what you think the default settings should be for new users to start with?They are quite good, but I think it's now also safe to tick on the Audio part. That will automatically choose a good balance between the video and audio bitrate - typically 128 kbps for a 1CD encode, and 160/192/224 for a 2CD. You may lower the 'Sample %' to 2.0 or even 1.0 - we don't seem to agree on it. I'll try to set up the best values for new users (and make them default) for the next rc/release.

r6d2
3rd October 2003, 20:11
CD Size: 803
D2S assumes a CD size of 800 by default. However, CDs are not 800-MB, but 798 instead. Then the BR calculation substracts 5 from the default size, using 795. By using 803 (798+5) you use the actual total capacity of the disk.
There's a risk though: bbMPEG may create 80.10 minute images, which will surely burn OK with overburning.
Num CDs: auto
Trust your guts! Use the force!
Auto Q: 30
A value of 20 will give you about 2 times the optimum quantization possible for a SVCD at Avg=Max. Q=30 will give you about 2.5 times and Q=40 will give you about 3.3 times.
Maximum Q: 40
Useful for reasonable alternatives in "?" mode.
Adjust Q: 1
Good gamble IMHO.
Sizing pass: On, -2%, 0%
for full-CD freaks.
Audio creation: On, 10%, Min br=112
Sample size: 1% (/Add)

DDogg
3rd October 2003, 20:18
I note you skated right past the sample size :) (clucking like chicken) 1% is all I use anyway.

Trahald
4th October 2003, 04:48
100% sample !!

:) just kidding

speaking of disk size. *wish list* it would be nice if there were an option to have d2sroba set the disk size to reflect the new size of the disks ie (if you dont have vbr pass on or final encoded size is within the excepted % range) and your 2 disk encode comes out 1610 mb to cut the disks to 805 and 805 instead of 800 , 800 and 10. it would be set to the new size before d2s resumes for pulldown/mux *end wish list*

:D

DDogg
4th October 2003, 13:48
I did an auto last night with audio set at 10% as a test. This morning D2V is up with it's exceeded bitrate warning up. So that might be an area you might want to look at.

Yeah, a restart shows the warning with a total bitrate of 2808 and the audio settings in D2S have been changed to 224 instead of the 160 I had set it to.
========================================================
D2SRoBa v2.7.0 RC1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-04 08:06:26
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 32
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.0
- Sample GOPs : 1
- Sizing pass : on=1 (-3.0 .. 1.0)%
- Audio after video : on=1 (% of Video, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 01:57:23 (168886 frames, 23.976 fps)
- D2S audio settings : (160 kbps + 0) kbps
- D2S video estimate : 1685 kbps, 2 CDs
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 1692
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=787 Audio 1 BR=128 Video SZ=692949627.
- 2 CD: Video BR=1685 Audio 1 BR=160 Video SZ=1483634208.
- 3 CD: Video BR=2552 Audio 1 BR=224 Video SZ=2247023441.
- 4 CD: Video BR=3386 Audio 1 BR=320 Video SZ=2981356336.
--------------------------------------------------------
- Using Max bitrate=2596 for auto samples (adj. for 2 CDs)
- Estimated mpv size : 1612150223. (Q=32, 1830 kbps, 16151476 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 3
- Target mpv size : 2247023441. (2552 / max 2532) kbps
--------------------------------------------------------
- Computing oversize num CDs: adj_target_brate = 2532
- Adjusted CD size : 794 (fillrate = 0.993)
--------------------------------------------------------
- Encoding Movie
- 2003-10-04 08:08:32

DDogg
4th October 2003, 19:06
Still having problems on my tests for you with d2sroba audio on. The log below is where I did a "?" test encode on the same source with audio on 10%. I choose 2 cds from the results presented. The File size on the second bin was 757,180 kb. The sizing pass did run, so that was a pretty large sizing error.

/Later - I did a 2 disk encode with no d2sroba audio and it was as usual, perfect. I will not post that log unless you ask for it.

D2SRoBa v2.7.0 RC1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP ("?" with audio 10%)
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-04 08:23:31
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : ?
- Auto Q. (worst) : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.0
- Sample GOPs : 1
- Sizing pass : on=1 (-3.0 .. 1.0)%
- Audio after video : on=1 (% of Video, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 01:57:23 (168886 frames, 23.976 fps)
- D2S audio settings : (160 kbps + 0) kbps
- D2S video estimate : 1621 kbps, 2 CDs
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 1692
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=755 Audio 1 BR=128 Video SZ=664773785.
- 2 CD: Video BR=1621 Audio 1 BR=160 Video SZ=1427282523.
- 3 CD: Video BR=2456 Audio 1 BR=224 Video SZ=2162495913.
- 4 CD: Video BR=3258 Audio 1 BR=320 Video SZ=2868652966.
--------------------------------------------------------
- Using Max bitrate=2628 for auto samples (adj. for 1 CDs)
- Estimated mpv size : 1055705588. (Q=64, 1198 kbps, 10576684 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1427282523. (1621 / max 2596) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1612150223. (Q=32, 1830 kbps, 16151476 sample sz)
- Estimated mpv size : 1275188716. (Q=48, 1448 kbps, 12775596 sample sz)
- Estimated mpv size : 1427744677. (Q=40, 1621 kbps, 14303992 sample sz)
- Computed mpv size : 1351466696. (Q=44, 1534 kbps, 13539794.=(Q48+Q40)/2)
- Computed mpv size : 1389605687. (Q=42, 1578 kbps, 13921893.=(Q44+Q40)/2)
- Computed mpv size : 1408675232. (Q=41, 1599 kbps, 14112943.=(Q42+Q40)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (1427282523. / 99.8144208037825 - 14112943.) / (14303992 - 14112943.)
- Adjust Q : (41 + (2.42352965777999e-002) - (1.0)) = 40.0242352965778
- Determined Q. : 40
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 3
- Target mpv size : 2162495913. (2456 / max 2532) kbps
--------------------------------------------------------
- Computing oversize num CDs: adj_target_brate = 2456
========================================================
- Selected num CDs : 2 (Q=40)
--------------------------------------------------------
- Encoding Movie
- 2003-10-04 08:33:38
- Actual mpv file size:
10/04/2003 10:14 AM 1328615384 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 93.1% on target ( 1328615384 / 1427282523.)
--------------------------------------------------------
- Executing VBR Sizing Pass - 1621 kbps.
- Actual mpv file size:
10/04/2003 12:01 PM 1426074184 Encoded_Video_CCE_NTSC.mpv
- Sizing pass result: 99.9% on target ( 1426074184 / 1427282523.)
--------------------------------------------------------
- Executing: C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe -core( -input "C:\holes\Extracted_audio_1.ac3" -output "C:\holes\Encoded_audio_1.mp2" -logfile "C:\holes\Encoded_audio_1.log" ) -azid( -L -3db -C 0db -S /
0db -c normal -s surround -g max ) -2lame( -e -b 160 -m s )
--------------------------------------------------------
- Recover
- 2003-10-04 12:11:53

homerjay
4th October 2003, 23:44
just to report in with RC1 2 avi conversions have failed at bbmpeg stage as no .mp2 file was created :confused:

r6d2
5th October 2003, 00:49
I did an encode with two audio tracks (with Audio later in D2Sroba) and got a strange "List out of bounds" error in D2S :confused:

I redid it without letting D2Sroba do the audio and it worked fine. :(

tylo
5th October 2003, 19:59
Thanks for all the logs and test results!
Surely, the "audio creation after video" is not perfect, and the conclusion from your results is that with the audio ticked on, the current RC1 is limited to one audio, and DVD2SVCD only (not AVI2SVCD).

DDogg's report also shows that the untested "CD size" reduction may not work - which is more serious. For now, increase 'Auto Q' (e.g 40) to reduce risc to for that situation. Recommended also 'Adjust Q'=1.3

I'm not sure how much I will look into the audio things for the moment - you can always tick it off for those cases that causes problems.

But, please continue reporting anomalities/bugs that you may find.

Ps: I've converted about 2/3rd of the code to AutoIt3, so I may spend some time on that.

Cheers

DDogg
5th October 2003, 20:42
I think people should just uncheck, "Audio creation after Video" in the plugin for now. With it off everything seems to work pretty well.

Siku
5th October 2003, 21:41
I'm having some CCE termination problems with v2.7.0 RC1 using AVI2SVCD. This time I used 'auto' mode for 'Number of CD's' prediction. Again, D2SRoBa won't shut down the CCE properly: the GUI disappears but the CCE keeps running at the backgroud.

Here's the log file:
========================================================
D2SRoBa v2.7.0 RC1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-05 23:27:16
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 803
- Number of CD's : auto
- Auto Q. (worst) : 30
- Maximum Q. : 40
- Sample percentage : 1.0
- Adjust Q. : 1.0
- Sample GOPs : 1
- Sizing pass : on=1 (-2.0 .. 0.0)%
- Audio after video : on=0 (% of Video, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 01:48:45 (163144 frames, 25 fps)
- D2S audio settings : (192 kbps + 0) kbps
- D2S video estimate : 1812 kbps, 2 CDs
- SelectRangeEvery : every 1500, select 15 frames
- Num. sample frames : 1635
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=802 Audio 1 BR=192 Video SZ=654207440.
- 2 CD: Video BR=1812 Audio 1 BR=192 Video SZ=1478084640.
- 3 CD: Video BR=2822 Audio 1 BR=192 Video SZ=2301961840.
- 4 CD: Video BR=3832 Audio 1 BR=192 Video SZ=3125839040.
--------------------------------------------------------
- Using Max bitrate=2564 for auto samples (adj. for 2 CDs)
- Estimated mpv size : 813572287. (Q=30, 997 kbps, 8153476 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1478084640. (1812 / max 2564) kbps
--------------------------------------------------------
- Binary search for Q:


Regards,
Siku

Trahald
5th October 2003, 22:11
i did a disk=1 with audio on with rc1 last night. cce didnt terminate( the 2 instance of cce thing).. i need to hang around long enough before i goto bed for that part so i can crash recover if that happens since now i dont have to wait for audio to encode. anyways.. when i got up this morning i crash recovered from video encode and all went well. the mpv was at 96% and i didnt have vbr pass on (im not too anal about that) the final file was about 790mb.. worked perfectly. autoit seems to be leaving the WinWaitClose loop too soon, prolly cause its just checking if the wrapper (eclcce) is closed.. not cce. maybe a separate killbyname for cce.exe might help *shrug*.

i like the new version of autoit. ProcessClose() was sorely needed

DDogg
6th October 2003, 06:41
I give up in confusion :scared: Now it is trying to use CBR at 500 kbps for a 3 cd encode.

D2SRoBa v2.7.0 RC1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-06 00:35:37
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : 3
- Auto Q. (worst) : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.6
- Sample GOPs : 1
- Sizing pass : on=1 (-2.0 .. 1.0)%
- Audio after video : on=1 (Fixed bitrate, 10%, min 160 kbps)
- Adjust max video br : on=0 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 01:52:54 (162421 frames, 23.976 fps)
- D2S audio settings : (160 kbps + 0) kbps
- D2S video estimate : 2230 kbps, 3 CDs
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 1632
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=626 Audio 1 BR=160 Video SZ=530090226.
- 2 CD: Video BR=1428 Audio 1 BR=160 Video SZ=1209215403.
- 3 CD: Video BR=2230 Audio 1 BR=160 Video SZ=1888340581.
- 4 CD: Video BR=3032 Audio 1 BR=160 Video SZ=2567465758.
--------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 3
- Target mpv size : 1888340581. (2230 / max 2584) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1727393912. (Q=32, 2039 kbps, 17356788 sample sz)
- Estimated mpv size : 2040762540. (Q=16, 2409 kbps, 20505504 sample sz)
- Estimated mpv size : 1896215016. (Q=24, 2239 kbps, 19053096 sample sz)
- Computed mpv size : 1811804464. (Q=28, 2139 kbps, 18204942.=(Q32+Q24)/2)
- Computed mpv size : 1854009740. (Q=26, 2189 kbps, 18629019.=(Q28+Q24)/2)
- Computed mpv size : 1875112428. (Q=25, 2214 kbps, 18841058.=(Q26+Q24)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (1888340581. / 99.5226715686274 - 18841058.) / (19053096 - 18841058.)
- Adjust Q : (25 + (0.37315017883995) - (1.6)) = 23.7731501788399
- Determined Q. : 23
- Adjusted CD size : 1 (fillrate = )
--------------------------------------------------------
- Encoding Movie
- 2003-10-06 00:38:04

Trahald
6th October 2003, 13:04
did my first disk=auto with audio=1 last night got 2 cds
of perfect size (800mb). came out great.

heres the log to look at...


========================================================
D2SRoBa v2.7.0 RC1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-06 00:13:24
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 60
- Maximum Q. : 128
- Sample percentage : 2.0
- Adjust Q. : 0.8
- Sample GOPs : 1
- Sizing pass : on=1 (-3.0 .. 1.0)%
- Audio after video : on=1 (% of Video, 10%, min 96 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 02:23:17 (206141 frames, 23.976 fps)
- D2S audio settings : (192 kbps + 0) kbps
- D2S video estimate : 2084 kbps, 3 CDs
- SelectRangeEvery : every 750, select 15 frames
- Num. sample frames : 4125
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=652 Audio 1 BR=96 Video SZ=700721201.
- 2 CD: Video BR=1384 Audio 1 BR=128 Video SZ=1487420463.
- 3 CD: Video BR=2084 Audio 1 BR=192 Video SZ=2239728500.
- 4 CD: Video BR=2784 Audio 1 BR=256 Video SZ=2992036537.
--------------------------------------------------------
- Using Max bitrate=2564 for auto samples (adj. for 3 CDs)
- Estimated mpv size : 1370844347. (Q=60, 1275 kbps, 27431384 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1487420463. (1384 / max 2628) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 2195888093. (Q=30, 2043 kbps, 43940984 sample sz)
- Computed mpv size : 1783366220. (Q=45, 1659 kbps, 35686184.=(Q60+Q30)/2)
- Computed mpv size : 1577105284. (Q=52, 1467 kbps, 31558784.=(Q60+Q45)/2)
- Estimated mpv size : 1445200230. (Q=56, 1344 kbps, 28919288 sample sz)
- Computed mpv size : 1511152757. (Q=54, 1406 kbps, 30239036.=(Q56+Q52)/2)
- Estimated mpv size : 1464984569. (Q=55, 1363 kbps, 29315184 sample sz)
--------------------------------------------------------
- Q Weight : 1.0 - (1487420463. / 49.9735757575758 - 29315184) / (30239036. - 29315184)
- Adjust Q : (55 + (0.514039958161679) - (0.8)) = 54.7140399581617
- Determined Q. : 54
--------------------------------------------------------
- Encoding Movie
- 2003-10-06 00:28:14
- Actual mpv file size:
10/06/2003 02:06 AM 1430636184 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 96.2% on target ( 1430636184 / 1487420463.)
--------------------------------------------------------
- Executing VBR Sizing Pass - 1384 kbps.
- Actual mpv file size:
10/06/2003 03:47 AM 1486044792 Encoded_Video_CCE_NTSC.mpv
- Sizing pass result: 99.9% on target ( 1486044792 / 1487420463.)
--------------------------------------------------------
- Executing: C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe -core( -input "C:\Program Files\DVD2SVCD\Movie\s1d3e3\Extracted_audio_1.ac3" -output "C:\PROGRA~1\DVD2SVCD\Movie\s1d3e3\Encoded_audio_1.mp2" -logfile "C:\PROGRA~1\DVD2SVCD\Movie\s1d3e3\Encoded_audio_1.log" ) -azid( -L -3db -l 0db -c normal -s surround -g max ) -ota( -d -111 ) -2lame( -e -b 128 -m s )
--------------------------------------------------------
- Recover
- 2003-10-06 03:58:29

tylo
6th October 2003, 14:21
@DDogg: I'll try to upload RC2, which just removes the broken 'CD size reduction' for the cases when it cannot fill the last CD, due to the max SVCD bitrate constraint. As I said the 'audio creation after video' works for me when DVD -> SVCD and one audio, but otherwise untick it.

@w00kie: I've tried several things to make sure CCE & EclCCE exits, but none seems to work well on your system. Maybe the new AutoIt3 process functions will help us. The code is just so much more readable and easy maintainable with AutoIt3 + it has a lot of new features compared to AutoIt2, so its really no way back.

Trahald
6th October 2003, 16:32
@tylo: yeah.. for now i made a tiny autoit3 script that tracks the progress and after d2sroba closes the "%, saving" cce dialogue, i have it do a processclose("cce.exe") processclosewait("cce.exe") then it exits. worked last night (although i waited to make sure) so im ok for now

r6d2
7th October 2003, 15:08
@Tylo,

It's working like a charm to me with 1 audio track, which is the usual case I do.

I noticed that when OPV succeedes, the SVCDinfo file still has the encoding parameters first set in D2S. Would you please update the Q factor in the INI/D2S file in order to have it documented properly on the SVCD?

Thanks a lot.

Trahald
7th October 2003, 17:25
did another 1 audio encode last night disks=auto audioafter=1 sizingpass=1 came out perfect.

guess i'll try a 2 audio of the same movie for fun.

DDogg
7th October 2003, 21:24
tylo, I stumbled upon a problem that had made me think I was actually going nuts.

Ok, imagine we have done two encodes. One in dir 24-7 and the last encode in 24-8 which finishes fine. Now, we decide to go back and reencode 24-7 using d2sroba by doing a restart in that dir. The odd, make ddogg nuts fun begins. It is a little hard to write about clearly so be patient.

You will notice that when d2s first engages CCE the file browser will be in the *24-8* directory (the directory it was last used in). D2S will then generate into the browser the *full* file path with 24-7\whatever which effectively changes the dir to 24-7. No problem and it continues upon its way with no problems.

However, when d2sroba kills cce and d2s and then restarts cce it will mysteriously start working in the 24-8 directory. I would suspect you are picking up that original working dir from somewhere in d2s, but if a restart is done in a different dir you are not picking up that change even though d2s is by using the full path insertion trick.

Frankly I thought I was going senile these last few weeks, as several times I had reworked/reencoded several episodic dvds before burning, to only later find out the episodes were not what I had them marked as. I thought I had just been very sloppy when I chose my restart dir. So, anyone reading this with a similar problem, you are not crazy :)

I think you should be able to verify this easily. Let me know if you cannot.

r6d2
7th October 2003, 22:19
Originally posted by DDogg
D2S will then generate into the browser the *full* file path with 24-7\whatever which effectively changes the dir to 24-7. No problem and it continues upon its way with no problems.

However, when d2sroba kills cce and d2s and then restarts cce it will mysteriously start working in the 24-8 directory.

This is an old "feature" (I was curious nobody ever pointed it out before). It has to do with the way D2S stores the paths in the global INI and the local project INI file. It is a difficult to spot bug since you normally work with one movie at a time. ;)

The workaround is to select the new working dir in D2S and close D2S once before retrying the new dir. It has worked for me, even tough a fix by Tylo would be great.

DDogg
7th October 2003, 22:38
Well since d2s works with a restart from the dir and d2sroba does not, I think it would be classed as a critter, but of course I would never say such a thing :)

tylo
7th October 2003, 22:45
@DDogg, I don't think there is a difference on D2S and D2SRoBa here.

D2S has never managed to deal with the global ini files. /Edit: (D2S does load the output path). But after a recover it saves most of the settings used for that project back to the global ini-files, which it shouldn't.

Sadly, things hasn't exactly improved with the three new ini files. (DVD.ini, SVCD.ini, ..). The redundancy (multiple storage) of so many variables is just a nightmare for plugin developers like me. Hope D2S will look into this one day.

/Add: The thing is: there are no less than three ini-files to choose from: dvd2svcd.ini and SVCD.ini in the home dir, and the DVD2SVCD.INI in the project dir. They all store more or less the same info, and what is the correct info from which file at a given time is not easy to figure out.

DDogg
7th October 2003, 22:50
Actually, he just got back and is looking at a few things for a new release. One of them he called "tylo's bug" whatever that means, although that may have been fixed in the two test builds he put out. If you have time to elaborate what you need, he might be able to get it in this next release due out in a few days. Oh, any news on RC2?

/Add: What build are you using now for testing? 1.2.1 build 2B is current. Maybe we can talk him in to saving some special information for you to use? For example, if there were several new values always in a certain location that showed for example a restart in progress flag, a mode flag (svcd,dvd, vcd, etc.), and other info you needed,would that help you?

tylo
7th October 2003, 23:18
Have a bussy week, so dont expect anything before friday/sat on RC2.
The version 3.0 (with AutoIt3) is more or less converted, but much testing remains even before a alpha release can be given.

I just let out a little frustration in the last post, D2S is doing a great job, if I haven't mentioned it before. :)

Thanks a lot for that offer. But I need some time to figure out what to ask first.

Cheers

DDogg
8th October 2003, 00:11
No problem, and just to be clear, I certainly can't talk for him. However, knowing him I would assume if he knew what you needed he would try to help if time allows. So if you could think about what you need it would be great. That might also help other plugin writers.

r6d2
8th October 2003, 20:40
Originally posted by DDogg
That might also help other plugin writers.
Hehehe... No more back doors! Collaborative software development at its best.

I have some ideas on how to improve D2S's BR calculations. I'll check with him.

dvd2svcd
9th October 2003, 08:50
Originally posted by tylo
Sadly, things hasn't exactly improved with the three new ini files. (DVD.ini, SVCD.ini, ..). The redundancy (multiple storage) of so many variables is just a nightmare for plugin developers like me. Hope D2S will look into this one day.[/B]True the ini files is one big mess. I think I'll revamp it completely.

Originally posted by r6d2
I have some ideas on how to improve D2S's BR calculations. I'll check with him. Please don't. I don't wanna mess with the bitrate calculations. They are as precise as they can get, and each time I mess with it it turns up a cascade of angry usermails because the bitrate calcs doesn't work as in prior versions.

r6d2
10th October 2003, 21:51
Originally posted by dvd2svcd
Please don't. I don't wanna mess with the bitrate calculations. They are as precise as they can get
They are quite precise indeed. I've found in the worst case 1 minute wasted on the last CD. That's 0.6% for a 2 CD encode and 0.4% for a 3 CD encode.

Anyway, 1 minute is still one minute! :confused:

Trahald
11th October 2003, 00:11
i think he trusts your math. i think d2s is applying the 'if it aint broke' rule. ;)

r6d2
11th October 2003, 03:05
Originally posted by w00kiee
i think he trusts your math. i think d2s is applying the 'if it aint broke' rule. ;)
Well, audio wasn't broken in D2S either, and the idea of postponing it was quite successful ;)

BTW, the fact that D2S's BR calculations work so well is really curious considering that CD size is not 800-MB, but 360.000 * 2324 / 2^20 = 797.9-MB

DDogg
11th October 2003, 06:04
and the idea of postponing it was quite successful erm, if you say so :)

telemike
13th October 2003, 02:03
Something wenr terribly wrong:

D2SRoBa v2.7.0 RC1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-12 14:19:19
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 40
- Maximum Q. : 60
- Sample percentage : 1.0
- Adjust Q. : 1.0
- Sample GOPs : 1
- Sizing pass : on=1 (-4.0 .. 1.0)%
- Audio after video : on=0 (Fixed bitrate, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 01:45:57 (152430 frames, 23.976 fps)
- D2S audio settings : (128 kbps + 0) kbps
- D2S video estimate : 2230 kbps, 3 CDs
- SelectRangeEvery : every 1500, select 15 frames
- Num. sample frames : 1530
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=648 Audio 1 BR=128 Video SZ=514966217.
- 2 CD: Video BR=1439 Audio 1 BR=128 Video SZ=1143574669.
- 3 CD: Video BR=2230 Audio 1 BR=128 Video SZ=1772183121.
- 4 CD: Video BR=3022 Audio 1 BR=128 Video SZ=2401586274.
--------------------------------------------------------
- Using Max bitrate=2628 for auto samples (adj. for 3 CDs)
- Estimated mpv size : 609397208. (Q=40, 766 kbps, 6116760 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1143574669. (1439 / max 2628) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 906985201. (Q=20, 1141 kbps, 9103768 sample sz)
- Estimated mpv size : 1235692426. (Q=10, 1554 kbps, 12403132 sample sz)
- Computed mpv size : 1071338813. (Q=15, 1348 kbps, 10753450.=(Q20+Q10)/2)
- Estimated mpv size : 1159069750. (Q=12, 1458 kbps, 11634040 sample sz)
- Computed mpv size : 1115204282. (Q=13, 1403 kbps, 11193745.=(Q15+Q12)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (1143574669. / 99.6274509803922 - 11193745.) / (11634040 - 11193745.)
- Adjust Q : (13 + (0.353240973444352) - (1.0)) = 12.3532409734444
- Determined Q. : 12
- Adjusted CD size : 1 (fillrate = )
--------------------------------------------------------
- Encoding Movie
- 2003-10-12 14:30:58
- Actual mpv file size:
10/12/2003 06:23 PM 397350072 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 34.7% on target :confused: :confused: ( 397350072 / 1143574669.)
--------------------------------------------------------
- Recover
- 2003-10-12 18:24:01

tylo
13th October 2003, 04:18
Yep, its the same as DDogg reported. Looking at it now...

DDogg
15th October 2003, 21:49
Looking at it now... Just curious, any progress?

r6d2
16th October 2003, 01:22
Originally posted by DDogg
Just curious, any progress?
He is still looking, but can't find it :D

Come on, DDogg, give the guy some time. Remember the post about free pies? :D:D:D

telemike
16th October 2003, 02:10
What does this setting do?

safety_zone=34

in the D@SRoBa.ini file:confused:

DDogg
16th October 2003, 02:47
Come on, DDogg, give the guy some time. Remember the post about free pies? :D:D:Der, ah, like I said, I was just curious as tylo has been mighty quite for the last several weeks. Certainly was not meant to be pushy. Anyway, I feel confident that tylo can tell somebody to piss off quite well and all by himself :)

tylo
16th October 2003, 08:47
Folks, I've just been busy for the last weeks. I'll upload RC2 in a few moments (this time for real...). :D
This morning D2V is up with it's exceeded bitrate warning up. So that might be an area you might want to look at.It actually reached the max bitrate, but didn't exceed it. I now set the default MAX ToTAL to 2754 (2 below).
I give up in confusion Now it is trying to use CBR at 500 kbps for a 3 cd encode.
- 3 CD: Video BR=2230 Audio 1 BR=160 Video SZ=1888340581.You were very unlucky there. When the bitrate was exactly equal to the avg_max, there was a logical error -> fixed.

However, telemikes log is still a mystery to me. Although, by a strange coincidence he also got 2230 for 3 CDs, but he used only 2 CDs. I've gone over that code several times, and I can see no way how it should have tried to reduce the CD size (and therefore wrongly), unless you had set MaxAvg=1439 (very unlikely)!!. Also D2S used 3 CDs in its computation which it shouldn't have --> I assume this was a recovery? Oh, and the safety_zone is for internal use in the improved binary search for the Q. It should not be reduced, but if increased up to 100 will make the plugin encode every sample (i.e not compute and skip some).

I have done something to avoid the 'Recover'-error (using wrong directory). It now also pops up a directory selection dialog when you press the Recover button. Choose the directory from here. (It will warn you if you don't). This is the only way I can pick up where you want to recover from (if not the last used)...

Cosmetic adjustments: The GUI will always be be active (on top) when started. It will remember GUI position.

About the problem of CCE not closing properly: I've shuffled a little with the sleep commands, but I don't know if it help - I never have this problem, so I can't tell.

- Haven't got time to look at the logs for DVD encoding yet, but thanks. I will though, 'cause I've ordered a DVD burner now (Lite-On LDW-401S (http://test2.cdrlabs.com/reviews/index.php?reviewid=200&page=Intro)).

Cheers.

telemike
16th October 2003, 10:49
However, telemikes log is still a mystery to me. Although, by a strange coincidence he also got 2230 for 3 CDs, but he used only 2 CDs. I've gone over that code several times, and I can see no way how it should have tried to reduce the CD size (and therefore wrongly), unless you had set MaxAvg=1439 (very unlikely)!!. Also D2S used 3 CDs in its computation which it shouldn't have --> I assume this was a recovery?


I don't think it was a recover but it could have been. I am trying the lastest now on the same encode and we'll see what happens

Trahald
16th October 2003, 14:00
Nice to see a new version out and congrats on the DVD burner(going with a + eh?). i'll try it out tonight.

telemike
17th October 2003, 00:29
========================================================
D2SRoBa v2.7.0 RC2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-16 06:27:13
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa (Recover=No)
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 40
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.2
- Sample GOPs : 1
- Sizing pass : on=0 (-4.0 .. 1.0)%
- Audio after video : on=0 (% of Video, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2500 kbps)
--------------------------------------------------------
- Movie length : 01:45:57 (152430 frames, 23.976 fps)
- D2S audio settings : (128 kbps + 0) kbps
- D2S video estimate : 2230 kbps, 3 CDs
- SelectRangeEvery : every 1500, select 15 frames
- Num. sample frames : 1530
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=648 Audio 1 BR=128 Video SZ=514966217.
- 2 CD: Video BR=1439 Audio 1 BR=128 Video SZ=1143574669.
- 3 CD: Video BR=2230 Audio 1 BR=128 Video SZ=1772183121.
- 4 CD: Video BR=3022 Audio 1 BR=128 Video SZ=2401586274.
--------------------------------------------------------
- Using Max bitrate=2372 for auto samples (adj. for 2 CDs)
- Estimated mpv size : 765245226. (Q=40, 962 kbps, 7681068 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1143574669. (1439 / max 2372) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1234532762. (Q=20, 1553 kbps, 12391492 sample sz)
- Computed mpv size : 999888994. (Q=30, 1258 kbps, 10036280.=(Q40+Q20)/2)
- Estimated mpv size : 1062943606. (Q=25, 1337 kbps, 10669184 sample sz)
- Estimated mpv size : 1163668553. (Q=22, 1464 kbps, 11680200 sample sz)
- Computed mpv size : 1113306080. (Q=23, 1400 kbps, 11174692.=(Q25+Q22)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (1143574669. / 99.6274509803922 - 11174692.) / (11680200 - 11174692.)
- Adjust Q : (23 + (0.398985247320875) - (1.2)) = 22.1989852473209
- Determined Q. : 22
--------------------------------------------------------
- Encoding Movie
- 2003-10-16 06:33:09
- Actual mpv file size:
10/16/2003 08:15 AM 1106740960 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 96.8% on target ( 1106740960 / 1143574669.)
--------------------------------------------------------
- Recover from pulldown/muxing
- 2003-10-16 08:15:15



HERE'S THE KICKER:

bbMPEG_Muxed_File00.mpg = 814,885kb

bbMPEG_Muxed_File01.mpg = 396,397kb


Something is not calculating correctly............

Calculations:
- 1 CD: Video BR=648 Audio 1 BR=128 Video SZ=514966217. :confused:
- 2 CD: Video BR=1439 Audio 1 BR=128 Video SZ=1143574669. :confused:
- 3 CD: Video BR=2230 Audio 1 BR=128 Video SZ=1772183121. :confused:
- 4 CD: Video BR=3022 Audio 1 BR=128 Video SZ=2401586274.:confused:


Why is the size only 515MB for 1CD?

r6d2
17th October 2003, 01:52
Originally posted by DDogg
er, ah, like I said, I was just curious as tylo has been mighty quite for the last several weeks. Certainly was not meant to be pushy. Anyway, I feel confident that tylo can tell somebody to piss off quite well and all by himself :)
I'm pretty sure, I just could not resist :D

tylo
17th October 2003, 07:24
- Movie length : 01:45:57 (152430 frames, 23.976 fps)
- D2S audio settings : (128 kbps + 0) kbps
- D2S video estimate : 2230 kbps, 3 CDsThe numbers are directly read off from the .d2s file after D2S is shutdown:
[Settings]
Number of images=3 -- Should be 2 because movie is between 92 and 138 mins
[MovieInfo]
AvgBitrate=2230 -- Truncated to MaxAvg by D2S - should have been higher

You must have fiddled with the time bands in the bitrate tab, so that the movie falls into the 3CD band. DON'T. D2SRoBa sets the timebands so that D2S does not need to truncate the calculated bitrate.

/Add: Ps: I now fully understand your previous log - thanks. This also gave me a hint why sometimes the "Reduce CD size" functionality is not perfect. I will improve that.going with a + eh?It appears to be the future standard (M$ has announced support for +). If not, I've read that it is possible to flash it with a higher models firmware (411S) which support +/-.

telemike
17th October 2003, 10:28
Tylo-

I didn't change any settings in the time band when I ran that encode...at least I don't recall.

I still am nost sure why the size for 1-Cd is 515MB?

tylo
17th October 2003, 11:21
I didn't change any settings in the time band when I ran that encode...at least I don't recall.In that case, we can not be sure that D2S always writes/calculates the bitrates based on number of CDs that matches the time bands - in my experience it has so far, but clearly both your logs shows that D2S uses 3 CDs, where I expected it to use 2CD. I use the bitrate computed by D2S, i.e. 2230 for 3CD to compute the bitrate for 2CDs -> 1439. This is too low because 2230 is not the bitrate that fills 3CDs, but the max average bitrate that you allowed D2S to use.

In any case, I need some more input on this. I can alway go back and use r6d2's bitrate calculations, but it doesn't include subtitle calc.

telemike
17th October 2003, 12:12
Tylo-

I tried again. Somewhere D2s is calculating 3 CD's. The Time bands show 2 CD's (I set the plugin to 2). The .ini files for D2s show the timebands as 2 Cd's. Yet, the calculations are showing 3.


:confused: :confused: :confused:

telemike
18th October 2003, 13:19
I found the problem! It is the latest versionof D2S!!!!!!!!!!!!!

I went back to D2S113B2 and it works now. D2S121B3 is calculating the number of Cd's to 3 and D2S113B2 calculates to 2 CD's.

:mad:

Trahald
18th October 2003, 16:23
I did an encode with RC2 and d2s 121b3 last night (80 minute movie) with quality at 40 and audio=on vbrpass=on

came out perfect
.. 1 cd image at ~800mb

im doing another encode tonite.. should end up 2 disks.. we'll see how that goes

telemike
18th October 2003, 22:09
I did a test with both versions of D2S and the logs show that the new version of D2S is calcualting something wrong.......

I wish I knew exactly what was going wrong.

Trahald
19th October 2003, 14:51
Welp.. did an encode last night.. 42 min show.. first pass ended up 530 mb.. thankfully the vbr pass encode did the trick.

some notes - this was a batch encode.. although ive done them before with no problems. i used force ivtc. there were 2 episodes thati batched.. the other episode did the same thing although the opv @ q40 left it at about 400 mb.. vbr pass saved the day(well night) ;)
it never did individual Q tests , just the first test at q40 on both eps. i'll try it outside of batch mode and report results.

<Edit> did the same thing without doing batch mode



========================================================
D2SRoBa v2.7.0 RC2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-19 05:00:08
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa (Recover=No)
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 40
- Maximum Q. : 64
- Sample percentage : 2.0
- Adjust Q. : 0.8
- Sample GOPs : 1
- Sizing pass : on=1 (-2.0 .. 1.0)%
- Audio after video : on=0 (Fixed bitrate, 6%, min 96 kbps)
- Adjust max video br : on=1 (total 2754 kbps)
--------------------------------------------------------
- Movie length : 00:45:04 (64852 frames, 23.976 fps)
- D2S audio settings : (96 kbps + 0) kbps
- D2S video estimate : 2230 kbps, 1 CDs
- SelectRangeEvery : every 600, select 12 frames
- Num. sample frames : 1308
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=2230 Audio 1 BR=96 Video SZ=753982942.
- 2 CD: Video BR=4572 Audio 1 BR=96 Video SZ=1545834085.
- 3 CD: Video BR=6914 Audio 1 BR=96 Video SZ=2337685227.
- 4 CD: Video BR=9256 Audio 1 BR=96 Video SZ=3129536370.
--------------------------------------------------------
- Using Max bitrate=2658 for auto samples (adj. for 1 CDs)
- Estimated mpv size : 552353012. (Q=40, 1633 kbps, 11140408 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 753982942. (2230 / max 2658) kbps
--------------------------------------------------------
- Reduce CD debug: brate=2230 cbr_limit=2444 adj_brate=2230
- Reduce CD size to: 801 (fillrate=1., bitrate=2230)
--------------------------------------------------------
- Encoding Movie
- 2003-10-19 05:01:49
- Actual mpv file size:
10/19/2003 05:48 AM 538077952 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 71.4% on target ( 538077952 / 753982942.)
--------------------------------------------------------
- Executing VBR Sizing Pass - 2230 kbps.
- Actual mpv file size:
10/19/2003 06:36 AM 753038004 Encoded_Video_CCE_NTSC.mpv
- Sizing pass result: 99.9% on target ( 753038004 / 753982942.)
--------------------------------------------------------
- Recover from pulldown/muxing
- 2003-10-19 06:36:12

homerjay
19th October 2003, 20:56
did anyone work out the problem with the .mp2 file not being created ?
i thought it was just a prob with avi's but have done 2 dvd rips this weekend and got the same problem.
i'm running RC2 and d2s 121b3 and if audio creation after is ticked or unticked it is not creating the file :confused:

cheers

hj

telemike
19th October 2003, 21:50
D2SRoBa v2.7.0 RC2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-19 08:01:37
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa (Recover=No)
- CD size : 800
- Number of CD's : 1
- Auto Q. (worst) : ---
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.2
- Sample GOPs : 1
- Sizing pass : on=0 (-4.0 .. 1.0)%
- Audio after video : on=1 (Fixed bitrate, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2500 kbps)
--------------------------------------------------------
- Movie length : 01:45:57 (152430 frames, 23.976 fps)
- D2S audio settings : (128 kbps + 0) kbps
- D2S video estimate : 889 kbps, 1 CDs
- SelectRangeEvery : every 1500, select 15 frames
- Num. sample frames : 1530
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=889 Audio 1 BR=128 Video SZ=706489146.
- 2 CD: Video BR=1922 Audio 1 BR=128 Video SZ=1527415228.
- 3 CD: Video BR=2955 Audio 1 BR=128 Video SZ=2348341311.
- 4 CD: Video BR=3988 Audio 1 BR=128 Video SZ=3169267393.
--------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 1
- Target mpv size : 706489146. (889 / max 2372) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 409550120. (Q=32, 515 kbps, 4110816 sample sz)
- Estimated mpv size : 658264074. (Q=16, 828 kbps, 6607256 sample sz)
- Estimated mpv size : 963376729. (Q=8, 1212 kbps, 9669792 sample sz)
- Computed mpv size : 810820401. (Q=12, 1020 kbps, 8138524.=(Q16+Q8)/2)
- Computed mpv size : 734542238. (Q=14, 924 kbps, 7372890.=(Q16+Q12)/2)
- Estimated mpv size : 689963138. (Q=15, 868 kbps, 6925432 sample sz)
--------------------------------------------------------
- Q Weight : 1.0 - (706489146. / 99.6274509803922 - 6925432) / (7372890. - 6925432)
- Adjust Q : (15 + (0.629287964169347) - (1.2)) = 14.4292879641693
- Determined Q. : 14
--------------------------------------------------------
- Encoding Movie
- 2003-10-19 08:06:33
- Actual mpv file size:
10/19/2003 09:17 AM 690169696 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 97.7% on target ( 690169696 / 706489146.)
--------------------------------------------------------
- Executing: C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe -core( -input "D:\dvd\Extracted_audio_1.ac3" -output "D:\dvd\Encoded_audio_1.mp2" -logfile "D:\dvd\Encoded_audio_1.log" ) -azid( -L -3db -c normal -s surround -g max ) -2lame( -e -b 128 -m s )
--------------------------------------------------------
- Recover from pulldown/muxing
- 2003-10-19 09:39:21



Works with the older version of D2S perfectly!!!!!!!

tylo
20th October 2003, 08:40
If this is the case, there may be a bug in the current D2S -> it would have failed without using the plugin too (if D2S actually uses these nums).
However: this log was from only the day after build 3 was released - did you really use build 3 here?Something wenr terribly wrong:

D2SRoBa v2.7.0 RC1 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-12 14:19:19
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 40
- Maximum Q. : 60
- Sample percentage : 1.0
- Adjust Q. : 1.0
- Sample GOPs : 1
- Sizing pass : on=1 (-4.0 .. 1.0)%
- Audio after video : on=0 (Fixed bitrate, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2756 kbps)
--------------------------------------------------------
- Movie length : 01:45:57 (152430 frames, 23.976 fps)
- D2S audio settings : (128 kbps + 0) kbps
- D2S video estimate : 2230 kbps, 3 CDs



w00kie: Thanks. You spotted a bug, and I know how to fix it, but please let me rather work on the new version 3 (w/AutoIt3). The current version has gotten kind of messy (the AutoIt2 language is the main reason for that). I intend to release it within this month (hopefully a much better plugin) :D

telemike
20th October 2003, 10:44
Tylo-

Yes it was with the latest version of D2S that messed up. I had just downloaded it. It was also with B2 that it did not work which leads me to guess that the newest release of D2S is caculating differently than D2S13B2

Trahald
23rd October 2003, 04:47
Well for now i just boost the max bitrate up (2250 is too low for me anyways) so it seems ok. cant wait for the new version

@telemike does the new version or d2s encode ok w/out d2sroba?

r6d2
23rd October 2003, 20:24
Hi, folks,

Just a note to tell you that I've made this thread sticky. Even though its popularity speaks for itself, I think that newcomers should get acquainted with the subject.

tylo
24th October 2003, 10:02
Thanks, r6d2, I was wondering where it was gone :D

Got a demo of D2SRoBa3. It only does the things up to the Q-search, so its just for you to see what I'm up to.

Download: http://home.no.net/tylo/D2SRoBa3.exe
and just place it in the Tylo directory.
Try out:
- Recover: it will open a different Open dialog, and hide the original...
- Detach / Attach Log window, does it behave OK?
- Preview: If AVISYNTH.INI was touched (eg by FACAR), it shows the Frameserver tab.
- Check if numbers in log win looks OK.

I'm close to implement the "Newton-Raphson" Q-search, so I may throw some questions at you while doing that, r6d2 :)

For those who had problems with CCE not shutting down properly with D2SRoBa 2.x, please tell how this demo works. I now do a ProcessWaitClose("EclCCE.exe"), but if CCE (cctspt.exe) is the problem, please let me know ( - I could wait for both).

Cheers.

r6d2
24th October 2003, 12:06
Originally posted by tylo
I'm close to implement the "Newton-Raphson" Q-search, so I may throw some questions at you while doing that, r6d2 :)
Please be my guest. I'm on the "Babylonians to go" class.

Crackhead
24th October 2003, 14:24
i just tried the new version and it worked very well to the point it stopped....as you said:D

i just wondered if there is a way to cancel D2S's audio extraction and conversion if you got that audio stream already on your hard disk!
I mostly do 2-3 different encodes of 1 movie to see if i can get a better quality cause i only do 1cd encodes at the moment, ok it takes only about 45-60mins but the wasted time get bigger with every encode and..you know time is money! :confused:

Greetz, Crackhead

telemike
25th October 2003, 16:33
Latest success story with DVD2SVCD 1.1.3B2 and RC2 of Tylo

========================================================
D2SRoBa v2.7.0 RC2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-10-25 06:17:48
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa (Recover=No)
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 40
- Maximum Q. : 64
- Sample percentage : 1.0
- Adjust Q. : 1.2
- Sample GOPs : 1
- Sizing pass : on=0 (-4.0 .. 1.0)%
- Audio after video : on=0 (Fixed bitrate, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2500 kbps)
--------------------------------------------------------
- Movie length : 02:18:17 (198939 frames, 23.976 fps)
- D2S audio settings : (160 kbps + 0) kbps
- D2S video estimate : 2193 kbps, 3 CDs
- SelectRangeEvery : every 1500, select 15 frames
- Num. sample frames : 1995
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=614 Audio 1 BR=160 Video SZ=636827171.
- 2 CD: Video BR=1404 Audio 1 BR=160 Video SZ=1456197636.
- 3 CD: Video BR=2193 Audio 1 BR=160 Video SZ=2274530922.
- 4 CD: Video BR=2983 Audio 1 BR=160 Video SZ=3093901386.
--------------------------------------------------------
- Using Max bitrate=2340 for auto samples (adj. for 2 CDs)
- Estimated mpv size : 1028843104. (Q=40, 991 kbps, 10317444 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1456197636. (1404 / max 2340) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1561395328. (Q=20, 1505 kbps, 15657984 sample sz)
- Computed mpv size : 1295119216. (Q=30, 1248 kbps, 12987714.=(Q40+Q20)/2)
- Estimated mpv size : 1363136809. (Q=25, 1314 kbps, 13669808 sample sz)
- Estimated mpv size : 1479109371. (Q=22, 1426 kbps, 14832804 sample sz)
- Computed mpv size : 1421123090. (Q=23, 1370 kbps, 14251306.=(Q25+Q22)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (1456197636. / 99.7187969924812 - 14251306.) / (14832804 - 14251306.)
- Adjust Q : (23 + (0.395123372370019) - (1.2)) = 22.19512337237
- Determined Q. : 22
--------------------------------------------------------
- Encoding Movie
- 2003-10-25 06:26:34
- Actual mpv file size:
10/25/2003 08:50 AM 1396953432 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 95.9% on target ( 1396953432 / 1456197636.)
--------------------------------------------------------
- Recover from pulldown/muxing
- 2003-10-25 08:50:55

tylo
26th October 2003, 10:23
Interesting results! 2:18 long movie with Q=22 on 2CDs is impressive. Which filters do you use?
Note, although you "only" got 95.9% on target, you're only one Q from the optimal Q=21 in this case (the Q-steps here is about 40MB), i.e Q=20 would have oversized.
PS. I also think the 1.1.3B2 release was particulary good. (D2SRoBa still works with it, as you just documented) :)

telemike
26th October 2003, 12:55
I only used Bilinearresize. No Filters. It was The Matrix: Reloaded btw.

I left the adjust Q at 1.2, should I adjust it to a different number?

Can't wait for the new version. :)

tylo
27th October 2003, 11:33
No, I have used a higher Q adjust, but it sometimes oversizes then. IMO, 1.2 is the optimal value, at least if you don't want oversizing.

A few results with my new DVD burner:
To get started, I tried with one of the one-click tools (DVD2One).
- Burned on a DVD+RW media with Nero (both 5.5.10.54 and 6.0.0.19) 4x speed --> Failed at end of burn (I've heard 5.5.10.45 is good).
- Burned with Stomp RecordNow Max --> Worked.
- Visual result --> Mediocre, much artifacts (as expected)
Most of my SVCDs looks better (on my 32" ws TV). Maybe DVDShrink is better, but it uses basically the same transcoding method.

For DVD backups, I'll still go with SVCD (D2SRoBa, FACAR). :) Later I'll try DVD output. For my DVs, I'll make DVDs.

telemike
27th October 2003, 14:24
Tylo-

I just did "the phantom menace" on 2 CD's at a Q of 23. I got 97.7%!

I like using DVDShrink to rip the extras to my harddrive so I can make a CD of extra material. I like the preview function in dvdshrink.

r6d2
27th October 2003, 14:32
Originally posted by telemike
I just did "the phantom menace" on 2 CD's at a Q of 23. I got 97.7%!

I just did LOTR:TTT, 2 CDs, Q=34, 100%!!!

@Tylo,

You may be interested in taking a look at this thread (http://forum.doom9.org/showthread.php?s=&postid=391301#post391301).

Some guys are thinking of implementing "RoBa" in MPEG-4 :D

I have just started to play with MPEG-4 and I am really, really surprised of the good quality.

syzygytec
1st November 2003, 15:41
My first results with RC2 on 1.1.3b2 were good with my limited understanding. 2 full discs. My best results yet with d2sroba. So my log submission.

========================================================
D2SRoBa v2.7.0 RC2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-11-01 01:05:51
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa (Recover=No)
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 40
- Maximum Q. : 64
- Sample percentage : 5.0
- Adjust Q. : 1.2
- Sample GOPs : 1
- Sizing pass : on=1 (-2.0 .. 1.0)%
- Audio after video : on=0 (% of Video, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2754 kbps)
--------------------------------------------------------
- Movie length : 02:06:51 (182501 frames, 23.976 fps)
- D2S audio settings : (192 kbps + 0) kbps
- D2S video estimate : 1517 kbps, 2 CDs
- SelectRangeEvery : every 300, select 15 frames
- Num. sample frames : 9135
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=655 Audio 1 BR=192 Video SZ=623217776.
- 2 CD: Video BR=1517 Audio 1 BR=192 Video SZ=1443391397.
- 3 CD: Video BR=2380 Audio 1 BR=192 Video SZ=2264516496.
- 4 CD: Video BR=3242 Audio 1 BR=192 Video SZ=3084690118.
--------------------------------------------------------
- Using Max bitrate=2562 for auto samples (adj. for 2 CDs)
- Estimated mpv size : 1173180758. (Q=40, 1233 kbps, 58723000 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1443391397. (1517 / max 2562) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1742389051. (Q=20, 1831 kbps, 87214448 sample sz)
- Estimated mpv size : 1397462201. (Q=30, 1468 kbps, 69949300 sample sz)
- Computed mpv size : 1569925626. (Q=25, 1649 kbps, 78581874.=(Q30+Q20)/2)
- Computed mpv size : 1483693913. (Q=27, 1559 kbps, 74265587.=(Q30+Q25)/2)
- Estimated mpv size : 1454801837. (Q=28, 1528 kbps, 72819408 sample sz)
- Computed mpv size : 1426132019. (Q=29, 1498 kbps, 71384354.=(Q30+Q28)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (1443391397. / 19.9782156540777 - 71384354.) / (72819408 - 71384354.)
- Adjust Q : (29 + (0.397994842937199) - (1.2)) = 28.1979948429372
- Determined Q. : 28
--------------------------------------------------------
- Encoding Movie
- 2003-11-01 01:32:45
- Actual mpv file size:
11/01/2003 03:16 AM 1400137164 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 97.% on target ( 1400137164 / 1443391397.)
--------------------------------------------------------
- Executing VBR Sizing Pass - 1517 kbps.
- Actual mpv file size:
11/01/2003 05:00 AM 1443249492 Encoded_Video_CCE_NTSC.mpv
- Sizing pass result: 100.% on target ( 1443249492 / 1443391397.)
--------------------------------------------------------
- Recover from pulldown/muxing
- 2003-11-01 05:00:43

r6d2
2nd November 2003, 06:03
Hi, folks,

I think you may be interested in taking a look at this (http://forum.doom9.org/showthread.php?s=&threadid=64340) thread.

@DDogg, no jokes about babylonian stuff again please :D

tylo
3rd November 2003, 11:44
Almost there...
I have put my sole into making D2SRoBa 3.0 worth the while.
It's working great - only one minor item left, then final testing. Release this week.

Highlights
----------
- Completely rewritten using AutoIt3
- No more annoying splash screen - a nice log window instead
- Less bugs
- Faster
- No more use of the clipboard

New functionality
-----------------
- Uses Newton-Raphson for Q search - only 3 sample tests in total usually needed! (thanks r6d2)
- Corrected much of the misbehaviors in the 2.x versions:
e.g. it handles when target br > max avg bitrate. Also, both max avg and max bitrates are adjusted.
- I may get this in: A "silent" mode, where D2S (after restore), and CCE (after termin.) are running minimized!

Removed functionality
---------------------
- Sorry, currently it doesn't work with CCE 2.50, probably because of a bug in AutoIt3 (very strange one - it can't detect the encoding window).
- The "Credits tweaking" is gone - but was really an unrelated feature

I would like to create a fresh HTML page for the new release, so if anyone could create/suggest a pretty layout, it would be great.

Siku
3rd November 2003, 12:01
@tylo

That sounds great! Looking forward to the final release!

Regards,
Siku

telemike
3rd November 2003, 13:02
- Sorry, currently it doesn't work with CCE 2.50, probably because of a bug in AutoIt3 (very strange one - it can't detect the encoding window).

Bummer, I still have 2.67 so I guess I'll switch back.

Can't wait to try it.

tylo
3rd November 2003, 14:59
- It works with CCE 2.66 and 2.67, just not 2.50.
- I'd say Friday for release, but you never know...

r6d2
3rd November 2003, 18:56
@Tylo, just curious... Did you get my PM?

sPeziFisH
4th November 2003, 16:02
Whow Tylo, your tool is just great. I changed from 4-pass to D2SRoba, at least about 10 encodes were made since that decision. ...and they all are damn fine.
The last months I made the experience that encodes with bitrates down to 1400 are fine enough (in the past I refused everything under 1900).
In comparison to telemikes 'Matrix Reloaded' here's my encode (ok, it's not the same: I got PAL, set audio to 192kbps (IMO (now) I should had set it to 160 but why encoding it again) and I used bicubic precize (like it a bit more sharper, even it enforces a higher Q-value)).
Don't know why the NTSC-version is a bit longer than its Pal-crony. maybe these additional 6min results in a 30bit higher bitrate (plz don't waste time calculating also when we all know it's done quite fast).
Also I forced to make a 2nd pass (sizing pass).

Whoo, and we all are waiting for friday or the start of the next week
*doing the 'D2SRoba 3'-move*

========================================================
D2SRoBa v2.7.0 RC2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-11-02 21:59:14
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa (Recover=No)
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 30
- Maximum Q. : 40
- Sample percentage : 1.0
- Adjust Q. : 1.2
- Sample GOPs : 1
- Sizing pass : on=1 (-2.0 .. 0.0)%
- Audio after video : on=0 (% of Video, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2754 kbps)
--------------------------------------------------------
- Movie length : 02:12:37 (198945 frames, 25 fps)
- D2S audio settings : (192 kbps + 0) kbps
- D2S video estimate : 1434 kbps, 2 CDs
- SelectRangeEvery : every 1200, select 12 frames
- Num. sample frames : 1992
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=613 Audio 1 BR=192 Video SZ=609766425.
- 2 CD: Video BR=1434 Audio 1 BR=192 Video SZ=1426435650.
- 3 CD: Video BR=2255 Audio 1 BR=192 Video SZ=2243104875.
- 4 CD: Video BR=3076 Audio 1 BR=192 Video SZ=3059774100.
--------------------------------------------------------
- Using Max bitrate=2562 for auto samples (adj. for 3 CDs)
- Estimated mpv size : 1362317035. (Q=30, 1369 kbps, 13640632 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1426435650. (1434 / max 2562) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1873295283. (Q=15, 1883 kbps, 18756964 sample sz)
- Computed mpv size : 1617806159. (Q=22, 1626 kbps, 16198798.=(Q30+Q15)/2)
- Computed mpv size : 1490061597. (Q=26, 1497 kbps, 14919715.=(Q30+Q22)/2)
- Estimated mpv size : 1412800727. (Q=28, 1420 kbps, 14146116 sample sz)
- Computed mpv size : 1451431212. (Q=27, 1459 kbps, 14532916.=(Q28+Q26)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (1426435650. / 99.8719879518072 - 14146116) / (14532916. - 14146116)
- Adjust Q : (28 + (0.647042399172689) - (1.2)) = 27.4470423991727
- Determined Q. : 27
--------------------------------------------------------
- Encoding Movie
- 2003-11-02 22:03:28
- Actual mpv file size:
02.11.2003 23:27 1367113620 Encoded_Video_CCE_PAL.mpv
- OPV pass result: 95.8% on target ( 1367113620 / 1426435650.)
--------------------------------------------------------
- Executing VBR Sizing Pass - 1434 kbps.
- Actual mpv file size:
03.11.2003 00:51 1425005536 Encoded_Video_CCE_PAL.mpv
- Sizing pass result: 99.9% on target ( 1425005536 / 1426435650.)
--------------------------------------------------------
- Recover from pulldown/muxing
- 2003-11-03 00:51:23

r6d2
4th November 2003, 16:30
Originally posted by sPeziFisH
Don't know why the NTSC-version is a bit longer than its Pal-crony. maybe these additional 6min results in a 30bit higher bitrate.
I think this has to do with the very nature of PAL, NTSC and Films being shot at 24-fps. In fact, your PAL encode should also have higher audio pitch. Check this (http://nickyguides.digital-digest.com/interlace.htm) if interested.

DDogg
4th November 2003, 23:14
tylo, yes, I certainly agree you should start a new thread with the next version. This one is getting mighty long and has a lot of content that is now out of date.

New Thread Started (http://forum.doom9.org/showthread.php?s=&threadid=64579)

syzygytec
12th November 2003, 15:33
Yes I know v3 is out in it's own new topic, I'll leave the testing to the pro's I think, I'd be glad to test it, but for now on this slow P3 1.2ghz I'll stay with this version as I am having great results, so much so I wanted to post my latest log. T e r m i n a t o r 3.
Total time from Rip & Convert until completion: 11/12/2003 1:19:40 AM - 11/12/2003 6:22:06 AM

D2S 1.2.1b3 D2SRoBa 2.70rc2,
FACAR 1.06.6 (Lancos Resize)
CCE 2.67
Avisynth 2.5.2
no other filters,
standard 2.6x matrice
WinXP Pro SP1 Pentium3 1.2ghz 512RAM FAT32 pagefile off

========================================================
D2SRoBa v2.7.0 RC2 - DVD2SVCD plugin, by tylo
OS Version: WIN_XP
--------------------------------------------------------
- DVD2SVCD Shutdown
- 2003-11-12 02:00:33
--------------------------------------------------------
Settings:
- Encoding mode : OPV RoBa (Recover=No)
- CD size : 800
- Number of CD's : auto
- Auto Q. (worst) : 35
- Maximum Q. : 64
- Sample percentage : 2.0
- Adjust Q. : 1.2
- Sample GOPs : 1
- Sizing pass : on=1 (-2.0 .. 1.0)%
- Audio after video : on=1 (% of Video, 10%, min 128 kbps)
- Adjust max video br : on=1 (total 2754 kbps)
--------------------------------------------------------
- Movie length : 01:49:00 (156808 frames, 23.976 fps)
- D2S audio settings : (128 kbps + 0) kbps
- D2S video estimate : 1860 kbps, 2 CDs
- SelectRangeEvery : every 600, select 12 frames
- Num. sample frames : 3144
--------------------------------------------------------
Calculations:
- 1 CD: Video BR=858 Audio 1 BR=128 Video SZ=701437188.
- 2 CD: Video BR=1828 Audio 1 BR=160 Video SZ=1494437271.
- 3 CD: Video BR=2734 Audio 1 BR=256 Video SZ=2235115700.
- 4 CD: Video BR=3672 Audio 1 BR=320 Video SZ=3001954955.
--------------------------------------------------------
- Using Max bitrate=2594 for auto samples (adj. for 2 CDs)
- Estimated mpv size : 968584463. (Q=35, 1184 kbps, 19420116 sample sz)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Number of CDs : 2
- Target mpv size : 1494437271. (1828 / max 2594) kbps
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 1431290357. (Q=17, 1750 kbps, 28697368 sample sz)
- Estimated mpv size : 1777644117. (Q=8, 2174 kbps, 35641760 sample sz)
- Computed mpv size : 1604467237. (Q=12, 1962 kbps, 32169564.=(Q17+Q8)/2)
- Estimated mpv size : 1541051768. (Q=14, 1885 kbps, 30898084 sample sz)
- Estimated mpv size : 1503782935. (Q=15, 1839 kbps, 30150844 sample sz)
- Computed mpv size : 1467536646. (Q=16, 1795 kbps, 29424106.=(Q17+Q15)/2)
--------------------------------------------------------
- Q Weight : 1.0 - (1494437271. / 49.8753180661578 - 29424106.) / (30150844 - 29424106.)
- Adjust Q : (16 + (0.257837802062784) - (1.2)) = 15.0578378020628
- Determined Q. : 15
--------------------------------------------------------
- Encoding Movie
- 2003-11-12 02:14:42
- Actual mpv file size:
11/12/2003 03:54 AM 1442881340 Encoded_Video_CCE_NTSC.mpv
- OPV pass result: 96.6% on target ( 1442881340 / 1494437271.)
--------------------------------------------------------
- Executing VBR Sizing Pass - 1828 kbps.
- Actual mpv file size:
11/12/2003 05:34 AM 1493146520 Encoded_Video_CCE_NTSC.mpv
- Sizing pass result: 99.9% on target ( 1493146520 / 1494437271.)
--------------------------------------------------------
- Executing: C:\DVD2SVCD\BeSweet\BeSweet.exe -core( -input "C:\DVD2SVCD\Movie\Extracted_audio_1.ac3" -output "C:\DVD2SVCD\Movie\Encoded_audio_1.mp2" -logfile "C:\DVD2SVCD\Movie\Encoded_audio_1.log" ) -azid( -L -3db -C 0db -S 0db -c normal -s surround -g max ) -shibatch( --rate 44100 ) -2lame( -e -b 160 -m s )
--------------------------------------------------------
- Recover from pulldown/muxing
- 2003-11-12 06:06:11

cd sizes
1) 824,850 Playing Time: 56:44
2) 824,280 Playing Time: 52:16

syzygytec
28th November 2003, 14:36
oops wrong thread