Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
15th August 2003, 04:08 | #101 | Link |
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
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. |
15th August 2003, 07:41 | #102 | Link | |
Author of D2SRoBa
Join Date: Mar 2003
Posts: 483
|
Quote:
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! |
|
15th August 2003, 15:18 | #103 | Link |
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
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. Last edited by DDogg; 15th August 2003 at 15:21. |
15th August 2003, 18:36 | #104 | Link |
Registered User
Join Date: Jun 2003
Location: Norway
Posts: 28
|
Thank you for a great program Tylo
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??? Last edited by kru; 15th August 2003 at 18:41. |
16th August 2003, 16:53 | #105 | Link |
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
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.ph...256#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? [Add] 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.[/Add] Last edited by DDogg; 16th August 2003 at 20:10. |
17th August 2003, 18:49 | #106 | Link | |||
Author of D2SRoBa
Join Date: Mar 2003
Posts: 483
|
Quote:
Quote:
Quote:
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. |
|||
18th August 2003, 02:36 | #107 | Link | ||
Graphite mod
Join Date: May 2003
Location: Away
Posts: 2,022
|
Quote:
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. Quote:
__________________
MPEG4 quality with MPEG2? - Try the Poor Man's DVD. FACAR - As seen on TV! - The Complete Idiot's Guide to a good DVD Conversion. Time is money. Try D2Sroba for DVD2SVCD (FAQ) and save both. All electricity bills supported! Do you know how much overscan and which resolution your TV has? Find out if NTSC. Moderator: 1: one who arbitrates 2: one who presides over an assembly, meeting, or discussion 3: a substance (as graphite) used for slowing down neutrons in a nuclear reactor (Webster) |
||
18th August 2003, 18:50 | #108 | Link | |
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
Quote:
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. |
|
18th August 2003, 19:37 | #109 | Link | ||
Graphite mod
Join Date: May 2003
Location: Away
Posts: 2,022
|
Quote:
Quote:
__________________
MPEG4 quality with MPEG2? - Try the Poor Man's DVD. FACAR - As seen on TV! - The Complete Idiot's Guide to a good DVD Conversion. Time is money. Try D2Sroba for DVD2SVCD (FAQ) and save both. All electricity bills supported! Do you know how much overscan and which resolution your TV has? Find out if NTSC. Moderator: 1: one who arbitrates 2: one who presides over an assembly, meeting, or discussion 3: a substance (as graphite) used for slowing down neutrons in a nuclear reactor (Webster) |
||
18th August 2003, 23:07 | #110 | Link |
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
Yeah, I remember trying to figure out what you meant when you posted that, but stopped when my eyes started crossing
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. |
19th August 2003, 07:48 | #111 | Link |
Author of D2SRoBa
Join Date: Mar 2003
Posts: 483
|
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. |
19th August 2003, 14:38 | #112 | Link | |||||
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
Quote:
Quote:
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 Quote:
Quote:
Quote:
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. Last edited by DDogg; 19th August 2003 at 16:25. |
|||||
19th August 2003, 17:55 | #113 | Link | ||
Graphite mod
Join Date: May 2003
Location: Away
Posts: 2,022
|
Quote:
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 Quote:
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.
__________________
MPEG4 quality with MPEG2? - Try the Poor Man's DVD. FACAR - As seen on TV! - The Complete Idiot's Guide to a good DVD Conversion. Time is money. Try D2Sroba for DVD2SVCD (FAQ) and save both. All electricity bills supported! Do you know how much overscan and which resolution your TV has? Find out if NTSC. Moderator: 1: one who arbitrates 2: one who presides over an assembly, meeting, or discussion 3: a substance (as graphite) used for slowing down neutrons in a nuclear reactor (Webster) |
||
19th August 2003, 18:16 | #114 | Link | ||
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
Quote:
Quote:
Last edited by DDogg; 19th August 2003 at 18:24. |
||
19th August 2003, 18:48 | #115 | Link | ||
Graphite mod
Join Date: May 2003
Location: Away
Posts: 2,022
|
Quote:
Quote:
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.
__________________
MPEG4 quality with MPEG2? - Try the Poor Man's DVD. FACAR - As seen on TV! - The Complete Idiot's Guide to a good DVD Conversion. Time is money. Try D2Sroba for DVD2SVCD (FAQ) and save both. All electricity bills supported! Do you know how much overscan and which resolution your TV has? Find out if NTSC. Moderator: 1: one who arbitrates 2: one who presides over an assembly, meeting, or discussion 3: a substance (as graphite) used for slowing down neutrons in a nuclear reactor (Webster) |
||
19th August 2003, 19:56 | #116 | Link | |
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
Quote:
Last edited by DDogg; 19th August 2003 at 19:59. |
|
19th August 2003, 20:17 | #117 | Link | |
Graphite mod
Join Date: May 2003
Location: Away
Posts: 2,022
|
Quote:
If Tylo would like to take this approach, I'd default to quality based mode in the eventual new GUI.
__________________
MPEG4 quality with MPEG2? - Try the Poor Man's DVD. FACAR - As seen on TV! - The Complete Idiot's Guide to a good DVD Conversion. Time is money. Try D2Sroba for DVD2SVCD (FAQ) and save both. All electricity bills supported! Do you know how much overscan and which resolution your TV has? Find out if NTSC. Moderator: 1: one who arbitrates 2: one who presides over an assembly, meeting, or discussion 3: a substance (as graphite) used for slowing down neutrons in a nuclear reactor (Webster) |
|
19th August 2003, 21:27 | #118 | Link |
Author of D2SRoBa
Join Date: Mar 2003
Posts: 483
|
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. Last edited by tylo; 20th August 2003 at 07:11. |
19th August 2003, 22:54 | #119 | Link | |
Retired, but still around
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
|
r6d2, here is the answer from god (slightly edited)
Quote:
|
|
20th August 2003, 22:07 | #120 | Link |
Graphite mod
Join Date: May 2003
Location: Away
Posts: 2,022
|
Newton's method instead of Binary Search
@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: Code:
x(n+1) = x(n) - f(x(n)) / f'(x(n)) Code:
f(x(n)) - f(x(n-1)) f'(x(n)) = ------------------- x(n) - x(n-1) Code:
x(n) - x(n-1) x(n+1) = x(n) - ------------------- * f(x(n)) f(x(n)) - f(x(n-1)) 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.
__________________
MPEG4 quality with MPEG2? - Try the Poor Man's DVD. FACAR - As seen on TV! - The Complete Idiot's Guide to a good DVD Conversion. Time is money. Try D2Sroba for DVD2SVCD (FAQ) and save both. All electricity bills supported! Do you know how much overscan and which resolution your TV has? Find out if NTSC. Moderator: 1: one who arbitrates 2: one who presides over an assembly, meeting, or discussion 3: a substance (as graphite) used for slowing down neutrons in a nuclear reactor (Webster) Last edited by r6d2; 20th August 2003 at 22:13. |
|
|