Log in

View Full Version : What plugin/function I have to use to select only a part of the video...


hkl8324
10th July 2006, 17:29
to do frameserving?

If I only want to encode frame 4-2000 of a video, who can I do that?

(Sorry if if is asked many times, but I just dont know what keyword should I enter in the "search box"...:p )

Daodan
10th July 2006, 17:34
Strange as there was a thread like that almost under it... basically you use trim. So trim (4,2000). Just look in the avisynth documentation on how exactly it works.

hkl8324
10th July 2006, 20:28
Thanks.

And I have another question...

How can I apply a filter (e.g. the levels filter(to do "black level correction)) only to a particular segment of the video?

stickboy
11th July 2006, 04:32
Use ApplyRange.

actionman133
11th July 2006, 07:40
Or you can do it slightly differently (and in my opinion, more easily) this way...

Example. You want frames 4-2000, but want to reset the black level on frames 100-220.

AVISource ("...")
a = Trim (4, 99)
b = Trim (5, 220).BlackLevelCorrection () # Insert proper filter here
c = Trim (221, 2000)

return a+b+c

a will grab all the frames you wanted before the black level correction. c grabs all the frames after it, but only to the limits of what you want to keep (according to your first post).

b grabs the frames you want to correct. Then the final line recombines a, b and c to form a single video clip to output.