digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: help with writing new script? (http://www.digitalfaq.com/archives/avisynth/14281-avisynth-writing-script.html)

audioslave 06-04-2006 03:19 PM

Avisynth: help with writing new script?
 
Hi guys.
I'm planning on making a backup of "The Last Samurai". So far the only thing I got for a script is this:

Quote:

dgdecode_mpeg2source("D:\Hea\Video\DVD\Temp\Temp.d 2v")
Lanczos4Resize(720,416,0,80,720,416)
Addborders(0,80,0,80)
From using PARanoia. ;)

What I want to do is use LRemoveDust and LimitedSharpen (or maybe LimitedSharpenFast?) but I have no clue to what filter packages I need or how the script should look. :(
If someone would help me out with this I would be very grateful!
I don't know where to download the functions either... In other words, I need to get help with the whole shebang. :D

audioslave 06-04-2006 04:26 PM

Okay, so I found the LimitedSharpen.avsi, copied it to plugins directory together with mt_masktool.dll and the RemoveGrain 0.9 package. When I try to load my script in VDub it says:

Script error: There is no function named "DEdgeMask". What am I missing?

Here's my script:
Quote:

import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpen.avsi")
dgdecode_mpeg2source("D:\Hea\Video\DVD\Temp\Temp.d 2v")
Lanczos4Resize(720,416,0,80,720,416)

#LRemovedust(4,1) # my favorite one, do use 4,x for the limit, bigger means more denoising but less details
LimitedSharpen( ss_x=1, ss_y=1,
\ Smode=1, strength=150, radius=2,
\ Lmode=1, wide=false, overshoot=3,
\ soft=false, edgemode=0, special=true,
\ exborder=0 )

Addborders(0,80,0,80)


audioslave 06-04-2006 05:31 PM

I found a later version (final?) of LimitedSharpen and with this I get an error message saying:

The named argument "soft" to LimitedSharpen had the wrong type"

What does this mean?
I'm using the exact same script as seen above.

audioslave 06-04-2006 06:25 PM

Hmm, I'm starting to think I'm the only one left here on this forum... :roll:
Anyways, I changed the "soft" parameter to -1 (=automatic) and now I get a new error message:

Script error: There is no function named "unsharpmask".

Any ideas?

audioslave 06-04-2006 07:26 PM

It's me again! :lol:

I changed the LimitedSharpen for LimitedSharpenFast and got it to work! :)
Now I need to get LRemoveDust to work. For starters, where can I download it?

BTW The script I'm using now:
Quote:

loadplugin("C:\Program Files\AviSynth 2.5\plugins\LimitedSupport_09Jan06B.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avs")

Mpeg2Source("D:\Hea\Video\DVD\Temp\Temp.d2v",cpu=4 )

#Repair(last,last.blur(1),1,1,1)

#LRemovedust(4,1) # my favorite one, do use 4,x for the limit, bigger means more denoising but less details
LimitedSharpenFaster()

Lanczos4Resize(704,416,5,78,710,420)
Addborders(0,80,0,80)

audioslave 06-05-2006 01:19 PM

Doesn't anyone know this? :?

sparskter 06-05-2006 01:42 PM

See LREMOVEDUST on my post here: http://www.kvcd.net/forum/viewtopic....hlight=#124227

Dialhot 06-05-2006 03:25 PM

Where is the post i did 5 hours ago ? 8O :cry: :cry:

I was mentioning that the function can be found also there :
http://www.kvcd.net/forum/viewtopic.php?t=16636

audioslave 06-05-2006 03:35 PM

Thank you (both)! :D
BTW Can I use LimitedSharpenFaster to resize the video instead of the Lanczos4Resize in my script? If so, how would it look in my script?

This is my current script:
Quote:

loadplugin("C:\Program Files\AviSynth 2.5\plugins\LimitedSupport_09Jan06B.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
import("C:\Program Files\AviSynth 2.5\plugins\LRemoveDust.avs")
import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avs")

Mpeg2Source("D:\Hea\Video\DVD\Temp\Temp.d2v",cpu=4 )

#LRemovedust(4,1) # my favorite one, do use 4,x for the limit, bigger means more denoising but less details
LRemoveDust_YV12(17,2)
LimitedSharpenFaster()

Lanczos4Resize(704,416,5,78,710,420)
Addborders(0,80,0,80)
EDIT:
What's the better choice- to encode a movie to 4:3 or 16:9 output?

Dialhot 06-05-2006 05:20 PM

Quote:

Originally Posted by audioslave
BTW Can I use LimitedSharpenFaster to resize the video instead of the Lanczos4Resize in my script? If so, how would it look in my script?

Never tried but :
Code:

LRemoveDust_YV12(17,2)
Crop(5,78,710,420)
LimitedSharpenFaster(dest_x=704,dest_y=716)
Addborders(0,80,0,80)

Quote:

EDIT:
What's the better choice- to encode a movie to 4:3 or 16:9 output?
Use 16:9 unless you are sure you will never use a 16:9 capable display in the future (and today ALL displays are 16:9), or if you are short in bitrate.

audioslave 06-05-2006 05:28 PM

Quote:

Originally Posted by Dialhot
Quote:

Originally Posted by audioslave
BTW Can I use LimitedSharpenFaster to resize the video instead of the Lanczos4Resize in my script? If so, how would it look in my script?

Never tried but :
Code:

LRemoveDust_YV12(17,2)
Crop(5,78,710,420)
LimitedSharpenFaster(dest_x=704,dest_y=716)
Addborders(0,80,0,80)

Quote:

EDIT:
What's the better choice- to encode a movie to 4:3 or 16:9 output?
Use 16:9 unless you are sure you will never use a 16:9 capable display in the future (and today ALL displays are 16:9), or if you are short in bitrate.

Thanks again Dialhot! :)

