Quantcast Avisynth: Motion Adaptive Filtering Now Possible? - Page 11 - digitalFAQ.com Forums [Archives]
  #201  
05-31-2003, 11:30 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
Hi jorel,

The sample was encoded with a CQ of 66, which is about right for the movie on two CDs at 704x480. That's a full screen version, so on one CD, I would have gone 528x480 and not 704x480. But on two CDs, it will look just like the DVD

-kwag
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
  #202  
05-31-2003, 11:56 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
Yesterday, I encoded "The Foreigner" with the script that was posted without scene change detection. The CQ that ToK calculated was CQ=63.65. I just fed the new script to ToK, and the new CQ is 63.974
Not that much, but obviously it's a small increase in CQ

-kwag
Reply With Quote
  #203  
06-01-2003, 12:12 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
Quote:
Originally Posted by kwag
Hi jorel,

The sample was encoded with a CQ of 66, which is about right for the movie on two CDs at 704x480. That's a full screen version, so on one CD, I would have gone 528x480 and not 704x480. But on two CDs, it will look just like the DVD

-kwag
Kwag,

again:
Resolution (fps):480x480 (29,970 fps)
Total Frames: 5001
Total Time : 00:02:47

Encoding... CQ : 71,867
Final Encoded Size: 27.415.408
Total Time (all operations): 00:07:42

results:
clear like
colors like
quality :yippie:

i can imagine the result with two CDs in 528x480,
...it will look just like the DVD

you will update the script or i wait a little more?
your brain don't stop!
Reply With Quote
  #204  
06-01-2003, 12:28 AM
syk2c11 syk2c11 is offline
Free Member
 
Join Date: Jun 2002
Posts: 290
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Kwag,
What is the function of "Limiter()"?
Reply With Quote
  #205  
06-01-2003, 12:34 AM
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
Current script was just updated
Here's a sample with the new script with scene change detection.
TRY to find macroblocks in the sample
Sample is 18 seconds @704x480, CQ=63.97 (target for one CD-R) MIN=300, MAX=2,500.
www.kvcd.net/Foreigner-scd.mpg

I know I won't be doing any more 352x480 resolution encodes
With this stuff, there's no need to go below 528x480, and we haven't even finished tweaking this yet
Can't wait to get some 90 minute CD-Rs in my hands

-kwag
Reply With Quote
  #206  
06-01-2003, 12:34 AM
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 syk2c11
Hi Kwag,
What is the function of "Limiter()"?
Same as LegalClip().

-kwag
Reply With Quote
  #207  
06-01-2003, 01:41 AM
bman bman is offline
Free Member
 
Join Date: Apr 2002
Posts: 356
Thanks: 0
Thanked 0 Times in 0 Posts
Hi all !
Kwag - as always u are surprising us with new achievements
Clip looks great and there is nothing new in what I sead
I have few questions or maybe requests to U or sh0dan or any others too :
1 . What about VobSub or TextSub for avs2.52
any chanse to get it soon ???
2. I have to encode my doughters wedding and I need to make a standard VCD . I tryed both of scripts in avs 2.08 and avs 2.5* and I'm disappointed with result :
Encoder is just going creasy when he gets to dancing scenes : I see ugly noticable blockiness .
I tryed to add some noise with blockbuster but no success .
I can do that in higher resolution but there is compatibility prob with another players , So I'm stucked .
Any suggestions ????
bman
Reply With Quote
  #208  
06-01-2003, 04:51 AM
TBO TBO is offline
Free Member
 
Join Date: Aug 2002
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
wow,Great!
the samples looks great, Kwag

TBO
Reply With Quote
  #209  
06-01-2003, 06:54 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Current script was just updated
Here's a sample with the new script with scene change detection.
TRY to find macroblocks in the sample
Sample is 18 seconds @704x480, CQ=63.97 (target for one CD-R) MIN=300, MAX=2,500.
www.kvcd.net/Foreigner-scd.mpg

I know I won't be doing any more 352x480 resolution encodes
With this stuff, there's no need to go below 528x480, and we haven't even finished tweaking this yet
Can't wait to get some 90 minute CD-Rs in my hands

-kwag
You're so right kwag... There's still lots of work to do. I'm going to benchmark some Temporal Filters against each other, and will let you know the results... great work, all of you!
__________________
j3llyG0053
Reply With Quote
  #210  
06-01-2003, 07:50 AM
TBO TBO is offline
Free Member
 
Join Date: Aug 2002
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
I have a problem here:

Code:
## DLL Section ## 
# 
LoadPlugin("C:\01 - KVCD TESTS\filters\MPEG2Dec3.dll")
LoadPlugin("C:\01 - KVCD TESTS\filters\UnFilter.dll")
LoadPlugin("C:\01 - KVCD TESTS\filters\STMedianFilter.dll")
LoadPlugin("C:\01 - KVCD TESTS\filters\BlockBuster.dll")
LoadPlugin("C:\01 - KVCD TESTS\filters\Sampler-2.5.dll") 
# 
#### 

## Defined Variables and Constants ## 
# 
MaxTreshold = 1.58 
scd_trigger = 1.0 # Scene change trigger value. 
cf = 0 # Current frame. 
lf = 0 # Last frame 
# 
#### 

