digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Death of STMedianFilter (http://www.digitalfaq.com/archives/avisynth/3633-avisynth-death-stmedianfilter.html)

jorel 05-19-2003 03:52 AM

Quote:

Originally Posted by Jellygoose
Quote:

Originally Posted by Kane
sounds crazy jorel, but i will try this

btw: whatīs the next filter, we should kill? :lol: :wink:

How about MPEG2DEC.dll ? 8)

Jellygoose my friend, :)

i forgot to post this:

if you remove the mpeg2dec.dll of the script it don't work.
after load the script in ToK, see in the video tab
or in tmpgenc when encoding,
you got a big red line asking for mpeg2dec.dll :!:

:wink:

Jellygoose 05-19-2003 05:46 AM

Quote:

Originally Posted by jorel
Quote:

Originally Posted by Jellygoose
Quote:

Originally Posted by Kane
sounds crazy jorel, but i will try this

btw: whatīs the next filter, we should kill? :lol: :wink:

How about MPEG2DEC.dll ? 8)

Jellygoose my friend, :)

i forgot to post this:

if you remove the mpeg2dec.dll of the script it don't work.
after load the script in ToK, see in the video tab
or in tmpgenc when encoding,
you got a big red line asking for mpeg2dec.dll :!:

:wink:

hey jorel...

i was just kidding, about MPEG2DEC.dll buddy :wink:
it's just funny to me how we kill one filter after the other, and at the end we're only left with MPEG2DEC. :D

jorel 05-19-2003 05:58 AM

:lol:

no "Jelly" friend,

we're let only the Kwag's templates.



kill the rest :!: :gun:

:lol: :lol:

:mrgreen:

Kane 05-19-2003 07:59 AM

hi jorel

i did an encoding with your script last night, as promised.
this is, what i found out:

1. jorelīs script

Code:

Mpeg2Source("E:\RIP\Snatch.d2v")
LegalClip()
GripCrop(352, 576)
sharpen(0.6)
GripSize(resizer="BicubicResize")
BlockBuster(method="noise", detail_min=3)
GripBorders()
LegalClip()

final cq: 70,7
encoding time: 4.05h 8O

2. my current script

Code:

Mpeg2Source("E:\RIP\Snatch.d2v")
LegalClip()
GripCrop(352, 576)
GripSize(resizer="BicubicResize")
UnFilter(50, 50)
TemporalSmoother(1, 2)
MergeChroma(blur(1.58))
MergeLuma(blur(0.3))
GripBorders()
LegalClip()

final cq: 72,8
encoding time: ca 4.45h (canīt remember the specific time)

i was really suprised , when i saw the result this morning. both films are nearly indentical in image quality. only, if there is much action in a scene, the current script seems to make a picture, that is slightly sharper.

i watched two scenes, sitting away from my 17" as i would, when watching dvd, i canīt see a difference between the two scripts.
unfortunately i couldnīt compare it on TV , cosī i donīt have one here.

here are some pictures to compare:

jorel:
http://www.digitalfaq.com/archives/error.gif

mine:
http://www.digitalfaq.com/archives/error.gif


jorel:
http://www.digitalfaq.com/archives/error.gif

mine:
http://www.digitalfaq.com/archives/error.gif

maybe there colours look a bit more "realistic" in the current script pictures, if you look at the guyīs cheek

bman 05-19-2003 09:55 AM

