Quantcast Avisynth: New MA Script Version? - Page 2 - digitalFAQ.com Forums [Archives]
  #21  
11-21-2003, 11:24 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
hy all !

in Mon Oct 27, 2003 i post some tests and was waiting (but no one came)
your coments.....please,see what i got using and removing some filters!
(was needed more than a week to do this tests)

http://www.kvcd.net/forum/viewtopic.php?t=7095

if you do some tests(chapters or samples) maybe help to find better results for use in the optimal scripts!

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  
11-21-2003, 07:13 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
So, should we change the last parameters for TemporalSoften to 2,2 instead of 1,1 as it is now? And what's the difference between the two (2,2 and 1,1)?
__________________
AudioSlave
Reply With Quote
  #23  
11-21-2003, 07:15 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
@Kwag

I just did a small mod. on the new MA (as metioned in my first 2nd post in here)....
So it performs a permanent Unfiltering like already done in Kwag's new vers. but TempSoften will only perform on static scenes. Just for testing ...
Until now I didn't compared the final size output and Speed on full encoding tests. But a little Sampler based encoding test gave me these results:

- Old MA Script: 12409 Kbyte - 00:03:24

- New MA Script: 12042 Kbyte - 00:03:41

- The modified new MA Script below: 12136 kbyte - 00:03:29
(more filesize but sharper image cause of deleted Merge.. Lines.



Code:
## Main section and static filters ###
nf=0 
# 
Mpeg2Source("xxxxxxxxxxxxx.d2v") 
# 
Limiter() 
asharp(1, 4) 
GripCrop(xxx,yyy) 
GripSize(resizer="BicubicResize") 
STMedianFilter(3, 3, 1, 1 ) 
# 
# 
## Linear Motion Adaptive Filtering ## 
# 
## Permanent active Unfiltering
## Threshold based Temporasoftening only on static scenes 
#
Ts = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
#
ScriptClip("nf = YDifferenceToNext()" +chr(13)+
\"unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)))"+
\"nf <= Ts ? TemporalSoften(round(2/nf), round(1/nf) , round(3/nf) , 15, 2): Undot()") 
# 
## Adding Borders & Letterboxing
# 
GripBorders() 
LetterBox(0,0,16,16)  
Limiter() 
# 
# 
## Functions ### 
#
function fmin( int f1, int f2) { 
  return ( f1<f2 ) ? f1 : f2 
}
Maybe in this case it would be better to rise the "Ts" Values a bit so TempSoften also will handle scenes which are a bit "more than static"??!

Kwag, I recognised this evening the following: ...Why did you perform in the past and in your script now the fmin function on Tempsoften ... as in my opinion 2/nf never will result in more than 2!

TemporalSoften( fmin( round(2/nf), 6) .....

so the Threshold-"int f2" in the function set to a threshold value by 6 will never be reached?! Maybe on the other hand I'm really confused cause its already late ????

And whats about the comment of Digitall.doc?
That a rounded 2/5 could result as 0 radius on tempsoften??

Could this help?
Code:
....
...
...
TemporalSoften( fmax( round(2/nf), 1)......
.......
And therefore also adding below the script another function like this which will keep the radius at least at 1??
Code:
function fmax( int f1, int f2) { 
  return ( f1<f2 ) ? f2 : f1
}
Well in a case if I would rise the threshold which refers to the start of tempsoften to 5!

And thats also Digitall.doc what I see now when typing these lines!
As the threshold was set to not more than 4 in the old version this means
a max nf of 4 and therefore 2/nf as send as the radius value to tempsoften would be round(0.5)! And a rounded 0.5 will result in 1,.... so the Radius will at least set to 1.



PS: @ Audioslave

TemporalSoften(int clip, int radius, int luma_threshold, int chroma_threshold [, int scenechange] [, int mode])

Quote:
Originally Posted by Avisynth.org
int scenechange = Using this parameter will avoid blending across scene changes. 'n' defines the maximum average pixel change between frames. Good values for 'n' are between 5 and 30. Requires ISSE

int mode = An optional mode=2 parameter: It has a new and better way of blending frame and provides better quality. It is also much faster. mode=1 is default operation, and works as always.
And as we are using AVS in a version >= 2.51 its useful to switch to mode 2
Reply With Quote
  #24  
11-21-2003, 07:36 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
@Incredible

Hi there!
I will try your modified script with my nemesis - The Matrix Reloaded. You know I've been having difficulties with fitting this movie on one CD-R. Hopefully I will have better luck with this new script. Will get back with my results!
__________________
AudioSlave
Reply With Quote
  #25  
11-21-2003, 07:59 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Audioslave ...

Well ...

Quote:
Old MA Script: 12409 Kbyte - 00:03:24

- New MA Script: 12042 Kbyte - 00:03:41

- The modified new MA Script below: 12136 kbyte - 00:03:29
As you see this won't end up in a real compression peak,
so I think there should be other opportunities which could give you your desired results?

BUT look closer... Kwags new MA version gives you more compression! But on the other hand a softer image (if still the "merge...." lines are added).
Reply With Quote
  #26  
11-21-2003, 08:09 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
Yes, hopefully there is options to gain more compression but I'm lost. I don't know what to use (or where or how...). I really want to squeeze this movie onto one 80 min disc!
__________________
AudioSlave
Reply With Quote
  #27  
11-21-2003, 08:22 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
@Kwag
So it performs a permanent Unfiltering like already done in Kwag's new vers. but TempSoften will only perform on static scenes.
This is exactly what I want to avoid
The ON/OFF switching of filters

-kwag
Reply With Quote
  #28  
11-21-2003, 08:23 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
I thought you want to avoid blur kick-ins??
Reply With Quote
  #29  
11-21-2003, 08:24 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
I thought you want to avoid these blur kick-ins??
Please read this http://www.kvcd.net/forum/viewtopic....ght=hysteresis

That case was caused by FFdshow, but I've seen the behaviour happen on some wierd "almost still" scenes with some solid moving objects. It can happen

-kwag
Reply With Quote
  #30  
11-21-2003, 08:33 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by Kwag
UNLESS, that specific scene is right at the border of the treshold of the MA script filter switching point, and you are seeing a fast oscilation between TemporalSmoother and unfilter kicking in and out at a very high speed. The best analogy to this is "Histheresis" effect:
I see Kwag but as I can't download his sample I assume he got problems with oscillating "blur kick ins", ... do I see this right??

And thats why I left the unfiltering untouched ....
Or did "his" problem result by edgy Threshold-Tempsoften oscillation?
Reply With Quote
  #31  
11-21-2003, 08:37 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible

Kwag, I recognised this evening the following: ...Why did you perform in the past and in your script now the fmin function on Tempsoften ... as in my opinion 2/nf never will result in more than 2!
NO
nf can go down to ~.2, so 1/.2 = 5
Quote:

And whats about the comment of Digitall.doc?
That a rounded 2/5 could result as 0 radius on tempsoften??
So
That's exactly what I want
If the value of radius results as zero, it means that it's a high action scene, and I don't want TemporalSoften to work
So radius will be zero and so will the strength values. Thus rendering the temporal filter useless on action scenes, which is the exact effect I want, but WITHOUT turning the filter off

-kwag
Reply With Quote
  #32  
11-21-2003, 08:41 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
I see Kwag but as I can't download his sample I assume he got problems with oscillating "blur kick ins", ... do I see this right??
No. It's not related to scene changes. It's related to "Hysteresis" effect, where it can cause fast oscillations on a specific point of a movie, by the quick "turning on/turning off" filters on that boundary. It's very rare, but it can happen.

-kwag
Reply With Quote
  #33  
11-21-2003, 08:50 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
@kwag

Good ev'nin'!
Sorry to barge in like this but I was wondering about the TempSoft parameters. Do you have a suggestion for a new line or should I use the line incredible posted?:
Quote:
TemporalSoften(round(2/nf), round(1/nf), round(3/nf), 15, 2)
Just curious...

EDIT: Or maybe just change the last two parameters in the new MA script (1, 1) to 15, 2? I'm clueless...
__________________
AudioSlave
Reply With Quote
  #34  
11-21-2003, 08:52 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by kwag
Quote:
Originally Posted by incredible

Kwag, I recognised this evening the following: ...Why did you perform in the past and in your script now the fmin function on Tempsoften ... as in my opinion 2/nf never will result in more than 2!
NO
nf can go down to ~.2, so 1/.2 = 5
As I said, maybe I'm/was confused at these hours, therefore: :banghead:
Quote:
Quote:

And whats about the comment of Digitall.doc?
That a rounded 2/5 could result as 0 radius on tempsoften??
So
That's exactly what I want
If the value of radius results as zero, it means that it's a high action scene, and I don't want TemporalSoften to work
Sorry misunderstanding this was refered to the old script where the filter on/off's based on thresholds.
Quote:
So radius will be zero and so will the strength values. Thus rendering the temporal filter useless on action scenes, which is the exact effect I want, but WITHOUT turning the filter off

-kwag
Everything clear! Trash the mod. script above! I think I have to get some sleep

@Audioslave

NO!

Dont use the tempsoften line without the fmin call!!! As you can see the explanation why in here ---- I thought wrong! Shure nf can go below 1 as I already knew ... Im an idiot *lol*!!
Use the one kwag used but with mode set to 2

Edit: As I see now you edited it in your post too.
Reply With Quote
  #35  
11-21-2003, 08:56 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
Oki-dokie
__________________
AudioSlave
Reply With Quote
  #36  
11-21-2003, 08:59 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
Everything clear! Trash the mod. script above! I think I have to get some sleep
Drink a cold beer so you can feel the "temporal" effect, and then drink a second beer and you'll see how you go "linear" to bed. Then your "ratio" will be set to "zero", until you wake up
Happy dreams

-kwag
Reply With Quote
  #37  
11-21-2003, 09:01 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Right!... but anyhow ... this try and error is where everything is based on
Now Ill really dream motion adaptive ... and I hope not oscillating!

good night!
Reply With Quote
  #38  
11-21-2003, 09:02 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
@kwag

No offence, but I think you've forgotten to include the "nf=0" in the latest optimal script post...
__________________
AudioSlave
Reply With Quote
  #39  
11-21-2003, 09:16 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by audioslave
@kwag

No offence, but I think you've forgotten to include the "nf=0" in the latest optimal script post...
Not needed.
The value of nf will be assigned on the first instance of "ScriptClip(" nf = YDifferenceToNext()"......

-kwag
Reply With Quote
  #40  
11-21-2003, 09:19 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
OK, sorry. My mistake. Damn, I really must learn this programming business! Didn't mean to step on your toes...
__________________
AudioSlave
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth c_.dll Version 2.5? Blubear Avisynth Scripting 7 07-19-2004 03:24 AM
Avisynth: Which version is everyone using? bigggt Avisynth Scripting 6 02-14-2004 12:05 PM
KVCD: Use Version 2 script with TV captures? nicksteel Video Encoding and Conversion 5 10-29-2003 04:16 AM
Avisynth: which version should be used? Insider Avisynth Scripting 3 05-09-2003 03:39 PM
MovieStacker: What AVISynth version? BoxOfSnoo Video Encoding and Conversion 5 03-26-2003 10:09 PM

Thread Tools



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