View Full Version : D2SROBA, meaning of cond. filter ?
MorienteZ
7th April 2004, 12:13
Could anybody explain to me what the "cond. filter" option in D2SROBA means and how it is properly used? Does it automatically use some filtering to sqeeze a potentially oversized (*.avi) down to one cd?
DDogg
7th April 2004, 18:59
I'll give this a shot as we need an explanation of purpose and usage instructions. [check R6D2 FAQs to see if already done]{tylo/R6D2 If this is incorrect, let me know corrections, or directly edit]
The conditional filter in D2SRoBa is only available in SVCD auto mode [now available in DVD mode also]. Its purpose is to deal with the occasions where auto mode creates an additional CD which contains only a small amount of content. This happens in SVCD mode most often because of the SVCD bitrate cap. If D2SRoBa attempted to find a Q that would fill all disks to the edge, the resulting bitrate would exceed the SVCD bitrate cap and cause problems on some players. In this situation the last disk of the set has to be a partial.
R6D2 suggested a method where D2SRoBa would sense this situation and attempt to apply a user specified compression filter that would reduce the file-size enough to eliminate the extra disk.
When D2SRoBa projects an oversize that can create this situation, it looks at the user specified "Conditional filter under %" available in the menu of SVCD auto-mode. If the projected oversize % is equal or less than that value, D2SRoBa will do an additional test pass using the extra filter. If the resulting sample shows file size reduction is adequate, the extra disk is eliminated from the prediction and the encode commences using the conditional filter, else it uses the originally predicted number of Cd's and does not include the extra compression filter.
How to set it up - 2 steps [No longer needed. D2sRoBa does this automatically for you]
Step 1 -
Create an avs script with the lines below. Save as RoBaConditional.avs to where you keep your permanent scripts:
#start of script
Undot()
Deen()
#end of script
Or whatever you desire to use, but the above works well.
Step 2 -
In the frameserver tab of D2S, edit the resizing script you will be using with the conditional filter. Add the two lines:
0=Import(!RoBaConditional.avs) Placing this above the resize line is standard practice, although you can experiment with putting it below the resize line. D2S will renumber the line properly when it is closed so don't worry about the number, just the position relative to the resize command
To the bottom of the script add:
!RoBaConditional.avs=PATH:\RoBaConditional.avs (where path is where you stored the avs script called "RoBaConditional.avs".) Or you can just use the file dialog in the line of the script to set the path.
/Add - Or, just paste this in to the script editor in the frameserver tab. Give it a new name like BicubicD2SRoBa and make sure to use the file path dialog to find where you placed your RoBaConditional.avs.
[edited for 1.2.1 B3]
0=Import(!RoBaConditional.avs)
1=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
2=AddBorders(0,^BorderTop,0,^BorderBottom)
!RoBaConditional.avs=C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\MyScripts\RoBaConditional.avs
^b_value=0.0
^c_value=0.6
.................................................................
Testing -
To test, set the "Conditional filter under %" = 100 and do an encode. That should nearly always trigger the conditional test which you can see in the log. Setting to 25% or less is more realistic for normal use.
MorienteZ
8th April 2004, 10:24
Thanks for the well explained reply! I now have a clue :). The only problem left seems to be making D2SROBA detecting a configured filter. D2SROBA log file reports: "configured filter: NONE" no matter how and where I put the "import" RoBaConditional.avs in the avisynthfile. e.g:
LoadPlugin("D:\PROGRA~\SVCDTO~\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
AVISource("L:\BARBER~1.AVI",False)
AssumeFPS(25,1,True)
Import("RoBaConditional.avs")
BicubicResize(480,412,0.0,0.6)
AddBorders(0,82,0,82)
"RoBaConditional.avs" is here put in the same directory as the output directory.
What could be the problem?
Thanks in advance :)
DDogg
8th April 2004, 12:48
Put the avs somewhere else and make sure to put the path (best to use the file dialog in d2s script box). D2SRoBa has to rename the conditional AVS. Perhaps it does not like the absolute path. Just guessing. Here is an example of one that does work: [Edit: See more complete set at bottom of this post]
[edited for 1.2.1 B3]
0=Import(!RoBaConditional.avs)
1=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
2=AddBorders(0,^BorderTop,0,^BorderBottom)
!RoBaConditional.avs=C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\MyScripts\RoBaConditional.avs
^b_value=0.0
^c_value=0.6
ps - I'll edit this standard script into the instructions above to make it easier for everybody.
MorienteZ
8th April 2004, 14:28
Hmmm....stil can't make it work. Is the D2SROBA log supposed to report: "configured cond. filter: Yes" no matter what if it has detected an "Import RoBaConditional.avs" in the avisynth script file(avs)?
DDogg
8th April 2004, 14:45
For a test, try setting the cd size to 400. If it is going to be used you should see:
- Cond. sizing pass : Yes (Transcode if opv sz > 0.2% oversize, and Q <= 40)
(Encode if opv sz < 2.5% undersize, or Q > 40)
Paste in your resizing script and let me take a look. If things are working properly, you will see that your RoBaConditional.avs has been copied to RoBaConditional.avs.true. The original RoBaConditional.avs will just contain the line # Empty Conditional D2SRoBa Filter /add: - But, I don't think it renames it until after the first time it actually uses it, so that is not a good indicator after all.
MorienteZ
8th April 2004, 16:06
--------------------------------------------------------
- 2004-04-08 16:48:26
- Finished shutdown of CCE and D2S
- Avisynth setup: BicubicResize
- Configured cond. filter: None
- Setting low process priority
- Using CCE version 2.50 (2.50.1.0)
--------------------------------------------------------
This is what the D2SROBA log reports. I was wondering if
the configured cond. filter: None should report yes if D2Sroba has detected this line in the AVS: "Import("D:\Programmer\SVCD ToolZ\DVD2SVCD\Tylo\RoBaConditional.avs")"?
I I'm almost sure everything is correctly configured. This is my D2S frameserver tab(Bicubicresize):
0=Import(!RoBaConditional.avs)
1=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
2=AddBorders(0,^BorderTop,0,^BorderBottom)
!RoBaConditional.avs=D:\Programmer\SVCD ToolZ\DVD2SVCD\Tylo\RoBaConditional.avs
^b_value=0.0
^c_value=0.6
The Avisynth used by D2S and D2SROBA eventually looks like this:
LoadPlugin("D:\PROGRA~1\SVCDTO~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
AVISource("G:\SVCDTE~1\Test\test.avi",False)
Import("D:\Programmer\SVCD ToolZ\DVD2SVCD\Tylo\RoBaConditional.avs")
BicubicResize(480,576,0.0,0.6)
Import("G:\SVCD Temp\Test\ResampleAudio.avs")
ResampleAudio(44100)
ConvertToYUY2()
D2SROBA is supposed to trigger the imported filter when calculating the "Q" value right ? and not after encoding 1 pass right?
How can I make an idiotproof test? Cause it seems like I'm being quite a dummy making this work :)
I have done almost everything! Taking a 95 min. movie (*.avi) and setting the cond. filter under % = 100 should trigger the cond. filter right ?
I think it's a damn smart feature and I really want this to work!!
Thank You very much for your support!
DDogg
9th April 2004, 16:15
Seems like it should be working. A few more ideas -Verify your AviSynth_Script_file.avs plays. That would verify you have the path right to the conditional.avs. Set disk size to 400. No need to actually do the encode. Stop the process after you see the log.
MorienteZ
10th April 2004, 10:44
--------------------------------------------------------
- 2004-04-08 16:48:26
- Finished shutdown of CCE and D2S
- Avisynth setup: BicubicResize
- Configured cond. filter: None
- Setting low process priority
- Using CCE version 2.50 (2.50.1.0)
--------------------------------------------------------
1)This is what the D2SROBA log reports. I was wondering if
the configured cond. filter: None should report "yes" if D2Sroba has detected this line in the AVS: "Import("D:\Programmer\SVCD ToolZ\DVD2SVCD\Tylo\RoBaConditional.avs")"?
2)D2SRoba uses the Import RoBaConditional.avs unconditionally. It doesn't remove the line in the D2SRoBa.avs and uses it for all tests under all circumstances. I don't think that D2SRoba detects the Import line in the Avisynth script file.
Thanks for your patience and help I really appreciate it !
Does anyone else in this forum have experience with the D2SRoba conditional filter option?
tylo
12th April 2004, 15:49
@DDogg: Thanks for the explanation . Mine was very brief, as it was an experimental feature at the time.
The important parts to get it working is to make sure you define the key '!RoBaConditional.avs', and to Import(!RoBaConditional.avs) before the resizing step, e.g. you can modify the BicubicResize setup:
0=Import(!RoBaConditional.avs)
1=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
2=AddBorders(0,^BorderTop,0,^BorderBottom)
!RoBaConditional.avs=D:\CondFilters\UndotDeen.avs
Of course, you must select this Avisynth setup in D2S, i.e. BicubicResize. The plugin looks for the line '!RoBaConditional.avs=...' in the [AVISYNTH_BicubicResize] section of AVISYNTH.INI. In this case it will print:
- Configured cond. filter: D:\CondFilters\UndotDeen.avs
Although the generated .avs files (D2SRoBa.avs and Avisynth_Script_file.avs) imports the UndotDeen.avs file unconditionally, the plugin does the following when the filter is not needed:
1. moves the true UndotDeen.avs to "UndotDeen.avs.true",
2. creates a new empty UndotDeen.avs file (no filtering effect).
r6d2
14th April 2004, 02:32
Originally posted by DDogg
I'll give this a shot as we need an explanation of purpose and usage instructions. [check R6D2 FAQs to see if already done]{tylo/R6D2 If this is incorrect, let me know corrections, or directly edit]No need to. I don't think I could have put it better. I'm not on full duties so please feel free to update the FAQ. I won't be able to do it for a while.
MorienteZ
14th April 2004, 18:02
Problem solved :)
I made it work by copying the "[AVISYNTH_BicubicResize]" ini section from the Avisynth.ini (DVD2SVCD folder) to the projects DVD2SVCD.ini file. D2SRoba looks for the resize section in the DVD2SVCD.ini in the project folder.
[AVISYNTH_BicubicResize]
0=Import(!RoBaConditional.avs)
1=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
2=AddBorders(0,^BorderTop,0,^BorderBottom)
!RoBaConditional.avs=D:\Programmer\SVCD ToolZ\DVD2SVCD\Tylo\RoBaConditional.avs
^b_value=0.0
^c_value=0.6
DDogg
14th April 2004, 20:23
Ah, good news and a good catch on the resize template location. It may be a backward compatibility thing for tylo.
DDogg
14th May 2004, 23:38
Paste in to bottom of avisynth.ini in dvd2svcd folder.
[AVISYNTH_D2SRoBa BicubicResize w/Conditional Filter]
0=Import(!RoBaConditional.avs)
1=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
2=AddBorders(^BorderLeft,^BorderTop,^BorderRight,^BorderBottom)
!RoBaConditional.avs=C:\Program Files\DVD2SVCD\Tylo\RoBaConditional.avs
^b_value=0.0
^c_value=0.6
[AVISYNTH_D2SRoBa LanczosResize w/Conditional Filter]
0=Import(!RoBaConditional.avs)
1=LanczosResize(^TargetWidth,^TargetHeight)
2=AddBorders(^BorderLeft,^BorderTop,^BorderRight,^BorderBottom)
!RoBaConditional.avs=C:\Program Files\DVD2SVCD\Tylo\RoBaConditional.avs
[AVISYNTH_D2SRoBa BiLinearResize w/Conditional filter]
0=Import(!RoBaConditional.avs)
1=BilinearResize(^TargetWidth,^TargetHeight)
2=AddBorders(^BorderLeft,^BorderTop,^BorderRight,^BorderBottom)
!RoBaConditional.avs=C:\Program Files\DVD2SVCD\Tylo\RoBaConditional.avs
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.