Log in

View Full Version : ApplyRange to a single frame ?


neily
16th September 2003, 00:21
Hi,

As far as I can tell, ApplyRange doesn't work on single frames, it has a minimum of 2. I don't mean to whinge, but I can't see any logical reason why it shouldn't. It seems to be an unneccessary limitation arising from it being based on Animate, where having a minimum of 2 frames makes sense.

I also wonder whether anyone has had the idea of with ApplyRange and Animate, including a Decomb-style ovr file, where single frames and ranges could be specified?

The reason I ask, though it is not really relevent, is that I want to process a number of camcorder captures, where for reasons that can't be completely eradicated, intermittently a field slips by a variable number of lines. I have written an external program that successfully detects the fields and enumerates the errant lines, and can then generate a script to correct the capture, but at the moment I am having to do a DuplicateFrame(F), ApplyRange(F,F+1,...),DeleteFrame(F+1) for each.

stickboy
16th September 2003, 05:18
I don't see why ApplyRange should have that limitation either.

You may wish to use my JDL_ApplyRange and JDL_ApplyFrame functions:
http://www.avisynth.org/~stickboy/

Reading frame numbers from an external file seems like a pretty good idea... Alternatively, it's not hard to write a simple program that takes such a file and generates the appropriate AviSynth script. (That is probably the easier and more general solution.) You could even use a text editor with good search-and-replace capabilities to do it.

neily
16th September 2003, 08:52
@ Stickboy

Thanks for the reply. I took a look at your functions. Some of them are quite interesting, and do certain things in probably a better way than I would have thought to do them myself.

JDL_ApplyRange and JDL_Apply frame do look pretty heavy-handed (too many generated clips) if I need to include 100 to 200 in a script, but I won't know till I try.

sh0dan
16th September 2003, 09:00
I made applyrange accept the same frame as start and end - and also made it consistent with audio handling. This will be in next version.