Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th March 2002, 01:44   #1  |  Link
markrb
Old fart
 
markrb's Avatar
 
Join Date: Oct 2001
Posts: 3,589
Donald Graft's Xsharp filter help with syntax please

I am trying to test Donald Graft's Xsharp filter on DVD material and I am able to get it to load into Avisynth through Vdub using vdfilters.avs as a basis for syntax. I can only get it to work with no values input into it. The moment I try to add a value avisynth says there is an error and it was expecting other input. I have not been able to find any in depth explanation of the syntax expected.
This is what I have successfully used so far:
function VD_Xsharpen(clip clip, int "strength", int "threshold")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\xsharpen.vdf", "_VD_Xsharpen", 1)
return clip._VD_Xsharpen
}

If I try and add this line on the end it errors out

(default(strength,100), default(threshold,100),


I am new to avisynth files and syntax. I have tried to find as much as I can to read around, but I have not found much.

Thanks,
Mark
__________________
Oh no Mr. Bill!
markrb is offline   Reply With Quote
Old 15th March 2002, 02:00   #2  |  Link
ARDA
Registered User
 
Join Date: Nov 2001
Posts: 291
If you wrote this:

(default(strength,100), default(threshold,100),

you should write this:

(default(strength,100), default(threshold,100))

I hope that can help you

Arda
ARDA is offline   Reply With Quote
Old 15th March 2002, 02:11   #3  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Code:
function VD_Xsharpen(clip clip, int "threshold", int "strength") 
{ 
LoadVirtualdubPlugin("d:\virtualdub\plugins\xsharpen.vdf", "_VD_Xsharpen") 
return clip._VD_Xsharpen(default(threshold,255),default(strength,255)) 
} 

AVISource("sampledivx.avi")
ConvertToRGB()
VD_Xsharpen(10,128)

Last edited by Guest; 15th March 2002 at 02:13.
Guest is offline   Reply With Quote
Old 15th March 2002, 02:11   #4  |  Link
markrb
Old fart
 
markrb's Avatar
 
Join Date: Oct 2001
Posts: 3,589
You are my new hero. It worked perfect. Now on to figure out what settings to use. Fun, Fun.

Mark
__________________
Oh no Mr. Bill!
markrb is offline   Reply With Quote
Old 15th March 2002, 02:15   #5  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
No, not perfect!!!

The threshold parameter comes first. I know because I wrote the filter.
Guest is offline   Reply With Quote
Old 15th March 2002, 02:25   #6  |  Link
ARDA
Registered User
 
Join Date: Nov 2001
Posts: 291
@neuron2

Just two questions:

1 .If I read the values in virtualdub filters dialog the orden is

strength,threshold.Question: if you define in the script anohter order
is it the same?

2. According to you own advice in another thread about Dinamic Noise Reduction .Wouldn't it be better?

(threshold,strength)
without any default values?

Thanks Arda

pd:We were writing together still the second questions thanks

Last edited by ARDA; 15th March 2002 at 02:35.
ARDA is offline   Reply With Quote
Old 15th March 2002, 02:43   #7  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
@ARDA

1. The best way to determine the required parameter order is to look at the source code. But many people are not equipped to decipher it. An alternative is to set distinctive parameters through the dialog box and then do "Save processing settings" and inspect the resulting VCF file. Best yet is to let someone who knows write the import function for you.

2. Yes, sir, you are correct! I didn't like defaults because it lets you invoke a filter without the parentheses, which can be a performance problem due to a quirk in Avisynth. Why did I give them this time? I guess the poster wanted to know the correct syntax. I still don't like defaults. To get rid of them, just use:

return clip._VD_Xsharpen(threshold,strength)
Guest is offline   Reply With Quote
Old 15th March 2002, 13:10   #8  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
VDub filters in Avisynth

@neuron2

From time to time I see avs-syntax of VDub filters. Sometimes I save them. I would be nice if all those functions would be contained in a single file (just like the vdfilters.avs from LabDV) which is updated when necessary.
Wilbert is offline   Reply With Quote
Old 15th March 2002, 13:38   #9  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Sure it would be nice, but a lot of work, especially to track new filter versions from the many sources of filters! Wanna take it on?
Guest is offline   Reply With Quote
Old 15th March 2002, 15:47   #10  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
I will give it a try.
Wilbert is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.