## Main section and static filters ### 
# 
Mpeg2Source("C:\Dvd\We were soldiers\we were soldiers.d2v") 
Limiter() 
UnFilter(50, 50) 
BicubicResize(512, 414, 1/3, 1/3, 4, 0, 712, 576)
STMedianFilter(8, 32, 0, 0 ) 
TemporalSoften(2,7,7,3,2) # Experimental!
MergeChroma(blur(1.50))  
MergeLuma(blur( 0.1)) 
# 
#### 

## Dynamic Linear Adaptive filtering and Scene Change Detection ## 
# 
FrameEvaluate("lf = YDifferenceFromPrevious()/16") 
FrameEvaluate("cf = YDifferenceToNext()/16") 
ScriptClip("(cf - lf) < scd_trigger && cf < MaxTreshold ? MergeLuma(blur(cf)) : MergeLuma(blur( 0.1 ))") 
ScriptClip("(cf - lf) < scd_trigger && cf >= MaxTreshold ? MergeLuma(blur(MaxTreshold)) : MergeLuma(blur( 0.1 ))") 
#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker! 
#AddBorders( Your_Values_Here ) # Depends on situation. Use MovieStacker!
AddBorders(16, 81, 16, 81) 
Limiter() 
Sampler(100, length=24)
# 
####
Im getting this message:
Evaluate Division by zero.

I dont know whats wrong,please help.

TBO
Reply With Quote
  #211  
06-01-2003, 08:12 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


Jellygoose,

i read some about the new filter from sh0dan called MipSmooth.
i don't test it but seems good.

do you know this filter?

from sh0dan:
MipSmoother is an attempt at reinventing SmoothHiQ and Convolution3D. For now this is a proof of concept, and the first versions are for evalutation of quality and speed. MipSmooth was made to enable smoothing of larger pixel areas than 3x3(x3), to remove blocks and smoothing out low-frequency noise.
It is my hope that when this filter has been tweaked it will be better than C3D at smoothing out flat surfaces and gradients. This should be good for cartoons/anime, but it actually also helps film footage quite nicely.

Reply With Quote
  #212  
06-01-2003, 10:02 AM
Red-M Red-M is offline
Free Member
 
Join Date: Nov 2002
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Enjoying testing this, but I was testing encoding a 4:3 fullscreen Episode of Red-Dwarf. Im still getting a "Slight" burst of lightness on some scenes, but looks nice to say the orignal DVD looks, well below average.
but still testing
Reply With Quote
  #213  
06-01-2003, 10:04 AM
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 TBO
I have a problem here:



Im getting this message:
Evaluate Division by zero.

I dont know whats wrong,please help.

TBO
Make sure you are using the new AviSynth 2.52. If that doesn't do it, remove the lines:
Code:
LoadPlugin("C:\01 - KVCD TESTS\filters\BlockBuster.dll")
LoadPlugin("C:\01 - KVCD TESTS\filters\Sampler-2.5.dll") 

and Sampler(100, length=24)
See if the error goes away.

-kwag
Reply With Quote
  #214  
06-01-2003, 10:07 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
Hi kwag...

Hmmm just tested the newest script with scene change detection... The flashing is completely gone for me know, but I noticed that the whole movie looks a lot blurrier now...
What do I have to change to remove the static MergeLuma of 0.1 from the script, as I think that this is the case...
Can I just comment it out? or do I also have to alter these lines here:

Code:
ScriptClip("(cf - lf) < scd_trigger && cf < MaxTreshold ? MergeLuma(blur(cf)) : MergeLuma(blur( 0.1 ))") 
ScriptClip("(cf - lf) < scd_trigger && cf >= MaxTreshold ? MergeLuma(blur(MaxTreshold)) : MergeLuma(blur( 0.1 ))")

I'd like to use maybe a static MergeLuma of 0.05 or 0.025...
__________________
j3llyG0053
Reply With Quote
  #215  
06-01-2003, 10:14 AM
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 Red-M
Im still getting a "Slight" burst of lightness on some scenes,
Hi Red-M,

Try that same scene without the filters. There shouldn't be a problem. I might be that those conditions are present on the original DVD
Also, did you encode at 704x480(576) or another resolution
If it was lower than that, we're probably going to have to play with the scd_trigger value The value I selected look optimal for 704x480(576), but I have to try at other resolutions.
If you want to see what values are being returned on each frame, look at the script I posted here earlier, that has the "Subtitle" lines added for debugging, and then you can see the value changed dynamically as you play your .avs in WMP or even in Vdub

-kwag
Reply With Quote
  #216  
06-01-2003, 10:19 AM
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 Jellygoose
Hi kwag...

Hmmm just tested the newest script with scene change detection... The flashing is completely gone for me know, but I noticed that the whole movie looks a lot blurrier now...
What do I have to change to remove the static MergeLuma of 0.1 from the script, as I think that this is the case...
Can I just comment it out? or do I also have to alter these lines here:

