Filters skipframes and extractframes

Purpose: skip and extract frames in movie file to reduce size

Since the movie-files may become very large, which makes it difficult to handle the data, two little C-programs are available which extract and skip frames and which both act as filters.
The filter skipframes reads movie data from the standard inout and writes each nth frame to the standard output. The options -x ... and -y ... provide the size of one frame and the option -d indicates that each pixel consists of two bytes (integer scaled data) rather than one byte. The option -s ... determines how many frames should be skipped. Example: The command

    cat movie.jz.large | skipframes -x2048 -y1024 -s20 > movie.jz.small
writes only the frames 1,21,41,61,... of 'movie.jz.large' into the file 'movie.jz.small'. If the option -s is omitted every frame is written to the standard output, thus the filter essentially does nothing.

The filter extractframes works similarly: The options -x, -y and -d have the same meaning as for skipframes. The option -f determines the first frame that is written and the option -n the number of frames. If -f is omitted the output starts with the first input frame, if -n is omitted all frames until the end of the file are written to the standard output. For example the command

    cat movie.jz.large | extractframes -x2048 -y1024 -f100 -n20 > movie.jz.small
writes the frames 100,101,...,119 to the file 'movie.jz.small'.

As an alternative to using the options -x, -y and -d a file with name config can be placed in the working directory. A config-file with the lines

    nx 2048
    ny 1024
    double_byte
corresponds to -x2048 -y 1024 -d.

The C-source code is contained in p3d-2.1/bin/src. Use the shell script compile in p3d-2.1/bin/src to produce the executables.