Select
From Avisynth
Contents |
[edit] SelectEven/SelectOdd
SelectEven(clip clip)
SelectOdd(clip clip)
SelectEven makes an output video stream using only the even-numbered frames from the input. SelectOdd is its odd counterpart.
Since frames are numbered starting from zero, SelectEven actually selects the first, third, fifth,... frames by human counting conventions.
[edit] SelectEvery
SelectEvery(clip clip, int step-size, int offset1 [, int offset2, ...])
SelectEvery is a generalization of filters like SelectEven and Pulldown. The easiest way to describe it is by example:
SelectEvery(clip, 2, 0) # identical to SelectEven(clip) SelectEvery(clip, 2, 1) # identical to SelectOdd(clip) SelectEvery(clip, 10, 3, 6, 7) # select frames 3, 6, 7, 13, 16, 17, 23, 26, 27, ... from source clip SelectEvery(clip, 9, 0) # select frames 0, 9, 18, 27, ... from source clip
And how about this:
# Take a 24fps progressive input clip and apply 3:2 pulldown, # yielding a 30fps interlaced output clip AssumeFrameBased() SeparateFields() SelectEvery(8, 0,1, 2,3,2, 5,4, 7,6,7) Weave()
[edit] SelectRangeEvery
SelectRangeEvery(clip clip [, int every] [, int length] [, int offset] [, bool audio])
This filter is available starting from v2.5. The filter selects length number of frames every n frames, starting from frame offset. Default values are: Select 50 frames every 1500 frames, starting with first selection at frame 0. (every = 1500, length = 50, offset = 0).
Starting from v2.55, SelectRangeEvery will also process audio. To keep the original audio, use audio = false.
Examples:
# Selects the frames 0 to 13, 280 to 293, 560 to 573, etc. SelectRangeEvery(clip, 280, 14)
# Selects the frames 2 to 15, 282 to 295, 562 to 575, etc. SelectRangeEvery(clip, 280, 14, 2)

