View Full Version : D2SRoBa Plugin
Pages :
1
2
3
4
5
[
6]
7
8
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.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.