![]() |
Is there a filter for increasing compression even more?
Hi guys!
I was sondering if there's a filter I could add to the MA script to increase compression even more? I'm having trouble with fitting some movies to one CD. Probably beacuse I'm mostly encoding PAL movies. Perhaps there's a filter like Dust or Convolution3D for AviSynth 2.5x? Suggestions and settings are appreciated. :wink: |
Hi audioslave,
Have you tried the Vaguedenoiser :?: -kwag |
Hi kwag,
No, I haven't. What setting do I use and where do I put it in the script :?: And the most important point: Where can I download it (the latest version)? Thanks! :wink: EDIT: Maybe there's another filter that I could add to the script too. Besides VagueDenoiser? |
I used Dup(threshold=1,blend=true) a couple of time. It does a good work but the effects are sometimes visible during travelling movements of the camera. Don't use the default parameters as they are too high !
You can use also DCTFilter(1,1,1,1,1,1,0.5,0) Else did you try to use an overscan of 2 before adding any filter ? |
Hi Dialhot,
I will try with DCTFilter. Will quality be effected in a visible way? About the overscan, the highest overscan I can use is 1. Otherwise I see the right border on my TV. :cry: At a higher resolution than 480x576 I might get away with overscan=2 but I haven't tried yet... |
Is there another filter or a way to crank up the CQ even more? It's so boring to have to encode movies at 352x288 or 352x576. I would really like to able to encode those movies at least at 480x576 resolution. I know that adding such a filter would probably decrease the quality of the movie, but still...
|
DCTFilter does'nt affect the "visible" part of the picture so you can try it.
For the overscan, I'm in the same case than you in fact :-) Now if you want to increase the CQ, one of the best filter is... blur. Increase the value used for the luma in the MA script (MergeLuma(Blur(0.1), try 0.2 or 0.3, no more). An other thing : if you mux in SVCD you can use virtually all the resolutions you want. Make a try with 480*480, even at PAL fps (that is 25). It works on my pioneer (not sure : I did so much tests with it...) |
@ Dialhot,
Does it make a big difference with and without the DCTFilter? I know it differs from movie to movie, but on average? Didn't you post an optimization of the MA part of the script - with TemporalCleaner instead of TemporalSoften? Could you point me to that post or post that line again? How much difference is it between TempClean and TempSoft, again, on average? And what about difference in picture quality? Sorry for being a pain in the you-know-what... :( |
Quote:
|
Always something! :D
Now, how about my question about TemporalCleaner...? |
Quote:
:lol: a few minutes ago i did a encode using this script with temporalcleaner like Phil ajusts...the result? fantastic: nf=0 GripCrop(480,480,overscan=1,source_anamorphic=fals e,dest_anamorphic=false) GripSize(resizer="BiCubicResize") Undot() Asharp(1,4) STMedianFilter(8,32,0,0) MergeChroma(blur(1.58)) MergeLuma(blur(0.1)) SwitchThreshold=(Width<=352)?4:(Width<=480)?3:2 ScriptClip("nf=round(YDifferenceToNext())"+chr(13) +"nf >=SwitchThreshold?unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))):TemporalCleaner(6+nf,11+nf)") GripBorders() Letterbox(0,0,10,10) function fmin(int f1,int f2){return(f1<f2)?f1:f2} :wink: |
Hi jorel,
Have you noticed any visual difference between TemporalSoften and TemporalCleaner? And what about size difference? Nice that you posted your script. Now I can see where to put TempClean and how the script should look! :D |
Quote:
short final size with the same CQ! general image got more details in background,more sharpness,less blocks! i use the same source and encode it twice, one with the best script and another with that script posted that give :arrow: 10% less final size :!: :wink: |
Wow! 8O
That's great! :D Looks like I'll be using TemporalCleaner from now on. :wink: |
And the better is than I took something like 25 min to encode a sample (the same sample I use for all my tests) versus 31 min with temporalsoften !
|
:mrgreen:
|
Jorel or Dialhot
So is the above script using temporalcleaner complete? why are you not using limiter() |
Hi KingTuk,
The complete script should/could read: Quote:
|
I'm going to give TemporalCleaner a try too! Again :D !
|
Quote:
Why ? 3 reasons : 1/ it takes time. Ok ok, it's not very serious, I'm kidding. 2/ Limiter turns true black to dark gray (Luma below 16 is clipped to 16) and pure white to very light gray (Luma above 236 is clipped to 236). Ones will say that is under human perception, thats true 3/ TMPGENC limits the value itself by default ! (Quantize Matrix Tab, Special settings, "Output YUV as Basic YCbCr" is uncheck by default) I really don't see the purpose of having avisynth doing what TMPGenc already do. But that is my opinion, my choice. |
Okay, interesting point, Dialhot! I haven't really thought about that. Think it's time for a test encode without Limiter()! :D
|
[quote="audioslave"]
Code:
TemporalCleaner(fmin(round(3+nf), 7), fmin(round(8+nf), 15)).VagueDenoiser(method=1, threshold=2.5, nsteps=6, chroma=true)")3+nf is always below 7 and 8+nf is always below 15. Just put : Code:
TemporalCleaner(round(3+nf), round(8+nf)).VagueDenoiser(method=1, threshold=2.5, nsteps=6, chroma=true)") |
Great! Will change it at once.
|
Ok, I tested this line from jorel with Temporal Cleaner:
Code:
SwitchThreshold=(Width<=352)?4:(Width<=480)?3:2 Code:
SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2 Did I use Temporal Cleaner in the right way´ :?: |
OK, so would you recomend changing my MAScript in DVD2SVCD to the one abouve using TemporalSoften? or are they both pretty close in quality?
Thanks |
They have pretty the same quality. I never had mosquitoes using temporalcleaner but it's probably a matter of quality of source and CQ used. By the way, the two have to be tested and make your own opinion on wich one you prefer.
|
Ok, I'm testing some encodes now :) I want to use the SemiAutoCrop MA script by Avalon by trying to find out why the differences in the MA script compaired to the SemiAuto script, like: the MA script uses a different Mpeg2Dec3, Gripfit, scd_trigger and the scriptClip line is way different than the SemiAuto script. Does it matter?
|
No the semiauto script has different scripClip line because Avalon uses an old, crappy and unefficient script from 18th june. Go to the "optimal script" forum and see the changelog in "last script". You will see why everything is different between the two scripts.
BTW, the semiAutoCrop script doens't have big interest as Grifit does a FullAutoCrop ! |
Oh, ok, so if I have a 4:3 movie or 16:9, all I need to do is change the Gripcrop animorphic= true/false line in the MA script, right?
|
Right.
|
Cool, thanks :)
|
Ok, I tried the regular MA script I downloaded, results were good. Now I'll try the script above with temporalCleaner and see what happens. And what about Limiter? should I use it?
|
holomatrix
try the script like i post in the first page of this thread. http://www.kvcd.net/forum/viewtopic.php?t=5202&start=0 don't use legalclip, test this script without changes and post your results. :wink: |
Ok, I'll try that script. What's the letterbox line for?
I tried this script and my CQ dropped from 56 to 50 on DIE ANOTHER DAY; [AVISYNTH_MA Script (2.5.2) AudioslaveMods] 0=LoadPlugin(!Mpeg2Dec3.dll) 1=LoadPlugin(!StMedianfilter.dll) 2=LoadPlugin(!Asharp.dll) 3=LoadPlugin(!Undot.dll) 4=LoadPlugin(!Unfilter.dll) 5=LoadPlugin(!Gripfit_preview.dll) 6=LoadPlugin(!dctfilter.dll) 7=MaxTreshold=^max_threshold 8=nf=0 9=undot() 10=Limiter() 11=asharp(1,4) 12=GripCrop(^Breite,^Hoehe,overscan=^overscan,sour ce_anamorphic=^source_ana) 13=GripSize(resizer="BicubicResize") 14=STMedianFilter(^stm1,^stm2,0,0) 15=MergeChroma(blur(^max_threshold)) 16=MergeLuma(blur(0.1)) 17=SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2 18=ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \ 19=Unfilter(-(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100))) : \ 20=TemporalCleaner(round(3+nf), round(8+nf)).VagueDenoiser(method=1, threshold=2.5, nsteps=6, chroma=true)") 21=DCTFilter(1, 1, 1, 1, 1, 1, 0.5, 0) 22=GripBorders() 23=Limiter() 24=function fmin( int f1, int f2) { 25=return ( f1<f2 ) ? f1 : f2 26=} !Mpeg2Dec3.dll=C:\Filters25\MPEG2Dec3.dll !StMedianfilter.dll=C:\Filters25\STMedianFilter.dl l !Asharp.dll=C:\Filters25\asharp.dll !Undot.dll=C:\Filters25\UnDot.dll !Unfilter.dll=C:\Filters25\Unfilter.dll !Gripfit_preview.dll=C:\Filters25\GripFit_YV12.dll !dctfilter.dll=C:\filters25\dctfilter.dll ^max_threshold=1.50 ^Breite=480 ^Hoehe=480 ^overscan=1 ^source_ana=true ^stm1=8 ^stm2=32 ?= ?asharp= ?f1= Trying this now; [AVISYNTH_jorel] 0=LoadPlugin(!Mpeg2Dec3.dll) 1=LoadPlugin(!StMedianfilter.dll) 2=LoadPlugin(!Asharp.dll) 3=LoadPlugin(!Undot.dll) 4=LoadPlugin(!Gripfit_preview.dll) 5=nf=0 6=GripCrop(480,480,overscan=1,source_anamorphic=Tr ue) 7=GripSize(resizer="BiCubicResize") 8=Undot() 9=Asharp(1,4) 10=STMedianFilter(8,32,0,0) 11=MergeChroma(blur(1.50)) 12=MergeLuma(blur(0.1)) 13=SwitchThreshold=(Width<=352)?4:(Width<=480)?3:2 14=ScriptClip("nf=round(YDifferenceToNext())"+chr( 13)+"nf >=SwitchThreshold?unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))):TemporalCleaner(6+nf,11+nf)") 15=GripBorders() 16=function fmin(int f1,int f2){return(f1<f2)?f1:f2} !Mpeg2Dec3.dll=C:\Filters25\MPEG2Dec3.dll !StMedianfilter.dll=C:\Filters25\STMedianFilter.dl l !Asharp.dll=C:\Filters25\asharp.dll !Undot.dll=C:\Filters25\UnDot.dll !Gripfit_preview.dll=C:\Filters25\GripFit_YV12.dll I don't think this is working out :( Now my calculated CQ by DVD2SVC is 44 but if I use: [AVISYNTH_MA Script (2.5.2)] 0=LoadPlugin(!Mpeg2Dec3.dll) 1=LoadPlugin(!StMedianfilter.dll) 2=LoadPlugin(!Asharp.dll) 3=LoadPlugin(!Undot.dll) 4=LoadPlugin(!Gripfit_preview.dll) 5=MaxTreshold=^max_threshold 6=scd_trigger=^scd_trigger 7=nf=0 8=undot() 9=Limiter() 10=asharp(2,4) 11=GripCrop(^Breite,^Hoehe,overscan=^overscan,sour ce_anamorphic=^source_ana) 12=GripSize(resizer="BicubicResize") 13=STMedianFilter(^stm1,^stm2,0,0) 14=MergeChroma(blur(^max_threshold)) 15=MergeLuma(blur(0.2)) 16=ScriptClip("nf=YDifferenceToNext()"+chr(13)+"nf >2.5 ? asharp(-(fmin((nf/30),1)),0):TemporalSoften(2,7,7,3,2)") 17=ScriptClip("nf >scd_trigger?asharp(-2,0):asharp(0,0)") 18=GripBorders() 19=Limiter() 20=function fmin(float f1,float f2){return(f1<f2)?f1:f2} !Mpeg2Dec3.dll=C:\Filters25\MPEG2Dec3.dll !StMedianfilter.dll=C:\Filters25\STMedianFilter.dl l !Asharp.dll=C:\Filters25\asharp.dll !Undot.dll=C:\Filters25\UnDot.dll !Gripfit_preview.dll=C:\Filters25\GripFit_YV12.dll ^max_threshold=1.50 ^scd_trigger=30 ^Breite=480 ^Hoehe=480 ^overscan=1 ^source_ana=true ^stm1=8 ^stm2=32 ?= ?asharp= ?f1= My Calculated CQ is 56, which gave me a file size of 810meg. Am I doing somthing wrong? EDIT: I see what's going on, when I change the motion search to High rather than Fast I get a higher CQ value. That's what I did yesturday which gave me 56. Why would going to FAST drop my CQ ?? Thanks |
It's not a matter of going fast or slow ;-)
The two method use completly different algorythm, that's why they differ so much in time and... result ! |
If I use the same MA script twice and get 1) CQ 56 using High and 2) CQ 46 using Fast wouldn't the CQ 56 using High give me better quality? The recommendation from Avalon is to use Fast.
Thanks |
With such low value (and such big difference between the two result), the higher is the better.
But, normally (so not in your present case) the Fast method gives better result even if the CQ is a little bit smaller. |
Quote:
Thanks |
Holomatrix my friend
:wink: the script posted is not mine :!: my credits are the results. :lol: this script is from Kwag and Phil :!: that's why i call as "Adaptative KARLvcd PHILter" [AVISYNTH_Adaptative KARLvcd PHILter] 0=nf=0 1=GripCrop(^TargetWidth,^TargetHeight+^BorderTop+^ BorderBottom,overscan=^overscan,source_anamorphic= ^source_ana,dest_anamorphic=^dest_ana)2=GripSize(r esizer="BiCubicResize") 3=Undot() 4=Asharp(1,4) 5=STMedianFilter(^S_FilterThreshHold,^S_EdgeThresh Hold,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(1 3)+"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=false ^dest_ana=false ^S_FilterThreshHold=8 ^S_EdgeThreshHold=32 ^blur_chroma=1.58 ^blur_luma=0.1 if all filters are in plugins folder of avisynth then they will "auto load" :!: no need to use.... loadplugin...bla,bla... :wink: i use letterbox in my script cos i need. my source have a strange thin gray line on the left size. i think that the better place to use DCTFilter is in the end of the script... wait for Kwag,Phil or Jell recomendations. :wink: |
The DCTFilter should be always the last line before adding the borders. So in you script it should be line #9.5 :-)
|
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.