digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Update of Current Filter Combinations... (http://www.digitalfaq.com/archives/avisynth/3061-avisynth-update-current.html)

kwag 03-29-2003 12:31 AM

Hi J-Wo,

Try mergechroma+mergeluma+spacedust+C3D+TemporalCleane r, but use Convolution3D(preset="movieLQ") :wink:
Something like this:
Code:

Mpeg2Source("Your_Movie.d2v")
LegalClip()
mergechroma(blur(1.58))
mergeluma(blur(0.05))
GripCrop(528, 480, overscan=2 )
GripSize(resizer="BicubicResize")
SpaceDust()
TemporalCleaner(ythresh=5, cthresh=10)
Convolution3D(preset="movieLQ")
GripBorders()
LegalClip()

Edit: BTW, that's my standard script now :wink:

-kwag

J-Wo 03-29-2003 09:56 AM

Quote:

Originally Posted by kwag
Hi J-Wo,

Try mergechroma+mergeluma+spacedust+C3D+TemporalCleane r, but use Convolution3D(preset="movieLQ") :wink:

Edit: BTW, that's my standard script now :wink:

Thanks that's great! I'll give it a try. One question tho, does that mean you'd use that script whether you have a clean DVD source or a noisy SVCD/divx source? Or should I change the movieLQ to movieHQ for a cleaner source? Thanks again Kwag!

kwag 03-29-2003 12:04 PM

Quote:

Originally Posted by J-Wo
One question tho, does that mean you'd use that script whether you have a clean DVD source or a noisy SVCD/divx source? Or should I change the movieLQ to movieHQ for a cleaner source? Thanks again Kwag!

Use HQ for DVD, LQ for the rest :wink:

-kwag

KingTuk 03-30-2003 11:08 AM

Quote:

Originally Posted by kwag
Hi J-Wo,

Try mergechroma+mergeluma+spacedust+C3D+TemporalCleane r, but use Convolution3D(preset="movieLQ") :wink:
Something like this:
Code:

Mpeg2Source("Your_Movie.d2v")
LegalClip()
mergechroma(blur(1.58))
mergeluma(blur(0.05))
GripCrop(528, 480, overscan=2 )
GripSize(resizer="BicubicResize")
SpaceDust()
TemporalCleaner(ythresh=5, cthresh=10)
Convolution3D(preset="movieLQ")
GripBorders()
LegalClip()

-kwag

instead of Convolution3D(preset="movieLQ")

try STMedianFilter(8,15,4,7,8,15)

faster and a little smaller in size...

and quite a few people over at Doom9 go back and forth between STMedian and C3d...

http://www.trbarry.com/STMedianFilter.zip

kwag 03-30-2003 11:25 AM

Hi KingTut,

Check this thread: http://www.kvcd.net/forum/viewtopic....er=asc&start=0

I'm not sure if STMedianFilter can do better than the last script I posted there :roll:
Also, it's only for AviSynth 2.5 :!:

-kwag

KingTuk 03-30-2003 01:01 PM

Kwag,

Yeah I've read that thread...
it's comparing a Spatio-Temporal Smoother (C3D) to a Spatial Smoother (Smoother HiQ)

but this is a Little faster than C3D and A little smaller... Need someone with HDTV to confirm the quality... both of these filters are Spatio-Temporal Smoothers (C3D & STMedian)

If you download the ZIP file you will see an Avisynth 2.0 version as well as an Avisynth 2.5

http://www.trbarry.com/STMedianFilter.zip

use these settings...

STMedianFilter(8,15,4,7,8,15)

kwag 03-30-2003 01:50 PM

Re-testing right now with STMedianFilter ... 8)

-kwag

kwag 03-30-2003 02:19 PM

Once again, C3D wins ( by a very small amount, but it does )

http://www.digitalfaq.com/archives/i.../2003/03/3.png

Look at the vertical line (plastic division) on the TV. On the top picture, you can't see the division on the top of the TV set. On the bottom, it's still visible :!:
The file size is indeed smaller with STMedianFilter(8,15,4,7,8,15), ~200KB, because it's removind high frequency components from the material.
This was the script used for the above sample:

Code:

LegalClip()
mergechroma(blur(1.58))
mergeluma(blur(0.05))
GripCrop(528, 480, overscan=2,  source_anamorphic=false )
GripSize(resizer="BicubicResize")
SpaceDust()
TemporalSmoother(radius=2, strength=3)
TemporalCleaner(ythresh=5, cthresh=10)
STMedianFilter(8,15,4,7,8,15)
GripBorders()
LegalClip()

