Quantcast Avisynth: Sharpening Parameters of Limitedsharpenfaster() - digitalFAQ.com Forums [Archives]
  #1  
05-28-2006, 02:28 PM
Blubear Blubear is offline
Free Member
 
Join Date: Mar 2004
Location: Sussex / England
Posts: 175
Thanks: 0
Thanked 0 Times in 0 Posts
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,21.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
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
  #2  
05-28-2006, 05:10 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #3  
05-29-2006, 05:14 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #4  
05-29-2006, 05:35 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #5  
05-29-2006, 03:24 PM
Blubear Blubear is offline
Free Member
 
Join Date: Mar 2004
Location: Sussex / England
Posts: 175
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks all,
Guess i must have been doing something wrong, so for instance what should my script look like please?
Thanks,
Blubear.
Reply With Quote
  #6  
05-29-2006, 03:31 PM
Blubear Blubear is offline
Free Member
 
Join Date: Mar 2004
Location: Sussex / England
Posts: 175
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #7  
05-29-2006, 03:36 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #8  
05-29-2006, 11:09 PM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #9  
05-30-2006, 03:00 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boulder
SelectEvery(4,1,2)
Weave()
Aren't these values for NTSC ? I assumed blubear's source are PAL interlaced.
Reply With Quote
  #10  
05-30-2006, 03:04 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #11  
05-30-2006, 07:25 AM
gamma gamma is offline
Free Member
 
Join Date: Nov 2003
Location: Rotterdam (The Netherlands)
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #12  
05-30-2006, 07:29 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by gamma
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
Reply With Quote
  #13  
05-30-2006, 07:56 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #14  
05-31-2006, 11:23 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
I've splitted the thread at the begining of the "interlacing" discussion. See there :
http://www.kvcd.net/forum/viewtopic.php?t=16652
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Sharpening filters? supermule Avisynth Scripting 15 12-02-2006 07:32 AM
Avisynth: Need parameters for my script! Mecha Avisynth Scripting 11 10-12-2004 05:09 PM
Avisynth: Sharpening without making blocks noticeable? muhali3 Avisynth Scripting 5 09-25-2003 06:35 PM
Avisynth: best Sharpening method? J-Wo Avisynth Scripting 1 08-23-2003 12:06 PM
Avisynth: LetterBox parameters? jorel Avisynth Scripting 13 08-01-2003 12:25 PM

Thread Tools



 
All times are GMT -5. The time now is 10:11 AM  —  vBulletin © Jelsoft Enterprises Ltd