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. |
|
|
Thread Tools | Search this Thread | Display Modes |
11th December 2004, 00:39 | #1 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I'm so embarrased of asking this question...(applying a filter to a frame range)
I am currently trying to rip one of my DVDs and one scene in particular has more blocks and noise than the rest of the video. I'd like to apply a filter on a given frame range? Yeah, I should know this by now, but I never had to do this before, and I couldn't find anything about this in the Avisynth docs.
++ |
11th December 2004, 02:02 | #2 | Link |
Potentate
Join Date: Mar 2003
Posts: 219
|
pssst... ApplyRange
|
11th December 2004, 21:15 | #4 | Link |
Registered User
Join Date: Apr 2003
Location: Lancaster, CA
Posts: 89
|
Alternatively you could use this method, which is in Yatta.
Code:
PresetClip0=Preset0() PresetClip6=Preset6() PresetClip0.Trim(0,1252)+PresetClip6.Trim(1253,1502)+PresetClip0.Trim(1503,0) Code:
function Preset0(clip c) { #Name: Basic Filtering c SmoothMe() SharpenMe() return last } |
12th December 2004, 17:56 | #5 | Link |
Registered User
Join Date: Jun 2004
Location: Chicago
Posts: 19
|
Code:
#################################################################### # SceneAdjust by Corran Adapted from Scintilla's Tweakscene # # Usage: SceneAdjust(start,end,filters) # # # # To use filters that use strings like deen("a3d",1) # # you need to use triple quotes. # # e.g. SceneAdjust(30,80,filters="""deen("a3d",1).mftoon()""") # #################################################################### function sceneadjust(clip a, int "start", int "end", string "filters") { start = Default(start,0) end = Default(end,a.framecount) part1 = (start <= 1) ? a.Trim(0,-1) : a.trim(0,start-1) part3 = (end >= a.framecount-1) ? a.trim(0,-1) : a.trim(end+1,a.framecount) a=part1+Eval("a."+filters).trim(start,end)+part3 a = (start <= 1)? a.trim(1,a.framecount) : a (end >= a.framecount-1) ? a.trim(0,a.framecount-2):a } If you only have one function to apply then applyrange would be better and faster. I made this for ease of use and I don't really plan on updating it. |
12th December 2004, 21:18 | #6 | Link |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
Yes, using Trim in user-defined functions is dangerous if the frame numbers are variable.
The internal ApplyRange function has some limitations. My JDL_ApplyRange function basically does what Nicholi and Corran said but in a safe way and without start/end frame limitations. Last edited by stickboy; 12th December 2004 at 21:22. |
12th December 2004, 21:27 | #7 | Link | |
Registered User
Join Date: Jun 2004
Location: Chicago
Posts: 19
|
Quote:
|
|
|
|