Code:
ScriptClip("(cf - lf) < scd_trigger && cf < MaxTreshold ? MergeLuma(blur(cf)) : MergeLuma(blur( 0.1 ))") 
ScriptClip("(cf - lf) < scd_trigger && cf >= MaxTreshold ? MergeLuma(blur(MaxTreshold)) : MergeLuma(blur( 0.1 ))")

I'd like to use maybe a static MergeLuma of 0.05 or 0.025...
There are two places. Change this to read:
Code:
ScriptClip("(cf - lf) < scd_trigger && cf < MaxTreshold ? MergeLuma(blur(cf)) : MergeLuma(blur( 0 ))") 
ScriptClip("(cf - lf) < scd_trigger && cf >= MaxTreshold ? MergeLuma(blur(MaxTreshold)) : MergeLuma(blur( 0 ))")
And remove the line:
Code:
MergeLuma(blur( 0.1))
from the main section.

That will kill the MIN mergeluma of 0.1 completely on scene changes and throughout the picture, and only apply the dynamic value returned, which can go way below 0.1 throughout the picture

-kwag
Reply With Quote
  #217  
06-01-2003, 10:47 AM
ovg64 ovg64 is offline
Free Member
 
Join Date: Jan 2003
Location: Puerto Rico
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ovg64
Hey Kwag is there a way to lower the Briteness in a movie with avs 2.5
i know in 2.0 we had the tweak filter for that, or you could change the luminance when doing the d2v but this doen't work with 2.5 and i dont know of any filter for this problem. This movie is too brite and file size is too big, i want to up CQ a bit more.
Reply With Quote
  #218  
06-01-2003, 11:28 AM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by TBO
I have a problem here:

Code:
## DLL Section ##
#
LoadPlugin("C:\01 - KVCD TESTS\filters\MPEG2Dec3.dll")
LoadPlugin("C:\01 - KVCD TESTS\filters\UnFilter.dll")
LoadPlugin("C:\01 - KVCD TESTS\filters\STMedianFilter.dll")
LoadPlugin("C:\01 - KVCD TESTS\filters\BlockBuster.dll")
LoadPlugin("C:\01 - KVCD TESTS\filters\Sampler-2.5.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.58
scd_trigger = 1.0 # Scene change trigger value.
cf = 0 # Current frame.
lf = 0 # Last frame
#
####

## Main section and static filters ###
#
Mpeg2Source("C:\Dvd\We were soldiers\we were soldiers.d2v")
Limiter()
UnFilter(50, 50)
BicubicResize(512, 414, 1/3, 1/3, 4, 0, 712, 576)
STMedianFilter(8, 32, 0, 0 )
TemporalSoften(2,7,7,3,2) # Experimental!
MergeChroma(blur(1.50))
MergeLuma(blur( 0.1))
#
####

## Dynamic Linear Adaptive filtering and Scene Change Detection ##
#
FrameEvaluate("lf = YDifferenceFromPrevious()/16")
FrameEvaluate("cf = YDifferenceToNext()/16")
ScriptClip("(cf - lf) < scd_trigger && cf < MaxTreshold ? MergeLuma(blur(cf)) : MergeLuma(blur( 0.1 ))")
ScriptClip("(cf - lf) < scd_trigger && cf >= MaxTreshold ? MergeLuma(blur(MaxTreshold)) : MergeLuma(blur( 0.1 ))")
#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker!
#AddBorders( Your_Values_Here ) # Depends on situation. Use MovieStacker!
AddBorders(16, 81, 16, 81)
Limiter()
Sampler(100, length=24)
#
####


Im getting this message:
Evaluate Division by zero.

I dont know whats wrong,please help.

TBO
the problem is definetely this line:
Code:
Sampler(100, length=24)
use Sampler-2.5.dll and change the line to
Code:
Sampler()
but if you're using ToK don't have any Sampler() in there

-ren
Reply With Quote
  #219  
06-01-2003, 11:32 AM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
Hey kwag,

Your scene detection algorithm is working beautifully! Great job

ren
Reply With Quote
  #220  
06-01-2003, 11:38 AM
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 rendalunit
Hey kwag,

Your scene detection algorithm is working beautifully! Great job

ren

I finished encoding "The Foreigner" (again!) and just watched some key areas that had "flashes" before, and they're all gone Scene change transitions are completely smooth now
Did you run the script with the debugging subs turned on, to see the scene changes in action

-kwag
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Dynamic Linear Adaptive Filtering and Scene Change Detection supermule Avisynth Scripting 3 09-15-2006 01:45 AM
Avisynth: Message from linear motion adaptive filtering? holgerschlegel Avisynth Scripting 7 08-27-2003 04:08 AM
Avisynth: Help with Linear Motion Adaptive Filtering pitoman Avisynth Scripting 2 08-05-2003 12:51 PM
Avisynth: Motion adaptive filtering good enough? bicho_visacoso Avisynth Scripting 6 06-15-2003 06:30 AM
Avisynth: AVS 2.5x Script, Motion Adaptive Filtering problems? Bchteam Avisynth Scripting 15 05-31-2003 12:38 PM

Thread Tools



 
All times are GMT -5. The time now is 02:22 PM  —  vBulletin Jelsoft Enterprises Ltd