Quantcast Avisynth: is there a Filter for Increasing Compression Even More? - Page 2 - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Avisynth Scripting

Reply
 
LinkBack Thread Tools
  #21  
07-22-2003, 10:11 AM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
Okay, interesting point, Dialhot! I haven't really thought about that. Think it's time for a test encode without Limiter()!
__________________
AudioSlave
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #22  
07-22-2003, 10:11 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
[quote="audioslave"]
Code:
TemporalCleaner(fmin(round(3+nf), 7), fmin(round(8+nf), 15)).VagueDenoiser(method=1, threshold=2.5, nsteps=6, chroma=true)")
No need of "fmin" in the parameter of temporalcleaner : nf is always under SwitchThreshold when we reach this part of the code, so the max value NF can have is 4.

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)")
Reply With Quote
  #23  
07-22-2003, 10:13 AM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
Great! Will change it at once.
__________________
AudioSlave
Reply With Quote
  #24  
07-23-2003, 04:26 PM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
Ok, I tested this line from jorel with Temporal Cleaner:
Code:
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)")
against this one from the optimal script:

Code:
SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2 
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \ 
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \ 
TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")
and although the Temporal Cleaner sample was slightly smaller, I still prefer to use Temporal Soften. On my tests, details were a lot better preserved, while mosquito noise was eliminated almost completely by Temporal Soften, while Temporal Cleaner still left some behind...
Did I use Temporal Cleaner in the right way´
__________________
j3llyG0053
Reply With Quote
  #25  
07-23-2003, 04:45 PM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #26  
07-23-2003, 06:32 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #27  
07-23-2003, 09:07 PM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
  #28  
07-24-2003, 03:41 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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 !
Reply With Quote
  #29  
07-24-2003, 08:19 AM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
  #30  
07-24-2003, 09:30 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Right.
Reply With Quote
  #31  
07-24-2003, 09:48 AM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Cool, thanks
Reply With Quote
  #32  
07-24-2003, 10:13 AM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
  #33  
07-24-2003, 11:07 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
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.

Reply With Quote
  #34  
07-24-2003, 11:43 AM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
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)?4Width<=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
Reply With Quote
  #35  
07-24-2003, 12:48 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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 !
Reply With Quote
  #36  
07-24-2003, 01:10 PM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #37  
07-24-2003, 04:39 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #38  
07-24-2003, 04:45 PM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
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 ?
Where in the MA script (2.5.2) would I put this line DCTFilter(1,1,1,1,1,1,0.5,0) ?
Thanks
Reply With Quote
  #39  
07-24-2003, 05:56 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
Holomatrix my friend


the script posted is not mine
my credits are the results.
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)?4Width<=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...

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.

Reply With Quote
  #40  
07-24-2003, 06:19 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
The DCTFilter should be always the last line before adding the borders. So in you script it should be line #9.5
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: New compression filters? tengo6dedos Avisynth Scripting 17 04-27-2008 02:56 PM
Increasing brightness using avisynth? khusru Avisynth Scripting 7 02-23-2004 07:44 AM
Avisynth: Good compression? muhali3 Avisynth Scripting 10 10-14-2003 05:18 PM
Avisynth: MergeChroma to gain Compression? Jellygoose Avisynth Scripting 94 03-24-2003 02:27 AM
Avisynth: Increasing compression through preprocessing SansGrip Avisynth Scripting 67 01-29-2003 11:00 AM




 
All times are GMT -5. The time now is 07:53 AM  —  vBulletin © Jelsoft Enterprises Ltd