Hi all !
What see in this pictures that even Kane's encoding CQ was higher picture resulted Jorel's script was more sharper .
This is barely noticable ( but noticable ) on PC 17" monitor .
@Kane !
With whole respect to Tremendous efforts u made to "KILL" STM :lol: :lol: :lol: I think this barely noticable difference in picture sharpness becomes to be very noticable on big screen TV (let's say 34") .
TV is smoothing picture enyways , makes him softer and if picture is already soft on PC monitor then it becomes blurry and this kind result I would like to prevent after encoding .
@Jorel !
Your work is almoast perfect , keep going ! :wink:
bman

Kane 05-19-2003 09:59 AM

hmm, i see it the other way round.
i see a bit more sharpness in this script with mergeluma/chroma and unfilter.

you have to make a comparison yourself, it becomes more obvious when you have moving pictures. the still images a nearly identical

jorel 05-20-2003 03:05 AM

wow, thanks Kane.

using mergeluma/chroma you got more CQ, but is really slow.
but if you do this in your script:

Mpeg2Source("E:\RIP\Snatch.d2v")
LegalClip()
UnFilter(50, 50) <-----before the resize is faster and got more sharp.
GripCrop(352, 576)
GripSize(resizer="BicubicResize")
TemporalSmoother(1, 2)
MergeChroma(blur(1.58))
MergeLuma(blur(0.3))
GripBorders()
LegalClip()

see, unfilter (or sharpen) :arrow: before the resize, this was the idea!
change this in your script, you will got more sharpness and is faster too.
i have tested unfilter after resize,is not so good like using before resize.

you'll see that in this way you can decrease the value of unfilter to
:arrow: (30,30) give the same sharpness and the best:
less time to encode,little less final size,more CQ and got sharpness :!:

yes,you got less time and less final size cos unfilter with a big values
turn the script a little slow and encrease the final size.
for this reason i change the script :!:

thank you friend, your samples help me some more:
with merge luma/chroma we got more CQ but need more time to encode!

you know,i'm not expert, but i think that 480x480
can be better than 352x576...maybe.

Kane
:D
i'm really thankfull.
your results are fantastics and will help me to try more "mad" scripts.
you got the idea dear friend:
the idea is find the "perfect" script for us all. :wink:
if you want to kill or rebirth some filters...call me!
we have the power to let live or kill filters.
:lol: :lol: :lol:

bman ...
"@Jorel !
Your work is almoast perfect , keep going !"
thanks for this words friend! :wink:

boeddha 05-20-2003 04:01 AM

Hi Jorel,

I've got a quick question. I use the same script as kane's current script but I also use spacedust. Can I also put unfilter before resize or has kwag a reason why spacedust comes before unfilter?

If I put spacedust and unfilter before resize would this have a positive effect?

Greetz Bas

bman 05-20-2003 05:13 AM

Hi Jorel !
I haven't tryed your new script wihout STM and can't tell u about my expressions yet , but Kane's script without STM is giving defenetly worst results for me .
I see that picture is too soft and blurry , Colors are brighter and not natural . I can't tell that I'm glad with resulted quality .
Unfilter() before resizing is same as Sharpen () ?
Did u tryed resulted clip on TV screen in both cases ?
What about moving this lines before Resizing ?

TemporalSmoother(1, 2)
MergeChroma(blur(1.5)
MergeLuma(blur(0.3))

There is some twisted logic behind of this :
If Picture has noise or some dirth on it ( that's info too for resizing filter too ) they will be resized too - Right ?
So filtering before resize will remove unnecessary info and live clear picture for resize and additional filtering if is needed .
I think that resizing from clear picture give us better result or I'm wrong ???
I did some small clips but didn't get absolute answer .
Maybe u can help on this , Pal ?
Or anyone else ???
bman

Dialhot 05-20-2003 05:32 AM

I can give you "my" optimal script. It does smaller files than the "optimal script" given in the forum, and has a sharpen result (thanks to Lanczos resizing) :

Code:

AviSource("....",false)
MergeChroma(Blur(1.58 )
MergeLuma(Blur(0.2))
GripCrop(X,Y, overscan=1)
GripSize(resizer="LanczosResize")
FluxSmooth()
TemporalCleaner(ythresh=7,cthresh=15)
Undot()
GripBorders()

Note : I use "Fluxsmooth" in place of "SpaceDust" because I'm using avisynth 2.5 and there is no Dust5.dll for it.

Note2: I do not use LegalClip for same reason (I know there is a equivalent builtin command in 2.5 but TMPGEnc _already_ has a option to limit the range value of the output ! So why use a filter for that ?).

Kane 05-20-2003 05:53 AM

hi jorel

thanks for the hint with unfilter before resize, iīll try it today

i used 352x576 because i had encoded the movie for our second dvd player that doesnt support kvcdx3,
usually i would have compared both scripts with kvcdx3 :wink:

jorel 05-20-2003 06:11 AM

first : sorry my bad english :oops:

boeddha...
"unfilter before resize?" yes :!:
"has kwag a reason why spacedust comes before unfilter?"
i think tha Kwag don't want to loose sharpness. :wink:
"spacedust and unfilter before resize...positive effect?"
maybe...better is encode a little chapter to test! :)

bman...
"picture is too soft and blurry , Colors are brighter and not natural"
yeah, i see it too!
"I can't tell that I'm glad with resulted quality ." :wink:
"Unfilter() before resizing is same as Sharpen () ?"
yes i think,deserve more tests for speed and/or quality.
"Did u tryed resulted clip on TV screen in both cases ?"
yes, tons of samples in cdrw!
"What about moving this lines before Resizing ? "
it will give less final size but too slow encode,better is test it.
"If Picture has noise...filtering before resize...additional filtering"
only testing samples in each case can show what is better.

Dialhot...
i only use avisynth 2.08 no 2.50 cos some filters don't work and
2.5 got some bugs...are developing to better.
using LanczosResize i see strange artefacts around the images..
some ondulations....then i don't use no more but like ever,
the results of your tests take you to a better choice!
:wink:

Kane...
i open this page 2 times to answer,reading in one,
answer in other...i see you in the first when i'm writing!
"hint with unfilter before resize...i used 352x576...
...compared both scripts with kvcdx3"
great friend,we all are waiting your results.
:wink:

thanks to all,
:D

Dialhot 05-20-2003 06:40 AM

Quote:

Originally Posted by jorel
i only use avisynth 2.08 no 2.50 cos some filters don't work and
2.5 got some bugs...are developing to better.

I manage to find quite every filters I need in both 2.0 and 2.5 version. More : some great filters (like Bicublin or Deen) exist only in 2.5.

For the bugs : never had any problem in 2.5 that 2.0 can solve (I mean that I have both on my PC and when 2.51 fails, 2.08 fails also). So I rather to have the 35% speed improve I have with 2.5 :-)

Quote:

using LanczosResize i see strange artefacts around the images..
some ondulations....then i don't use no more but like ever,
the results of your tests take you to a better choice!
Youre right, this resizer is not the best. In fact "I" (it's a very personnel advice) prefer the sharpness given by Lanczos more than what I had with other filters combo (for instance, lower the MergeLuma blur and use bicubic or linear resize insteed of Lanczos)

Kane 05-20-2003 08:07 AM

next round of testing :D

jorel, my friend, you are great http://www.digitalfaq.com/archives/error.gif

i tested 4 scripts, did prediction and encoded a 48sec sample, this time 528x576 8)

Quote:

1st: mergeluma/chroma, unfilter(50, 50) after resizing
cq: 64,727
encoding time: 3:32
Quote:

2nd: mergeluma/chroma, unfilter(50, 50) before resizing
cq: 69,886 8O
encoding time: 3:16 8O
Quote:

3rd: mergechroma/luma, unfilter(30,30) before resizing
cq: 70,126
encoding time: 3:22
Quote:

4th: jorelīs script, sharpen (0.6) before resizing
cq: 70,707
encoding time: 2:11 8O 8O

result:

jorel, your idea, putting unfilter before resizing was fantastic

-> cq increased by 5, encoding time decreased, picture is really sharper 8)

the 3rd script is as good as the 1st , but not as good as the 2nd
your script, jorel, was once again the fastest http://www.digitalfaq.com/archives/error.gif , but you beat yourself with the idea, putting unfilter before resizing.

so my new favourite is

Code:

LegalClip()
UnFilter(50, 50)
GripCrop(528, 576)
GripSize(resizer="BicubicResize")
TemporalSmoother(1, 2)
MergeChroma(blur(1.58))
MergeLuma(blur(0.3))
GripBorders()
LegalClip()


best script, iīve tested so far
8)

