Play an image sequence

Problem

Play an image sequence directly as moving images, without having to create a video file first.

Solution

ffplay input_file_%06d.ext

General command

ffplay input_file_regex.ext

Command syntax

ffplay
starts the command
input_file_regex.ext
path, name and extension of the input files

Discussion

The regex %06d matches six digits long numbers, possibly with leading zeroes. This allows to read in ascending order, one image after the other, the full sequence inside one folder. The command must of course match the naming convention actually used. And for image sequences starting at 086400 (captured at 24 fps with a timecode starting at 01:00:00:00) or at 090000 (captured at 25 fps with a timecode starting at 01:00:00:00), add the flag -start_number 086400 or -start_number 090000 before input_file_%06d.ext.

The extension for TIFF files is .tif or maybe .tiff; the extension for DPX files is .dpx (or eventually .cin for old Cineon files). Other file formats are possible.

The showing speed depends on the image’s file size and on the computing power. It is usually too slow, yet you can visualise immediately the moving images without having to recode and remux into a new file. If you have a really powerful computer, maybe you may reduce the speed by adding e.g. -framerate 24 before the input file.

You can command-click into the visualisation window to jump: to the beginning on the left side, to the end on the right side, and to every other position proportionally in between.


2018–07–21