View Full Version : Low Bitrate MAF Encodes using CCE and Tylo's 1 pass Plug-in
DDogg
5th August 2003, 00:30
(NOTE: Advanced users only - please do not post in this thread until you have verified you have Gerti's Semi-AutoResize working properly)
Using The MAF script below (modification of Gerti's) I have had some
impressive low bitrate encodes using Tylo's CCE 1-pass plug-in.
I am talking sub 800 kb/s bitrates like "the Mtrx" @697 kb/s on one
cd with hardly any artifacts - 2:15 mins on 1 80 min CDR (using CCE
2.67.00.11 and RB's Progressive CCE template). Quite astonishing
really.
The new features in Avisynth 2.52 that allow Motion Adaptive
Filtering (MAF) really make a lot of new thinking possible and
brings this stuff into the mainstream for DVD2SVCD. Perhaps the kvcd-
notch matrix makes a difference also if it is used in cce
2.67.00.11. Dunno. This stuff is WELL worth playing around with
(IMO). I mean, the encode doesn't HAVE to go on just one cd. This
MAF stuff just allows more flexibility. A three hour movie on 2 cds
is very possible for sure.
BTW, backup your ini file in your dvd2svcd directory BEFORE you mess
with this if you don't like it.
Holomatrix turned me on to this MAF stuff as well as this site where
you can get all the filters and the KVCD matrix (is it even used in
CCE 2.67.00.11?):
http://www.rj-elektronik.de/avalon/Guides/dvd2kvcd/dvd2kvcd.htm
I think this group could do a lot more work on this subject as it
applies to DVD2SVCD. Now, where the hell IS Bach when you need
him? :-/
You must first install Gerti's filter, understand its use, and get
it working properly BEFORE moving to the one below. See
http://forum.doom9.org/showthread.php?s=&threadid=55641
After you follow the instructions you will have the
[AVISYNTH_AutoDetectBorders] section in your dvd2svcd.ini already,
so just add the section [AVISYNTH_MY_SemiAutoCropAndResize_MA
script (2.5.2)]
Add it below Gerti's standard SemiAutoCropAndResize section in the
dvd2svcd.ini. That way you can use both depending on whether you
want the extra compression.
BTW, most of all the credit for this stuff goes to KWAG and remember
this stuff was set up for tmpg and works well with it. Also ProCoder
as long as the bitrate is not below 900. ProCoder will allow no
lower than that (900). I think ProCoder actually does the best job
but the 900 limitation screws me up on longer movies. Maybe we can
figure a way around that.
Note: I am using a standard 480 width and mpeg2dec10 and modifying the script as:
mpeg2source("D:\matrix\DVD2AV~1.D2V")
[AVISYNTH_AutoDetectBorders]
0=LoadPlugin(!AutoCrop.dll)
1=AutoCrop(1,4,2,0,^OffsetTop,0,^OffsetBottom,^Threshold,5,0)
2=BilinearResize(^TargetWidth,^TargetHeight)
3=AddBorders(0,^BorderTop,0,^BorderBottom)
!AutoCrop.dll=C:\Program Files\AviSynth 2.5\plugins\autocrop\AutoCrop.dll
^OffsetTop=0
^OffsetBottom=0
^Threshold=20
[AVISYNTH_MY_SemiAutoCropAndResize_MA script (2.5.2)]
0=DetectedTop=^DetectedTop. DetectedHeight=^DetectedHeight
1=BlocksToCropHorizontal=^BlocksToCropHorizontal. BlocksToCropVertical=^BlocksToCropVertical. BlockOptimization=^BlockOptimization
2=ResizeMethod=^ResizeMethod. Bicubic_b_Value=^b_value. Bicubic_c_Value=^c_value
3=GammaCorrection=^GammaCorrection. Hue=^Hue. Saturation=^Saturation. Brightness=^Brightness. Contrast=^Contrast
4=DebugMode=^DebugMode
5=DestinationWidth=^TargetWidth
6=DestinationHeight=^TargetHeight
7=LoadPlugin(!SimpleResize.dll)
8=Import(!SemiAutoCropAndResize.avs)
9=LoadPlugin(!StMedianfilter.dll)
10=LoadPlugin(!Asharp.dll)
11=LoadPlugin(!Undot.dll)
12=MaxTreshold=^max_threshold
13=scd_trigger=^scd_trigger
14=nf=0
15=undot()
16=Limiter()
17=asharp(1,4)
18=STMedianFilter(^stm1,^stm2,0,0)
19=MergeChroma(blur(^max_threshold))
20=MergeLuma(blur(0.1))
21=ScriptClip("nf=YDifferenceToNext()"+chr(13)+"nf>2.5 ? asharp(-(fmin((nf/30),1)),0):TemporalSoften(2,7,7,3,2)")
22=ScriptClip("nf >scd_trigger ? asharp(-2,0):asharp(0,0)")
23=Limiter()
24=function fmin(float f1,float f2){return(f1<f2) ? f1:f2}
^DetectedTop.=60
^DetectedHeight=358
^BlocksToCropHorizontal.=1
^BlocksToCropVertical.=2
^BlockOptimization=16
^ResizeMethod.=2
^b_value.=0.0
^c_value=0.5
^GammaCorrection.=1.0
^Hue.=0
^Saturation.=1.0
^Brightness.=0
^Contrast=1.0
^DebugMode=0
!SimpleResize.dll=C:\Program Files\AviSynth 2.5\plugins\SimpleResize.dll
!SemiAutoCropAndResize.avs=C:\Program Files\AviSynth 2.5\plugins\autocrop\SemiAutoCropAndResize.avs
!StMedianfilter.dll=C:\Program Files\AviSynth 2.5\plugins\STMedianFilter.dll
!Asharp.dll=C:\Program Files\AviSynth 2.5\plugins\asharp.dll
!Undot.dll=C:\Program Files\AviSynth 2.5\plugins\UnDot.dll
^max_threshold=1.50
^scd_trigger=30
^stm1=8
^stm2=32
homerjay
5th August 2003, 10:38
woooo :eek:
that is a script and a half there :p
going to definately give this a shot DDOGG but i have a couple of questions please ....
1 how long does that take to run and what speed is your rig
2 is the output technically an skvcd or is it a svcd
thanks & will report back results :D
jorel
5th August 2003, 12:00
excuse me DDogg,
i'm not a tester or developer but
i learn one fantastic hint with
Sh0dan and Dialhot(Phil)in kvcd forum:
avisynth 252 have the (great) "autoload" function!
we only need to put all filers in the
"plugins" folder of avisynth 25, then,
we can remove all lines with:
#=loadplugin(!xxx.dll)
and
!xxx.dll=C:\xx...\xx...dll
they all will "autoload" and the script is smaller
working in the same great way!
:)
DDogg
5th August 2003, 14:07
@ homerjay, this is just Gerti's standard semi-auto dvd2svcd INI script (awesome work) with the MAF stuff added. It is not a regular avisynth script, rather it is added to the dvd2svcd.ini file in your dvd2svcd directory and is available as a drop down in the frameserver tab. Do make sure to first follow Gerti's excellent instructions for installing his script BEFORE you try this.
It creates a standard 480x480 SVCD, but one with a much lower bitrate than we normally think of as "standard". The MAF stuff,I am guessing, would slow you down about 50% over the normal semi-auto script.
@jorel, of course, absolutely correct, and one can remove those plug-in lines and renumber the script if they desire, but I would suggest they first get this working and then make any mods later.
Holomatrix
5th August 2003, 15:42
Originally posted by DDogg
Holomatrix turned me on to this MAF stuff as well as this site where
you can get all the filters and the KVCD matrix (is it even used in
CCE 2.67.00.11?):
http://members.lycos.co.uk/dcdvideo/DVD2KVCD/dvd2kvcd.htm
I'm running some tests as to see what matrix looks better with CCE. KVCD-Notch or my regular Andreas SVCD Matrix. Even though I think it was Bach that said the matrices are useless :)
Originally posted by DDogg
?=
?asharp=
?f1=
Maybe DVD2SVCD could omit putting the ?= stuff at the end of the script due to him not knowing if the script is going to work, thinking there is stuff missing. Avisynth will let us know, for sure :)
r6d2
5th August 2003, 17:21
I've tried it and it generates a very good encode indeed. However, DVD2SVCD stalls after muxing, when calculating audio size. Only way out is terminating it. Looking at bbMPEG's screen it generates a lot of underflows. Maybe this is the cause?
Anyway, I've burnt the mpeg manually with VCDEasy, but when playing it looks jerky at certain parts.
Anyone experiencing this?
DDogg
5th August 2003, 18:00
I've only done it on progessive sources and have not had a problem, except my older Apex 703 can't seem to deal with a svcd longer than 99 minutes but still plays smoothly. My Cyberhome 500 doesn't have a problem with it.
There has been mentions of some problem using chapters and image creation in DVD2SVCD with these type of disks and people have been using vcdeasy to make and burn the image. I have not experienced any problems yet although I have not paid much attention to that area yet.
Holomatrix
5th August 2003, 19:01
Originally posted by r6d2
I've tried it and it generates a very good encode indeed. However, DVD2SVCD stalls after muxing, when calculating audio size. Only way out is terminating it. Looking at bbMPEG's screen it generates a lot of underflows. Maybe this is the cause?
Anyway, I've burnt the mpeg manually with VCDEasy, but when playing it looks jerky at certain parts.
Anyone experiencing this?
Are you doing AVI? How are you muxing? As long as your encoding as MPEG2 and Muxing as SVCD NTSC you should be alright. Try double clicking on the SVCD radio button in bbmpeg to reset and changes that might have occured and I image create with VCDxbuild with no problems.
@ddogg - I think the problems with image creation that those people were having with DVD2SVCD was because of the modified Kwag GOP structure with TMPEG and things like that. Using CCE, I haven't had a problem
DDogg
5th August 2003, 19:26
@ddogg - I think the problems with image creation that those people were having with DVD2SVCD was because of the modified Kwag GOP structure with TMPEG and things like that. Using CCE, I haven't had a problem Yep! I'll bet you are right.
r6d2
5th August 2003, 22:50
Originally posted by Holomatrix
[B]Are you doing AVI? How are you muxing? As long as your encoding as MPEG2 and Muxing as SVCD NTSC you should be alright. Try double clicking on the SVCD radio button in bbmpeg to reset and changes that might have occured and I image create with VCDxbuild with no problems.
Thanks for you help, @Holomatrix. It is not an AVI, but a DVD. I'm muxing with bbMPEG's "double click SVCD's defaults", just as you suggested.
I think I found the problem anyway... It's too stupid to confess... OK, I'll say it: I was using MPEG-1 (29.9fps) on a IVTCed movie (23.9fps).
I was using MPEG-1 because of the low BR. I did a test of a 5 minute clip and encoded on both MPEG-1 and MPEG-2 at 29.9fps using CCE, and according to Bitrate Viewer's results, MPEG-1 gets consistently half the Q of MPEG-2...
Shouldn't MPEG-1 be the mode for these low BRs?
@ddogg - I think the problems with image creation that those people were having with DVD2SVCD was because of the modified Kwag GOP structure with TMPEG and things like that. Using CCE, I haven't had a problem
I've always wondered how Kwag always get those magic encodes. I've obtained comparable quality on some of my encodes with TMPGEnc, but this guy always gets it right!
In fact (AFAIK), Kwag uses mostly MPEG-1... It must be for a reason, isn't it? What do you think?
Holomatrix
6th August 2003, 01:34
True, MPEG1 would probably look a little better but unfortunatly my DVD player does not play XVCD to well so I'm stuck with doing XSVCD's but I'm not complaining, still looks great. If you want to mux as a MPEG1 without getting the underflows you can mux using the bbmpeg setting from Kwag, somthing like - Double clicking on the VCD radio button, checking VBR, setting Forced muxed rate to 0, setting Startup delay(ms) pack to 400. I think that's it, Kwag also uses a higher res like 544X480.
dvd2svcd
6th August 2003, 10:46
Originally posted by Holomatrix
Maybe DVD2SVCD could omit putting the ?= stuff at the end of the script due to him not knowing if the script is going to work, thinking there is stuff missing. Avisynth will let us know, for sure :) If you wanna use AVISYNTH internal ? or ^ make sure to put a space after the sign.
WRONG:
24=function fmin(float f1,float f2){return(f1<f2)?f1:f2}
RIGHT:
24=function fmin(float f1,float f2){return(f1<f2) ? f1:f2}
In the current version it'll mean that you only get one ?= which wont be filled. In the next version there'll be no ?= at all except if you omit the space after the sign.
Holomatrix
6th August 2003, 12:02
Cool, thanks. No big deal, just wanted to add that in so we didn't get any questions on "What is this stuff at the end of my script? I keep deleting it but it still comes back" :) If you know what I mean. :)
I don't have any luck with the Tylo plugin. I just did Phonebooth NTSC last night and the plugin picked a Q of 63 and bitrate of 1365, the movie is only 81 min. What if the movie was 130 min? Scary :) Do I need to lower my min bitrate in the Tylo INI? To bad the plugin couldn't ask me "Do you want to use a Q of 50 and bitrate of 1150 instead?" or somthing like that so I could choose my own quality (sort of).
EDIT: I just did Die Another Day again and it picked a Q of 63 and bitrate of 850 (2 1/2 hr movie) What is the deal with 63 ?
telemike
6th August 2003, 15:12
Can I use the new MAF with CCE 2.50?
I would have to re-install dvd2svcd for avisynth 2.52. I am using 2.08 with spacedust() and Temporalcleaner() with good results. Tylo's plugin certainly helps. I gotta try this if it will work with cce 2.50
r6d2
6th August 2003, 15:24
Originally posted by Holomatrix
I don't have any luck with the Tylo plugin. I just did Phonebooth NTSC last night and the plugin picked a Q of 63 and bitrate of 1365, the movie is only 81 min.
On the other side, I'm astonished. Two movies with this MAF stuff: Homeward Bound I and II, 1 CD each:
Q=32, BR=1189, 84 min
Q=52, BR=1127, 88 min
Weird, ah? Very different Qs, similar BRs and minutes. Anyway, both results look great!
One curious thing is that on the first case the BR could be gotten on the first try, look at this log:
- Number of CDs : 1
- Target mpv size : 753323136. (1189 kbps)
--------------------------------------------------------
- Binary search for Q:
- Estimated mpv size : 753424590. (Q=32, 1189 kbps, 15075316 sample sz)
- Estimated mpv size : 587742224. (Q=48, 928 kbps, 11760168 sample sz)
- Computed mpv size : 670583407. (Q=40, 1059 kbps, (Q48+Q32)/2)
- Computed mpv size : 712003998. (Q=36, 1124 kbps, (Q40+Q32)/2)
- Computed mpv size : 732714319. (Q=34, 1157 kbps, (Q36+Q32)/2)
- Estimated mpv size : 738560921. (Q=33, 1166 kbps, 14777908 sample sz)
--------------------------------------------------------
- Q Weight : (753323136. / 49.977366255144 - 14660923.) / (15075316 - 14660923.)
- Adjust Q : (33 + 1.0 - 0.995101312516253 - (0.8)) = 32.2048986874837
- Determined Q. : 32
And D2Sroba did not use it immediately, it went through the whole process anyway (3 sample encodes). (So I guess Door #1 I gave to @homerjay on the other thread was a "nice to expect" but deadend at last :))
Maybe Tylo will optimize this to stop the search when the result is alredy found!
To bad the plugin couldn't ask me "Do you want to use a Q of 50 and bitrate of 1150 instead?"
How could it do that? Remember Q and BR are inverse proportionally related to each other... A lower Q means a higher BR...
You cannot have both: space and quality. If you go for space, you'll get the best quality that fits in. If you go for quality, you will get the space it needs... But the perfect world is only for those who own a DVD writer :D
Holomatrix
6th August 2003, 15:49
Originally posted by r6d2
On the other side, I'm astonished. Two movies with this MAF stuff: Homeward Bound I and II, 1 CD each:
Q=32, BR=1189, 84 min
Q=52, BR=1127, 88 min
Weird, ah? Very different Qs, similar BRs and minutes. Anyway, both results look great!
Are you using MPEG2 now? or did you try muxing at MPEG1 with the settings I mentioned?
Originally posted by r6d2
How could it do that? Remember Q and BR are inverse proportionally related to each other... A lower Q means a higher BR...
You cannot have both: space and quality. If you go for space, you'll get the best quality that fits in. If you go for quality, you will get the space it needs... But the perfect world is only for those who own a DVD writer :D
I got confused there for a sec :)
Is 63 the highest Q that D2Sroba goes?
telemike
6th August 2003, 16:05
I think Tylo has his plugin set such that Q=63 is the max. It will not go over that.
Will the MAF work with CCE 2.50?:confused:
Holomatrix
6th August 2003, 16:11
Originally posted by telemike
I think Tylo has his plugin set such that Q=63 is the max. It will not go over that.
Will the MAF work with CCE 2.50?:confused:
Not sure Try it and let us know :) You can go here http://members.lycos.co.uk/dcdvideo/DVD2KVCD/dvd2kvcd.htm and download AviSynthSwitcher DCD-Video Edition which will allow you to switch between AVIsynth's with a click of the button.
homerjay
6th August 2003, 16:33
you can edit the ini i think to make Q higher than 63
(think i tried that at some point)
max is actually 64 - adjust q figure rounded up i think
DDogg
6th August 2003, 16:40
Just for the record I am using 128 audio and I am setting max at 2616, min at 100 and average at 1150. No, I don't have a clue how I came up with that so don't ask :)
Holomatrix
6th August 2003, 16:45
Originally posted by DDogg
Just for the record I am using 128 audio and I am setting max at 2616, min at 100 and average at 1150. No, I don't have a clue how I came up with that so don't ask :)
What min and max est bitrate to you have in the D2Sroba.ini?
r6d2
6th August 2003, 17:13
Originally posted by DDogg
Just for the record I am using 128 audio and I am setting max at 2616, min at 100 and average at 1150. No, I don't have a clue how I came up with that so don't ask :)
You said don't ask, but... Anyway :) What do you use AVG for? Are you doing Multipass now?
In my case I'm doing 96 audio (Stereo) since these are for my kids and translated spanish audio is always lower quality than the original. Works for me.
Originally posted by homerjay
you can edit the ini i think to make Q higher than 63
(think i tried that at some point)
What are the parameters names? They don't appear on my INI file.
Originally posted by Holomatrix
Are you using MPEG2 now? or did you try muxing at MPEG1 with the settings I mentioned?
Not yet, I'm about to do it now since MPEG-2 went way out of bounds on Cats & Dogs. BTW, when you get Q=63, the plugin's maximum value, check the actual BR. It may not fit on the number of CDs you expect.
I think Tylo made a hardcode max of 64 based on Bach's definition of the method (it is a power of 2 magic number :)). Besides, Qs above 60 are not that good, according to the CCE Manual.
It's funny, but I've read in many places that with NTSC, if you can go 23.9 fps by force filming of IVTC then you must do it to save 1/5 the filesize and hence the BR. However, if you open a 29.9 source in FitCD and change the fps combo box to 23.9 you don't get more BR, you just get more I-frames, which means of course better quality. But on tests I've done Q is indeed much lower with MPEG-1 at 29.9 than MPEG-2 at 23.9 at low BRs.
I'll check MPEG-1 with your mux settings and I'll come back with this.
@Telemike, please test 2.50 and tell us, please!
Another thing to @all,
If you created a VAF file (not much time impact) then you can check the Q visually opening the MOVIE project with CCE. Just change the encode mode to Multipass and click on Bit Allocation. On the movies I mentioned, mostly were green, and rarely went up gray (never red). So, a high Q like 52 is not necessarily bad :)
telemike
6th August 2003, 17:21
I will hopefully get to play around with it this weekend when i have some time.
r6d2
6th August 2003, 18:58
Originally posted by r6d2
I'll check MPEG-1 with your mux settings and I'll come back with this.
Sorry, no luck. Even if you select MPEG-1 in DVD2SVCD, it will use the mode set in the template you're using (MPEG-2). Changing the template to MPEG-1 is of no use since CCE does not support OPV in MPEG-1, just CBR!
Maybe that was the origin of my muxing problem!
Last week I tried an interesting script posted by @jorel in www.kvcd.net, which does MAF with TMPGEnc, but I could not get rid of the muxing problems. I'll go back to those to see if with @Holomatrix settings I can get rid of them.
Holomatrix
6th August 2003, 19:15
Originally posted by r6d2
Sorry, no luck. Even if you select MPEG-1 in DVD2SVCD, it will use the mode set in the template you're using (MPEG-2). Changing the template to MPEG-1 is of no use since CCE does not support OPV in MPEG-1, just CBR!
Maybe that was the origin of my muxing problem!
Last week I tried an interesting script posted by @jorel in www.kvcd.net, which does MAF with TMPGEnc, but I could not get rid of the muxing problems. I'll go back to those to see if with @Holomatrix settings I can get rid of them.
Let me know how you make out. These are the settings I'm refering to http://www.kvcd.net/forum/viewtopic.php?t=2224 Maybe only good for muxing MPEG1 KVCD created by TMPEG.
DDogg
6th August 2003, 19:37
Deleted due to bad information
telemike
6th August 2003, 20:01
Is the script at the beginning of the post correct? Please let me know what to use for testing with CCE 2.50/ THanks
Holomatrix
6th August 2003, 20:11
Originally posted by DDogg
Hmmm, I read Dvd2svcd's post above and changed the script above. Then I ran tylo's 1 pass. My Q dropped 15 points which is great, but I don't really understand why unless those spaces were not allowing the MAF portion to run correctly. Anyway, either make those changes or copy and paste from above. When you guys were mentioning Q's above 60 it got me to thinking that maybe something was not right.
My present test encode of the mtrx (NYSC)(trimmed to 186,523 frames via frame selection) is encoding at Q=35 bitrate - 847. Yesterday, it was Q-53 and bitrate-710 so I don't know what the hell is going on unless it was those spaces.
Note if you get it edited or pasted in correctly, open Dvd2svcd, close it and look at the ini file you should only now see the one ? mark at the bottom.
If somebody has a copy of the matrx around I sure wish they would give it a try and see if they are getting the same.
Not sure what is going on, there are other scripts at kvcd.net that do not have the spaces. I'll try a movie I just did and see what happens. You would think that if it was a problem then Avisynth would give syntax errors.
DDogg
6th August 2003, 20:34
Yeah, I think I was smoking crack. It is back to normal after I deleted my old working directory. I had made a lot of changes on multiple runs and maybe something got whacked. At least the edits to the script above got rid of a couple of the ? marks and it should be ok to use. Hey guys, this is a case of the blind leading the sighted, sorry. :-/
/edit: One thing I did learn is to MANUALLY dellete all the dsroba files yourself before doing a restart from dvd2svcd.
r6d2
6th August 2003, 20:50
Originally posted by DDogg
My present test encode of the mtrx (NYSC)(trimmed to 186,523 frames via frame selection) is encoding at Q=35 bitrate - 847. Yesterday, it was Q-53 and bitrate-710 so I don't know what the hell is going on unless it was those spaces.
Just tested the same movie again, with all the spaces in place... Absolutely no difference in the D2Sroba log file...
I keep getting Q=63, exactly the same BR (and even byte sample sizes) in all tries, as with your original script.
It's been reported also in www.kvcd.net that this "glitch in DVD2SVCD" is harmless to AviSynth...
So I guess we should conclude that... spaces compress very well! :D
Are you sure you did not change any other parameters?
(Edit: crack smoking makes you type faster :D))
DDogg
6th August 2003, 21:43
Current ("TheMtrxfirstone")
Changed semi-auto to a more neutral bicubic of .0,.50
186,620 frames. Duration = 2:09:35:20 Q=49 Bitrate=713
BTW, if Q > 55-60 then I would not bother completing it. Maybe trim some credits off, use a more neutral resizer. Or you could exchange stmedian for Deen() in the script. That may buy you some Q, but it may be too much.
homerjay
6th August 2003, 21:43
Originally posted by r6d2
What are the parameters names? They don't appear on my INI file.
hi r6d2 i was referring worst_q= is that not what that is ?
r6d2
6th August 2003, 22:11
Originally posted by homerjay
hi r6d2 i was referring worst_q= is that not what that is ?
Nope, that's the Worst Q :), i.e., the worst quality you want (same on the GUI), not the limit of the binary search.
Originally posted by DDogg
BTW, if Q > 55-60 then I would not bother completing it.
Agree with you.
Maybe trim some credits off, use a more neutral resizer. Or you could exchange stmedian for Deen() in the script. That may buy you some Q, but it may be too much.
Deen() buys tipically 10% BR saving in my tests. UnDot() buys 3%.
I mostly go with Bilinear with SemiAutoCropAndResize, because it is resizing in one dimension only and does a pretty good job about 20% faster. Also saves 3-4% BR.
You can also go for CVD. Aliasing is much less noticeable with heavy filtering like this. And buys about 20% BR.
Holomatrix
7th August 2003, 00:48
Originally posted by DDogg
Yeah, I think I was smoking crack. It is back to normal after I deleted my old working directory. I had made a lot of changes on multiple runs and maybe something got whacked. At least the edits to the script above got rid of a couple of the ? marks and it should be ok to use. Hey guys, this is a case of the blind leading the sighted, sorry. :-/
/edit: One thing I did learn is to MANUALLY dellete all the dsroba files yourself before doing a restart from dvd2svcd.
:) email me some would ya :)
fastchef
7th August 2003, 01:39
hey guys, great idea for a dvd2svcd addon thanks. i ran 2 tests, the first with ddogg's stmedian and the second with deen.
movie length: 01:40:46 (144982 frames, 23.976 fps)
first test: cds=1 Q=29 bitrate=950
second test: cds=1 Q=16 bitrate=924
i was wondering if i could use msharpen instead of asharp in the script and how would i go about configuring the ini file to accomidate the change?
Holomatrix
7th August 2003, 04:18
I'll try Deen() again and see if I get a Q drop. To replace asharp, just do it the same way you did with Stmed. Replace the first Asharp(1,4) with MSharpen(Strength=75) or whatever. Make sure you download the 2.5 version of MSharpen and put it in your plugin directory. Leave the asharp in the MAF section because I don't know what would happen if you change it there to.
telemike
7th August 2003, 13:41
[AVISYNTH_Adaptative Filter]
0=ConvertoYV12()
1=nf=0
2=GripCrop(^TargetWidth, ^TargetHeight+^BorderTop+^BorderBottom, overscan=^overscan, source_anamorphic=^source_ana, dest_anamorphic=^dest_ana)
3=GripSize(resizer="BiLinearResize")
4=Undot()
5=Asharp(1, 4)
6=STMedianFilter(^S_FilterThreshHold, ^S_EdgeThreshHold, 0, 0 )
7=MergeChroma(blur(^blur_chroma))
8=MergeLuma(blur(^blur_luma))
9=SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
10=ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf >= SwitchThreshold ? unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))) : TemporalCleaner(6+nf,11+nf) ")
11=GripBorders()
12=function fmin(int f1, int f2) { return (f1<f2) ? f1 : f2 }
^overscan=1
^source_ana=true
^dest_ana=false
^S_FilterThreshHold=8
^S_EdgeThreshHold=32
^blur_chroma=1.58
^blur_luma=0.1
http://www.nic.fi/~lhahne/GripFit_YV12.zip
edit: added script below:
[AVISYNTH_maf_BilinearResize]
0=ConvertoYV12()
1=nf=0
2=BilinearResize(^TargetWidth,^TargetHeight)
3=Undot()
4=Asharp(1, 4)
5=STMedianFilter(^S_FilterThreshHold, ^S_EdgeThreshHold, 0, 0 )
6=MergeChroma(blur(^blur_chroma))
7=MergeLuma(blur(^blur_luma))
8=SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
9=ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf >= SwitchThreshold ? unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))) : TemporalCleaner(6+nf,11+nf) ")
10=AddBorders(0,^BorderTop,0,^BorderBottom)
11=function fmin(int f1, int f2) { return (f1<f2) ? f1 : f2 }
^S_FilterThreshHold=8
^S_EdgeThreshHold=32
^blur_chroma=1.58
^blur_luma=0.1
Holomatrix
7th August 2003, 14:04
That script works well too but were using SemiAutoCrip instead of Grip. In the MAF section some would say TemporalCleaner looks better some would say TemporalSoften looks better. Why did you post that script?
telemike
7th August 2003, 14:08
I am planning on testing that one with CCE 2.50. I would also prefer to use Gripfit instead so this is an alternative. I will post results tommorow hopefully.
Have you patched DVD2SVCD to do YV12 instead of YUY2? There is talk about that over at www.kvcd.net
DDogg
7th August 2003, 14:09
@fastchef - remarkably low Q for that length of encode. Can you tell us exactly what version of mpeg2dec
you are using and your IDCT setting if you are using one? It turns out IDCT=7 is giving me better compression
than 6 using mpeg2dec version 10 on my OC'ed XP-1700 (183x12 2.2 ghz). Oh, and fastchef, for the record,
none of this stuff is ours. All of this stuff is from Kwag's KVCD.net and all credit goes to him and
that group. I brought it up here because much of Kwag's stuff is XVCD and I only wanted to concentrate on the
dvd2svcd angle.
@telemike - Originally I got a strange overlay exception error when I tried the adaptive last week. Finally got
it working yesterday and it lowered my Q considerably.
It turned out to be the spaces which I see you corrected.
I wonder if it is because it is cropping differently from the Semi-Auto, or if it is just a better use
of the filters. I would be much more comfortable using semi-auto, but it is giving me about 10 points
higher Q. Maybe it is just this one particular encode I am working on.
/Add: this is the variant that is working for me with avisynth 2.52:
[AVISYNTH_Adaptative Filter]
0=nf=0
1=GripCrop(^TargetWidth, ^TargetHeight+^BorderTop+^BorderBottom, overscan=^overscan, source_anamorphic=^source_ana, dest_anamorphic=^dest_ana)
2=GripSize(resizer="BiCubicResize")
3=Undot()
4=Asharp(1, 4)
5=STMedianFilter(^S_FilterThreshHold, ^S_EdgeThreshHold, 0, 0 )
6=MergeChroma(blur(^blur_chroma))
7=MergeLuma(blur(^blur_luma))
8=SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
9=ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf >= SwitchThreshold ? unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))) : TemporalCleaner(6+nf,11+nf) ")
10=GripBorders()
11=function fmin(int f1, int f2) { return (f1<f2) ? f1 : f2 }
^overscan=1
^source_ana=true
^dest_ana=false
^S_FilterThreshHold=8
^S_EdgeThreshHold=32
^blur_chroma=1.58
^blur_luma=0.1
Holomatrix
7th August 2003, 14:15
@ Telemike - You don't need to put 0=ConvertoTOYV12() at the beginning of your script. It's working YV12 anyway.
telemike
7th August 2003, 14:22
Hmmm.. Maybe it's to do with Divx AVI conversions?
Here's the thread: http://www.kvcd.net/forum/viewtopic.php?t=5499
homerjay
7th August 2003, 15:43
@holomatrix - ive had to do the 0=ConvertoTOYV12() in my testing too
@fastchef - will catch up with you later to discuss this in more depth ;)
fastchef
7th August 2003, 16:31
@ddogg - i used mpeg2dec3 v. 1.10, default idct no modifier there. props to the Kwag then :)
@homerjay - ;)
jorel
7th August 2003, 16:40
@ DDogg
:)
Little fix in the script:
as SwitchThreshold can be egual to 4 and the limits for
temporalcleaner parameters are (10,15), the correct line is :
TemporalCleaner(6+nf,11+nf)
!
Holomatrix
7th August 2003, 17:16
Originally posted by homerjay
@holomatrix - ive had to do the 0=ConvertoTOYV12() in my testing too
@fastchef - will catch up with you later to discuss this in more depth ;)
For AVI2SVCD conversions ?
homerjay
7th August 2003, 17:20
no pal dvd's using cce 2.67 and avisynth 2.5x
Holomatrix
7th August 2003, 17:26
@homerjay - What would happen if you didn't add that line at the begining?
@ddogg + Jorel - with this other AF script what are we trying to accomplish here, a higher degree of compression or quality?
r6d2
7th August 2003, 17:31
Originally posted by DDogg
Oh, and fastchef, for the record, none of this stuff is ours. All of this stuff is from Kwag's KVCD.net and all credit goes to him and
that group. I brought it up here because much of Kwag's stuff is XVCD and I only wanted to concentrate on the
dvd2svcd angle.
I was just going to point that out. Some sites have ripped Kwag's technology without any warning or permission whatsoever, and he is very pissed off (whith reason, IMO). So he made this final statement on this matter on Jul. 18:
[Excerpt from Kwag's posting]
So these files should NOT be hosted somewhere else, without their permission. The same applies for the contents on the forums. This applies to scripts being designed and hosted here on this site. If you want to offer the scripts on your site, please place a link to our site. Do not copy & paste the scripts that are hosted here to your site.
Further reading here: http://www.kvcd.net/forum/viewtopic.php?t=5139
After typing this I'm thinking this post itself is an authorized Copy&Paste, but since I'm linking to the source, I hope he won't be upset.
jorel
7th August 2003, 17:44
Originally posted by Holomatrix
@homerjay - What would happen if you didn't add that line at the begining?
@ddogg + Jorel - with this other AF script what are we trying to accomplish here, a higher degree of compression or quality?
in my results i got good compression in the final size,
really small size,and the quality is a little better,
...seems more "clean"!
my dvd source is one musical and have lots of "smokes" in the show.
better is wait for DDogg, the tester!
:)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.