jorel 05-20-2003 08:09 AM

ok Dialhot
:wink:

but see:
go to doom9 and in the avisynth thread and
you see lots of bugs...some are solved but still with problems.
Shodan is member here and is the best to teach about avisynth
2.5x,....he is a delevoper too!
:wink:

and yes is really faster,but as i wrote,
i don't have a good knowledge and choose wath is stable.
2.08 is stable!

in near future i will try 2.5x...waiting for our friends here.
i think that Boulder and some more members are using 2.5x...
i wait for his recomendations.

thanks for informations of Bicublin and Deen filters!

:)

kwag 05-20-2003 09:48 AM

Quote:

Originally Posted by Kane

jorel, your idea, putting unfilter before resizing was fantastic

Yes it is :!: :D
I'm updating the current script now :wink:

-kwag

jorel 05-20-2003 10:21 AM

Quote:

Originally Posted by kwag
Quote:

Originally Posted by Kane

jorel, your idea, putting unfilter before resizing was fantastic

Yes it is :!: :D
I'm updating the current script now :wink:

-kwag

Kwag,thanks!
:D
i was waiting your "bless".
:wink:

Kane :D
thanks for help and your precious time dear friend! :D :D
i was saved this page to read with atention your results
and compare with mine results, before i answer you.
just the same in proportional time,CQ and quality!
i did tests with 27 samples for more than a week, 8O
each sample with or without filters,
and all with unfilter or sharpen before resize!
the result was faster and clean.

