View Single Post
Old 6th August 2003, 17:53   #5  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
Quote:
Originally posted by Wilbert
Easiest is to renumber them beginning at zero (using Total Commander for example).
That's silly. Just trim off the extra frames.

This is what I use.
Code:
# ImageSource
#
#   A wrapper function to ImageReader.
#
# PARAMETERS:
#   filenameTemplate - the template string used to generate filenames from
#                        frame numbers
#   start, end       - the start and end frame numbers (inclusive)
#   fps              - the desired framerate
#                      (default: 29.97)
#
function ImageSource(string filenameTemplate, int start, int end, float "fps")
{
    assert(start >= 0 && start <= end, "ImageSource: invalid start frame")
    assert(end >= 0, "ImageSource: invalid end frame")
    fps = default(fps, 29.97)

    ImageReader(filenameTemplate, start, end, 1, true)
    Trim3(start, length=(end - start + 1))
    AssumeFPS(fps)
    FlipVertical() # this may not need to be here
    return last
}
(see my thread about Trim for my Trim3 function)

Last edited by stickboy; 6th August 2003 at 20:23.
stickboy is offline   Reply With Quote