digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   SansGrip Filters: Improve picture quality using "AddNoise" Filter (http://www.digitalfaq.com/archives/avisynth/1510-sansgrip-filters-improve.html)

jorel 11-15-2002 02:36 AM

Quote:

Originally Posted by VILLA21
jorel,
BB_StrengthConstant = 352 * 240 * 20 # Base strength
StrengthValue = round (BB_StrengthConstant / BB_Resolution)

The above 2 lines calculate the right Strength value for a given resolution.
Eg for 352x240 it"s 20.
Calculate this value manually for your resolution and set it in the Frameserver tab.

:lol:
ok,thank you friend....
it was in front of my eyes and i don't see it!!

:lol:
thanks Villa21:!: :wink: :wink:

VILLA21 11-15-2002 04:55 AM

Holomatrix,
"...How do I Calculate the value? What would my script look like, using that whole script, for a 352 X 480 resolution?..."

(352*240*20) / (352*480) = 10

[AVISYNTH_BlockbusterBilinearResize]
0=BilinearResize(^TargetWidth,^TargetHeight)
1=AddBorders(0,^BorderTop,0,^BorderBottom)
2=LoadPlugin(!Blockbuster.dll)
3=Blockbuster( method="noise", detail_min=1, detail_max=10, lv=1 )
4=Blockbuster( method="sharpen", detail_min=20, detail_max=90, strength=^StrengthValue )
!Blockbuster.dll=C:\VideoTools\DVD2SVCD\Blockbuste r\Blockbuster.dll
^StrengthValue=10

Or alternatively set this value in the frameserver tab of DVD2SVCD.

Holomatrix 11-15-2002 10:35 AM

Ok, thanks.

Holomatrix 11-15-2002 11:53 AM

I can't seem to get DVD2SVCD accept 5823 P GOP"S. Is this amount nessessary?

ARAGORN 11-15-2002 12:11 PM

Hi Holomatrix

In dvd2svcd, put the following values:1,18,3,1,18 for ntsc or 1,15,3,1,15 for pal. :D

ARAGORN

Holomatrix 11-15-2002 12:36 PM

Ok, I'll put that. But was wondering why the KVCD LBR 352X240 template is using 1,5823,3,1,18 ?
Thanks

ARAGORN 11-15-2002 12:54 PM

5823 is like a signature in all the kvcd templates. It's there to show it's a kwag template. In dvd2svcd it doesn't work.

ARAGORN

SansGrip 11-19-2002 02:44 PM

Quick update:

I'm currently porting Blockbuster to YV12, which will be the 0.5 release. After that, are there any additions people would like to see? One thing I was considering is the addition of an unsharp mask method.

kwag 11-19-2002 03:40 PM

Hi SansGrip,

Can't think of anything right now. I'm having a good time with the filters as they are ;)

-kwag

SansGrip 11-19-2002 05:19 PM

New version 0.5
 
Here's 0.5 with minor changes for the Avisynth 2.0/YUY2 version but now includes an Avisynth 2.5/YUY2/YV12 version.

Changes:

* Removed chroma noising (and cm and cv parameters)
* Renamed lm and lv to mean and variance respectively
* Some small optimizations here and there

Even though not much has changed in the Avisynth 2.0/YUY2 version, I'd appreciate if everyone could upgrade in order to test this one works okay. You'll probably find it a bit faster too :).

Have fun.

kwag 11-19-2002 07:40 PM

@SansGrip,

I'm going to write a script to mirror your site every hour.
You're updates are coming in too fast :lol:
Count on it, in the next few minutes 8)

Edit:
I've added LegalClip() filter to my processing script.
Here's the latest script I'm using, with the change for Blockbuster version 0.5:

LegalClip() # Just in case, ensure TV Colorspace. ( Is this correct SansGrip ;) )
FluxSmooth()
NoMosmooth()

######## Auto Strength, proportional strength depending on resolution #####
## Remove only one "#" on front of the resolution that matches your encoding.

BB_Resolution = 352*240
#BB_Resolution = 352*480
#BB_Resolution = 528*480
#BB_Resolution = 544*480
#BB_Resolution = 704*480

BB_StrengthConstant = 352 * 240 * 20 # Base strength
StrengthValue = round (BB_StrengthConstant / BB_Resolution)
Blockbuster( method="noise", detail_min=1, detail_max=10, variance=1 ) # Apply noise if complexity is <= 10%.
Blockbuster( method="sharpen", detail_min=20, detail_max=90, strength=StrengthValue) # Sharpen only if complexity is >= 20% AND <=90%.

# The last ~10% is left untouched (pass-through), to avoid sharpening highest frequency components ( Peak artifacts, sharpest edge, etc. )
##
################## End Auto Strength ####################


-kwag

SansGrip 11-19-2002 07:58 PM

Quote:

Originally Posted by kwag
I'm going to write a script to mirror your site every hour.
You're updates are coming in too fast :lol:

heheh cool, thanks.

Quote:

LegalClip() # Just in case, ensure TV Colorspace. ( Is this correct SansGrip ;) )
Yep, I would use it right after the ...Source line, then again at the very end of the script to catch any strays that may have snuck in during filtering.

