digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Sharpening Parameters of LimitedSharpenFaster() (http://www.digitalfaq.com/archives/avisynth/14276-avisynth-sharpening-parameters.html)

Blubear 05-28-2006 02:28 PM

Sharpening Parameters of LimitedSharpenFaster()
 
Hi,

I am currently resizing my DV captures from holidays last year and have been using this script which has been pretty good:

LoadPlugin("C:\Program Files\Avisynth 2.5\Plugins\MT_MaskTools.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\Plugins\MaskTools.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\Decoders\MPEG2Dec3.dll")
mpeg2source("C:\Shamoo1.d2v",cpu=4,idct=7)
SeparateFields()
ConvertToYV12()
LRemoveDust_YV12(17,1)
LimitedSharpenFaster()
LanczosResize(720,224,10,35,700,218).Weave()
AddBorders(0,64,0,64)
#Trim(0,11920).FadeOut(150)

I would like however to sharpen a bit more without becoming overly sharpened. Could any member possibly suggest parameters for LimitedSharpenFaster(?) or any other suggestions. The captures were from a JVC GR-D21EK MiniDV camera. Secondly as the camera captures in full screen mode I noticed when capturing to disk that the foorage had small horizontal lines eminating from people on occasion in the footage, something like once every four of five frames. This seems to have smoothed out periodly but is still there occasionally. What are these lines from?
DVD2AVI states the footage is PAL 25fps Interlaced material.
Thanks.
Blubear :roll:

Dialhot 05-28-2006 05:10 PM

1/Remove the "cpu=4" parameter of the Mpeg2Source line. DV codec is not as comrpessed as DVD and you can avoid the deblocking.

2/ reverse the order of the lines : Lanczos then LSharpen then LRemoveDust.

3/ why do you resize to 720 ? Use 704 it's enought and better.

Boulder 05-29-2006 05:14 AM

I think his camera burns the video directly on a mini-DVD as he uses MPEG2Source, so the deblocking is probably a good thing to use.

He's also destroying the source by separating the fields, then filtering and resizing and weaving the fields back. It'll look like crap that way.

Dialhot 05-29-2006 05:35 AM

Quote:

Originally Posted by Boulder
I think his camera burns the video directly on a mini-DVD as he uses MPEG2Source, so the deblocking is probably a good thing to use.

You're probably right :oops:

Blubear 05-29-2006 03:24 PM

Thanks all,
Guess i must have been doing something wrong, so for instance what should my script look like please?
Thanks,
Blubear.

Blubear 05-29-2006 03:31 PM

Hi,
Oh yeah sorry Guys forgot to mention my camera captures to DV Tape and has no option to burn directly to DVD. Its one of those palm sized Mini DV camera's. Hope you guys can help.
Thank you.
Blubear :(

Dialhot 05-29-2006 03:36 PM

Code:

LoadPlugin("C:\Program Files\Avisynth 2.5\Decoders\MPEG2Dec3.dll")
mpeg2source("C:\Shamoo1.d2v",cpu=4,idct=7)
ConvertToYV12() -> normally not needed if your source is mpeg2 !
FieldDeinterlace() -> or perhaps an other deinterlacer, Boulder will tell you
LanczosResize(...)
LimitedSharpenFaster()
LRemoveDust_YV12(17,1)
AddBorders(...)

I didn't know manage to find the original size of your source so I can't tell you what to use for resizing.

Boulder 05-29-2006 11:09 PM

First of all, why do you use MPEG2Source for loading the source? You should get an AVI file out of the camera if it uses DV tapes. This AVI file should be loaded with AVISource.

Download and install this : http://neuron2.net/misc/cedocida016.zip . It's installed by extracting the files to a temporary directory, then right-clicking on the .inf file and choosing "Install".

Set it up so that the decoder YV12 chroma sampling is "MPEG2 interlaced". You can find the settings at Device manager->Sound, video and game controllers->Video codecs->Properties->Cedocida DV codec (doubleclick)->Settings. Also make sure that the decoder is forced to output YV12.

Now try this script (you need the original AVI file from the camera):
Code:

AVISource("path\clip.avi")
AssumeBFF()
TDeint(mode=1)
# resize here
LRemoveDust_YV12(17,1)
LimitedSharpenFaster()
# or resize here, any way you like it
AssumeBFF()
SeparateFields()
SelectEvery(4,1,2)
Weave()
# add the borders here

You need tritical's TDeint plugin : http://bengal.missouri.edu/~kes25c/

If you want more speed sacrificing quality a bit, you can use LeakKernelBob(order=0,sharp=true,threshold=4) instead of TDeint. Then you'll need LeakKernelDeint.dll.

Depending on your encoder, you possibly need to convert the colorspace in the script. The conversion line must be placed right before the second AssumeBFF statement.

Encode as interlaced, top field first.

Dialhot 05-30-2006 03:00 AM

Quote:

Originally Posted by Boulder
SelectEvery(4,1,2)
Weave()

Aren't these values for NTSC ? I assumed blubear's source are PAL interlaced.

Boulder 05-30-2006 03:04 AM

Nope,

AssumeBFF().SeparateFields().SelectEvery(4,1,2).We ave() simply changes the field order to TFF. If you used SelectEvery(4,0,3), the field order would remain BFF. I chose TFF since many encoders seem to expect that by default.

gamma 05-30-2006 07:25 AM

8O i always thought first clean video and then sharpen? Otherwise you'll be sharping the noise. In the documentation of limitedsharpen it is also adviced to use denoiser first.

Dialhot 05-30-2006 07:29 AM

Quote:

Originally Posted by gamma
8O i always thought first clean video and then sharpen? Otherwise you'll be sharping the noise. In the documentation of limitedsharpen it is also adviced to use denoiser first.

I did so. But try... and tell me ;)
http://www.kvcd.net/forum/viewtopic....sharpen#123943

Boulder 05-30-2006 07:56 AM

I've noticed that it depends on the source. Some look better when denoising first, some better when sharpening first. I still think that the denoising artifacts are one deciding factor, especially the ones that come from too strong temporal denoising.

Dialhot 05-31-2006 11:23 AM

I've splitted the thread at the begining of the "interlacing" discussion. See there :
http://www.kvcd.net/forum/viewtopic.php?t=16652


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