thank you all friends,you are the best :!:

you all are
8)
:!:

Boulder 05-20-2003 10:25 AM

Quote:

Originally Posted by jorel
in near future i will try 2.5x...waiting for our friends here.
i think that Boulder and some more members are using 2.5x...
i wait for his recomendations.

I can recommend 2.5x. I've not had any problems with the latest CVS binary. I had a memory leak issue with some earlier build (don't remember which) but I'm not 100% sure if it wasn't some filter that was leaking.

With AVS2.5x you'll get to use the faster MPEG2Dec3.dll with built-in post-processing and as was said, the whole YV12 colorspace gives a speed boost.

And the fact that 2.0x will stay as it is and 2.5x will keep on developing, there's no need to stay on the 2.0x train anymore. I think sh0dan will agree with me on this one :wink:

Thinking about the days when Sharpen actually crashed the whole process more often than not..and that was not so long ago! :lol:

jorel 05-20-2003 10:33 AM

thanks Boulder,
you are very helpfull (like ever do).
:wink:

the new script can be used with 2.5x avisynth?

if don't, can you post what is need to change the script?

if is possible, i test it today, will be great! 8)

thanks.
:D

Boulder 05-20-2003 10:48 AM

Hmm..when considering Kwag's latest script which he just updated, STMedianFilter doesn't have the same parameters anymore. The GripFit functions don't work in AVS2.5x since it's not been compiled properly but you should be able to load the plugin with a special little plugin called LoadPluginEx. It allows you to load AVS2.0x plugins in AVS2.5x too. LegalClip can be replaced with Limiter (built-in in AVS2.5x).

So Kane's script would look something like this:

Code:

LoadPlugin("path\loadpluginex.dll")
LoadPlugin("path\gripfitfilter.dll")
Limiter()
UnFilter(50, 50)
GripCrop(528, 576)
GripSize(resizer="BicubicResize")
TemporalSmoother(1, 2)
MergeChroma(blur(1.58))
MergeLuma(blur(0.3))
GripBorders()
Limiter()

I'm not exactly sure if you'll be able to use TemporalSmoother. I know that the original MPEG2Dec was compiled to AVS2.5x but I really don't know if the filter works or not.

And the special offer for this week : Try UnDot by Tom Barry 8)

Remember to use the AVS2.5x versions of the plugins :idea:

EDIT: You'll have to get the LoadPluginEx.dll from the WarpSharp package. See the Doom9's Avisynth usage forum and the filters collection sticky there.


All times are GMT -5. The time now is 09:08 AM  —  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.