Quote:

FluxSmooth()
NoMosmooth()
I'm not sure you'll gain much by using Flux and NoMo together that couldn't be achieved by using just one with stronger settings. Personally I'd go with Flux, but that's just my opinion :).

kwag 11-19-2002 09:40 PM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
I'm going to write a script to mirror your site every hour.
You're updates are coming in too fast :lol:

heheh cool, thanks.

http://www.jungleweb.net/~sansgrip/avisynth is now mirrored ~5 minutes past every hour to http://www.kvcd.net/sansgrip/avisynth ;)

Quote:

FluxSmooth()
NoMosmooth()
Quote:

I'm not sure you'll gain much by using Flux and NoMo together that couldn't be achieved by using just one with stronger settings. Personally I'd go with Flux, but that's just my opinion :).
So NoMo is out of the script, for now ;)

-kwag

LadyMiles 11-20-2002 12:53 AM

Wow you go away for a couple of days and the revolution just rolls right pass you. So many new developments. Are there any new test clips Kwag ? Something that would show the sucess of your new script ?

kwag 11-20-2002 12:54 AM

Quote:

Originally Posted by LadyMiles
Wow you go away for a couple of days and the revolution just rolls right pass you. So many new developments. Are there any new test clips Kwag ? Something that would show the sucess of your new script ?

I'll make one up for you :wink: . Stand by .....

Edit:
Here it is: KVCD LBR CQ_VBR=35 ( which fits this particular 120 minute movie on one CD-R ) 47 seconds ~5MB : http://www.kvcd.net/latest.m1v

Script used:

LoadPlugin("C:\encoding\MPEG2DEC.dll")
LoadPlugin("C:\encoding\fluxsmooth.dll")
LoadPlugin("C:\encoding\blockbuster.dll")
LoadPlugin("C:\encoding\legalclip.dll")
mpeg2source("K:\TEST\VIDEO_TS\movie.d2v")
LegalClip()

BilinearResize(336,192,45,0,630,480)

FluxSmooth()

######## Auto Strength, proportional strength depending on resolution #####
## Remove only one "#" on front of the resolution that matches your encoding.


BB_Resolution = 352*240
#BB_Resolution = 352*480
#BB_Resolution = 528*480
#BB_Resolution = 544*480
#BB_Resolution = 704*480

BB_StrengthConstant = 352 * 240 * 20 # Base strength
StrengthValue = round (BB_StrengthConstant / BB_Resolution)
Blockbuster( method="noise", detail_min=1, detail_max=10, variance=1 ) # Apply noise if complexity is <= 10%.
Blockbuster( method="sharpen", detail_min=20, detail_max=90, strength=StrengthValue) # Sharpen only if complexity is >= 20% AND <=90%.

# The last ~10% is left untouched (pass-through), to avoid sharpening highest frequency components ( Peak artifacts, sharpest edge, etc. )
##
################## End Auto Strength ####################

AddBorders(8,24,8,24)
LegalClip()


-kwag

LadyMiles 11-20-2002 01:54 AM

Thanks Kwag. The clip helps to know what to expect and the quality looks great. Have you ever tried the script on "the Matrix" ?

I don't know if this has been answered but does this work on tv captures ?

BTW why two legal clips ?

black prince 11-21-2002 09:37 PM

Hi LadyMiles,

This is from the post above:

Quote:

Kwag Quote:
LegalClip() # Just in case, ensure TV Colorspace. ( Is this correct SansGrip )

SansGrip Quote:
Yep, I would use it right after the ...Source line, then again at the very end of the script to catch any strays that may have snuck in during filtering.
-black prince

KingTuk 11-22-2002 07:46 PM

Script Program
 
has anyone tried this?

http://tangentsoft.net/video/asynther/

I've used it to make several scripts of different movie sizes and now all I have to do is right click on the movie then send to Avisynthesizer and it makes a script for the movie.

SansGrip 12-19-2002 08:43 PM

New release 0.6
 
I just uploaded 0.6 to my site. Here's the changelog:

Quote:

0.6 - Added seed parameter. Fixed a bug that might have been responsible for the access violations when using with high resolutions and the default cache size.
This means you should now be able to drop the cache=1024 from your scripts, since I believe I have fixed the bug that caused the access violation.

The seed parameter allows one to specify the seed value for the pseudo-random number generator. If seed=0 (the default) it'll use the system's current time as in previous versions. If seed>0 it'll use that value for the seed, and there will be no variations in file size when run multiple times.

Hint: It doesn't really matter what number you choose for the seed. As long as it's the same for each run, the file size won't change. I used 1 for my tests, but hey, use your imagination ;).

Let me know how you find it.

black prince 12-19-2002 09:40 PM

Hi SansGrip,

Quote:

The seed parameter allows one to specify the seed value for the pseudo-random number generator. If seed=0 (the default) it'll use the system's current time as in previous versions. If seed>0 it'll use that value for the seed, and there will be no variations in file size when run multiple times.

Thank you, Thank you, thank you, thank you...... :D :D :D

-black prince


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

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.