Use PicSwitch, and as muaddib said earlier, it's a big difference. Mind you, on a regular TV, these small details can't be seen at all :!:, but anyone with an HDTV will clearly see the difference. If you can see it on the computer monitor, you can see it on a HDTV :wink:

-kwag

KingTuk 03-30-2003 02:29 PM

Kwag,

so it seems that...

STMedianFilter(8,15,4,7,8,15) is equal to Convolution3D(preset="movieLQ") which blurs the grill on the T.V. :cry:

so could you lower the settings so STMedianFilter could be equal to Convolution3D(preset="movieHQ") :?:

maybe something like...

STMedianFilter(4,15,4,7,4,15) since according the the readme the two settings I changed affect "Large values may cause loss of fine line detail and disappearing vertical fine lines."

kwag 03-30-2003 02:37 PM

Quote:

Originally Posted by KingTuk
Kwag,

so it seems that...

STMedianFilter(8,15,4,7,8,15) is equal to Convolution3D(preset="movieLQ") which blurs the grill on the T.V. :cry:

Not exactly :!: I tried LQ and the details are well preserved, much more than STM.

-kwag

Jellygoose 03-30-2003 03:19 PM

Hi kwag!

don't you think this is really weird?? why should such a heavy filtering and smoothing
Code:

SpaceDust()
TemporalSmoother(radius=2, strength=3)
TemporalCleaner(ythresh=5, cthresh=10)
Convolution3d(preset="movieLQ"

be able to lower the filesize that much and still preserve that much detail? those values are all above standard for clean DVD sources. I don't have an HDTV, so you can tell best I think, but I just find it hard to believe. I'll try that script again though.

Jellygoose 03-30-2003 03:42 PM

Hi kwag!

could you do another comparison for me please? take my script from here: http://www.kvcd.net/forum/viewtopic.php?t=3410&start=15
(at the very bottom)
and compare that one with your script :
Code:

SpaceDust()
TemporalSmoother(radius=2, strength=3)
TemporalCleaner(ythresh=5, cthresh=10)
Convolution3d(preset="movieLQ")

on that same movie (the grill) :wink: and take those snapshots! you would do me a big favor, since I really can't see a difference on the samples I try with these 2 scripts.
[/quote]

kwag 04-01-2003 08:15 PM

Well, after doing several encodes, I was very sad with the results :roll:
Both filters TemporalSmoother(radius=2, strength=3) and TemporalCleaner(ythresh=5, cthresh=10) really mess up the image on movement :!: You can see "streaks" and "ghosts" across moving images. This doesn't show on static images. So I have been working on something, and I think that I have something really nice :).

Look at this script:

Code:

LegalClip()
GripCrop(528, 480, overscan=2,  source_anamorphic=false )
GripSize(resizer="BicubicResize")
SpaceDust()
sharpen(1.0)
mergechroma(blur(1.58))
mergeluma(blur(1.58))
GripBorders()
LetterBox(16, 16, 16, 16)
LegalClip()

Don't panic :!: :lol:, I'll explain how and why it works. First we sweep the dust "SpaceDust()" :wink:, then we apply sharpen to the max value. This will over enhance details, and also artifacts. Now we apply the merge functions, also with max values, which will then soften the image. Still, the final mpeg will be sharper than with the old script, but the thing is that there are hardly any visible artifacts left compared to a script with smoothers 8O. File size is slightly larger that with the old script, but even after lowering the CQ to match file size, the result is far FAR better :D I guess what we see here is a psychovisual effect, after removal of components with the "merge" functions. The flesh tones are far more natural than when applying temporal and/or spatial filtering.
Give it a try :!:

Here's a sample encoded with the old script: http://www.kvcd.net/sam1.mpg
Now look at the same sample encoded with the script above: http://www.kvcd.net/sam2.mpg
Look carefully when De Niro starts to go up the stairs. Notice how the image gets messed up with the smoothers. Compare that to sam2.mpg, where there's no "streaking" at all on image movement.

Edit: Forgot to mention that the encode speed with this script was 3:37 agains ~5 minutes with the old script :mrgreen:

Note: You may lower the value of mergeluma to 1.0. This will increase the sharpness, with a slight increase of file size. But it's worth it :mrgreen:

-kwag

kwag 04-01-2003 09:00 PM

Here's a 20 second sample with the above script ( only changed mergeluma to 1.0 ) using CQ=70 for fitting this movie on one CD.

http://www.kvcd.net/test-s1m0ne.mpg

Note: Wanted file size for sample was 11,944MB, and I got 12,712. So CQ will be a tad lower, but shouldn't make any visual difference from the above sample :wink:

-kwag

Kane 04-02-2003 07:07 AM

Quote:

Originally Posted by kwag
Both filters TemporalSmoother(radius=2, strength=3) and TemporalCleaner(ythresh=5, cthresh=10) really mess up the image on movement :!: You can see "streaks" and "ghosts" across moving images.

yeah, that´s exxactly what i was meant to say in my "optimal script posting". Nerver worked with "sharpen", so i´ll give it a try

btw: kwag, which cpu do you use in your computer? my encoding-duration is nearly twice as big as yours

kwag 04-02-2003 09:14 AM

Quote:

Originally Posted by Kane

btw: kwag, which cpu do you use in your computer? my encoding-duration is nearly twice as big as yours

Pentium 4 @1.6Ghz with 512MB ram.

-kwag

Kane 04-02-2003 09:18 AM

Quote:

Originally Posted by kwag
Quote:

Originally Posted by Kane

btw: kwag, which cpu do you use in your computer? my encoding-duration is nearly twice as big as yours

Pentium 4 @1.6Ghz with 512MB ram.

-kwag

ok the same cpu clock as mine.
i need more RAM, i guess

Jellygoose 04-02-2003 04:16 PM

Hi kwag!

8O This approach to get rid of the ghosting and ugly artifacts is brilliant :!:
however, have you tried the method with sharpen(1.0) and the high mergeluma and mergechroma settings WITHOUT dropping the other smoothers, but just decrease their values just a little? SpaceDust() is a spatial smoother, I think, and not a too light one. why not add another Temporal Smoother before that. I LOVED your script, it did indeed look far more natural! it remembered me a lot of great DivX encodes, with no more artifacts around objects! fantastic! :lol:
I experimented with this script, and I copied your brilliant idea. This actually comes very close to the old compression, but lets the picture look far more natural as I think. The ghosting was a lot less visible I think...
Please see if you can confirm this. Try this script. and as you said, don't panic! :wink:

Code:

LoadPlugin("E:\MPEG-Tools\FitCD\MPEG2DEC.dll")
LoadPlugin("E:\MPEG-Tools\FitCD\dustv5.dll")
LoadPlugin("E:\MPEG-Tools\FitCD\legalclip.dll")
LoadPlugin("E:\MPEG-Tools\FitCD\sampler.dll")
LoadPlugin("E:\MPEG-Tools\FitCD\convolution3d.dll")
LoadPlugin("E:\MPEG-Tools\FitCD\gripfit_preview.dll")
LoadPlugin("E:\MPEG-Tools\FitCD\temporalcleanerold.dll")
LoadPlugin("E:\MPEG-Tools\FitCD\dctfilter_YUY2.dll")
LoadPlugin("E:\MPEG-Tools\FitCD\STMedianFilter.dll")

Mpeg2Source("C:\Insomnia\insomnia.d2v")

LegalClip()

GripCrop (704, 576, Overscan=0)

Gripsize()

TemporalSmoother(radius=2, strength=2)
SpaceDust()
TemporalCleaner(ythresh=5, cthresh=10)
STMedianFilter(6,15,4,7,6,15)

sharpen(1.0)

mergechroma(blur(1.58))
mergeluma(blur(1.5))

GripBorders()
Letterbox(0,0,24,24)

DctFilter(1,1,1,1,1,.5,.5,0)

LegalClip()

Sampler(length=20, samples=25)

ConvertToRGB24

If you wanna use KVCDx3 resolution, lower the value of mergeluma a little. like you said to 1.0 for example. I can't see that the temporal smoothed image looks worse than the script without them. this is so exciting man!

kwag 04-02-2003 04:41 PM

Hi Jellygoose,

I guess you missed this thread :D: http://www.kvcd.net/forum/viewtopic.php?t=3463

-kwag

Jellygoose 04-02-2003 05:00 PM

Gosh kwag, you're always faster! :lol:
ROFL
To write this has taken so long... :wink:
I'll try that new script with the new settings!


All times are GMT -5. The time now is 03:55 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.