Although I had to change the Crop values to even numbers (I changed the 5 to 6) it worked.

Okay, 16:9 it is. ;)

audioslave 06-05-2006 05:30 PM

The script look much cleaner now thanks to your help. :D

Quote:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\LimitedSupport_09Jan06B.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\LRemoveDust.avs")
Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avs")

Mpeg2Source("D:\Hea\Video\DVD\Temp\Temp.d2v",cpu=4 )

LRemoveDust_YV12(17,2)
Crop(6,78,710,420)
LimitedSharpenFaster(dest_x=704,dest_y=416)
Addborders(0,80,0,80)

### LanczosResize(704,416,5,78,710,420) ### For reference
### Addborders(0,80,0,80) ###
EDIT:
Do you recommed using "cpu=4" when encoding a DVD with very good quality, like this one (The Last Samurai)?

audioslave 06-05-2006 06:44 PM

OKay, now I've implemented Soothe() in my script. The vertical lines certainly looks better with it. :)

Code:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\LimitedSupport_09Jan06B.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\LRemoveDust.avsi")
Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFasterL4.avsi")
Import("C:\Program Files\AviSynth 2.5\plugins\Soothe.avsi")

Mpeg2Source("D:\Hea\Video\DVD\Temp\Temp.d2v")
LRemoveDust_YV12(17,2)
Crop(6,78,710,420)
dull  = last.Lanczos4Resize(704,416)
sharp = dull.LimitedSharpenFaster(dest_x=704,dest_y=416)
Soothe(sharp,dull,20)
Addborders(0,80,0,80)

Oh, I almost forgot... In LimitedSharpenFaster I changed all resizers from Lanczos to Laczos4 since you lose some sharpness when using Soothe(). ;)

Dialhot 06-06-2006 06:50 AM

I use to let cpu=4 for a everything and use cpu=6 when I want more compressibility. For me this setting has nothing to do with "clean or not clean" source. As long as the source is average-to-fully compressed MPEG2, as DVD are, deblocking is needed IMHO.

audioslave 06-06-2006 05:37 PM

Thanks again Dialhot. :)

Okay, that was step one. Now on to step 2.
(I'm not sure this is the correct part of the forum for this...)
I was planning on using HC to encode this movie. I also want to be able to choose subtitles. Is there an easy way of doing this?

Dialhot 06-07-2006 03:29 AM

Quote:

Originally Posted by audioslave
Thanks again Dialhot. :)

Okay, that was step one. Now on to step 2.
(I'm not sure this is the correct part of the forum for this...)
I was planning on using HC to encode this movie. I also want to be able to choose subtitles. Is there an easy way of doing this?

DVD_Rebuilder Pro (if you want to use 1-pass mode) or free (that handles only 2-pass mode for HC).

That's the easier to do DVD->DVD backup but it does not allow to put several movie on a disc, and in the free version you can choose to remove the menu or the bonus (but you can blank them out before to use DVD-RB with vobblanker for instance).

audioslave 06-07-2006 11:57 AM

I'll look into DVD-ReBuilder.

BTW I tried to backup a movie the other day, Lord of War, and it had a wierd protection. DVD Decryter said something about a structure problem? What's that and is there a way around that kind of protection?
Is DVD Decrypter still the recommended DVD ripper?

Dialhot 06-07-2006 12:06 PM

Quote:

Originally Posted by audioslave
Is DVD Decrypter still the recommended DVD ripper?

Yes it is, but when it fails (on a new protection) then try DVDFab or you can try to go into the more complicated process known as '"PSL2 files".
http://www.kvcd.net/forum/viewtopic....=dvdfab#123365

audioslave 06-07-2006 04:02 PM

Can/shall I copy the whole script into the filter editor in DVD-RB?

EDIT: Where in DVD-RB do I set the path to HCEnc? And should I use the HCenc_018.exe or HCgui_018.exe version?

EDIT2: Found out about HCEnc... ;) Still need to know about the script though.

Dialhot 06-07-2006 04:52 PM

Quote:

Originally Posted by audioslave
Can/shall I copy the whole script into the filter editor in DVD-RB?

You put everything except the mpeg2source line.
And DO NOT perform any resize. DVD-RB can't handle other thing than 720*576(480), that is the original DVD-size.
I suggest you to add a "addborder(16,16,16,16) as last line to reduce the picture area (only if you watch the DVD on a TV, not on a plasma screen on LCD display).

Quote:

EDIT: Where in DVD-RB do I set the path to HCEnc? And should I use the HCenc_018.exe or HCgui_018.exe version?
In the setup ;). use HCenc of course.

Note: forget the 1-pass mode, DVD-RB do not handle custom matrix in such modes, whatever the encoder you use. Use the regular 2-pass mode.


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