I got a LD-rip on my HD. it's 5 VOB's big, 1 movie.
The quality of the scenes vary. And I would very much like to apply different filters (sets)
to just different isolated parts of the movie
(ie. correct only the snow-scene wich is too dark,
but not let the bright-filters affect the next scenes etc.)
Is this possible within 1 Avisynth script?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 16 of 16
Thread
-
-
Hi-
Is this possible within 1 Avisynth script?
Yes, by using either the ApplyRange or the Trim Filters:
http://www.avisynth.org.ru/docs/english/corefilters/animate.htm
http://www.avisynth.org.ru/docs/english/
I find the Trim filter easier to use, as you don't have to list out all the arguments, as you do with ApplyRange:
A=Trim(0,1000).Tweak(Sat=0)#greyscale the first 1001 frames
B=Trim(1001,2000)#Nothing happens
C=Trim(2001,3000).Sharpen(0.7)#add some sharpening between frames 2002 and 3001
D=Trim(3001,0).Tweak(Cont=1.5)#increase the contrast from frame 3002 to the end of the video
A+B+C+D -
Where it gets fun is applying filters selectively within a frame defined by a soft mask or alpha. A typical example is using chroma key derived alpha to mask a filter effect only to that object in the scene.
-
@manono: Wow. Dunno what to say.
I'm getting right at it (after a goodnights sleep )
@edDV I thought doing filtering on parts of a frame would have to be
done through photoshop and batch-processing (paaain!)
anyway. thanks. I'll probably have some mor questins later on.
[edit: I have a question right now]
@manono:
do you have to describe things like de-interlacing/crop/resize
over and over again for each part of the video in such a script? -
Originally Posted by 20/20
If you're applying the same functions to every segment, you can either put them in a variable definition (like "clip", below), or apply them all at the end after joining the segments.
(This is a script to remove a logo which appears between frames 154 and 9283, and resize to 720x576.)
loadplugin("P:\AviSynth 2.5\Old\LoadPluginEx.dll")
loadplugin("P:\AviSynth 2.5\Old\logotools.dll")
logo=ImageSource("logo109.png").ConverttoYUY2()
clip=AVISource("tw-109.avi",false).ConverttoYUY2()
clip1=clip.Trim (1,153)
clip2x=clip.Trim (154,9283)
clip2=NoLogoAuto(clip2x,logo,1)
clip3=clip.Trim (9284,0)
clip1 ++ clip2 ++ clip3
ConvertToYV12()
LanczosResize(720,576,0,0,640,352) -
do you have to describe things like de-interlacing/crop/resize
over and over again for each part of the video in such a script?
As AlanHK shows, filtering can be made to apply to both the entire video, or to only parts of it. Another (although perhaps not as elegant) way is like this:
LeakKernelDeint(Order=1)#deinterlace the whole thing
A=Trim(0,1000).Tweak(Sat=0)
B=Trim(1001,2000)
C=Trim(2001,3000).Sharpen(0.7)
D=Trim(3001,0).Tweak(Cont=1.5)
A+B+C+D
Crop(8,0,-8,0).LanczosResize(512,384)#crop and resize the whole thing -
Originally Posted by 20/20
-
Originally Posted by manono
Can I apply things like crop, resize, degrainmedian (for th whole video) at the very beginning.
like this?
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MSharpen.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dll")
DGDecode_mpeg2source("F:\SW6\VIDEO_TS\VTS_01_PGC_0 1_1.d2v")
Crop( 8, 54, -8, -50)
Lanczos4Resize(656,304) # Lanczo4 (Sharp)
DeGrainMedian(limitY=5,limitUV=3,mode=5)
A=Trim(0,1000).blabla.another
B=Trim(1001,2000).functionbla.another
C=Trim(2001,3000).functionbla.another.
D=Trim(3001,0).function.function.function
A+B+C+D
? -
Can I apply things like crop, resize, degrainmedian (for th whole video) at the very beginning.
like this?
I thought I answered that question in my previous post by showing how you can filter the entire thing (using a deinterlace as an example) before doing the filtering on different parts. The answer is yes. -
Originally Posted by 20/20
But you should consider the order of operations. For instance, I would resize at the end, after doing any cleanup filters like degrain, as otherwise the scaling will probably make any defects worse. -
Hi, quick suggestion -
using stickboy's JDL_ApplyRange lets you use named parameters, very handy if a filter has a dozen parameters. I think the aviSynth internal ApplyRange forces you to list all the existing parameters for the filter.
But it seems like JDL_ApplyRange won't let you use string variables with named parameters. If anybody knows how to do that, I hope they post a solution.
you can get this filter, along with some other handy utilities at
http://avisynth.org/stickboy/grannyGeek ~~
Antique Newbie -
Thank you, all of you 8)
I find doing it the 'trim' way very easy to do.
though i'm now having trouble with smeary/smudgy video when movement occurs.
Dunno if it's because of the convolution3d, fft3dfilter or warpsharp.
btw. doing it with (i guess) (recuriing) functions you define yourself within a script,
is somthing I do not understand how to yet.
It looks pretty comlicated, though I get the general idea. -
Thanks everyone for all that
A=Trim(0,800).SomeRandomFilter()
B=Trim(801,1500).AnotherRandomFilter()
A+B
. . stuff. Was always wondering how to do apply different filters to different parts of the video
EDIT: Just realised that I was overlapping frame 800 -
though i'm now having trouble with smeary/smudgy video when movement occurs.
If these are from laserdisc, and if these are movies, then they should probably be IVTC'd. Have you had a look before applying the filters to see if you get the same thing? -
Sorry, but I only now noticed you're from a PAL country. No IVTC. Then that kind of appearance can be gotten from strong temporal filtering, such as from some of the stronger settings of convolution3d. Maybe even a strong spatial filter like Warpsharp. I don't use fft3dfilter so I'm not sure what kind of artifacts it might produce. I'd vote for convolution3d, especially if you're using one of those low-quality presets. You can remove one at a time from the script and probably figure out which one is causing it.
Similar Threads
-
Apply a video clip to a still image
By komal_here in forum EditingReplies: 4Last Post: 21st Feb 2012, 01:35 -
how do i apply subtitles to a video in different colors?
By snafubaby in forum Newbie / General discussionsReplies: 2Last Post: 9th Aug 2011, 03:55 -
How to apply filters to video?
By kaona in forum Newbie / General discussionsReplies: 0Last Post: 13th Apr 2011, 13:59 -
How to apply filters in VirtualDub to only *parts* of the video?
By maskingtape in forum Newbie / General discussionsReplies: 2Last Post: 2nd Aug 2010, 02:19 -
How do I apply avisynth filters in zone/segments?
By poisondeathray in forum Newbie / General discussionsReplies: 2Last Post: 12th Aug 2008, 21:11