ffmpeg -r 5 -f image2 -i ‘Test%d.png’ marionetteTracking.avi

Catatan dan sumber:

Image file demuxer.

This demuxer reads from a list of image files specified by a pattern.

The pattern may contain the string “%d” or “%0Nd”, which specifies the position of the characters representing a sequential number in each filename matched by the pattern. If the form “%d0Nd” is used, the string representing the number in each filename is 0-padded and N is the total number of 0-padded digits representing the number. The literal character ‘%’ can be specified in the pattern with the string “%%”.

If the pattern contains “%d” or “%0Nd”, the first filename of the file list specified by the pattern must contain a number inclusively contained between 0 and 4, all the following numbers must be sequential. This limitation may be hopefully fixed.

The pattern may contain a suffix which is used to automatically determine the format of the images contained in the files.

For example the pattern “img-%03d.bmp” will match a sequence of filenames of the form `img-001.bmp'`img-002.bmp', …, `img-010.bmp', etc.; the pattern “i%%m%%g-%d.jpg” will match a sequence of filenames of the form `i%m%g-1.jpg'`i%m%g-2.jpg', …, `i%m%g-10.jpg', etc.

The size, the pixel format, and the format of each image must be the same for all the files in the sequence.

The following example shows how to use `ffmpeg' for creating a video from the images in the file sequence `img-001.jpeg'`img-002.jpeg', …, assuming an input framerate of 10 frames per second:

ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi

Note that the pattern must not necessarily contain “%d” or “%0Nd”, for example to convert a single image file `img.jpeg' you can employ the command:

ffmpeg -f image2 -i img.jpeg img.png