This table summarizes the image file formats supported by various pieces of software. Although not included in the table below, the ImageMagick utility, available on most platforms, can convert among a long list of image file formats, allowing you to, for instance, convert a cineon sequence to a targa sequence for editing in Cinelerra.
| Format |
Cinelerra |
Kino |
ffmpeg |
mencoder |
| JPEG |
R |
W |
R |
W |
R |
W |
R |
W |
| PNG |
R |
W |
R |
W |
R |
W |
R |
W |
| GIF |
- |
- |
R |
- |
R |
W2 |
- |
W3 |
| TIFF |
R |
W |
R |
- |
- |
- |
- |
- |
| TGA |
R |
W |
R |
- |
- |
- |
R |
W |
| EXR |
R |
W |
- |
- |
- |
- |
- |
- |
| RAW |
R1 |
- |
- |
- |
- |
- |
- |
- |
Cinelerra supports images for slugs or as image sequences, but requires a cinelerra specific table of contents file listing the images in your sequence. Kino can export still frames or sequences as JPEGs or PNGs. Kino imports image sequences and slugs via the FX > Create > Create From File option. ffmpeg and mencoder can convert image sequences into encoded video, as well as the opposite: converting an encoded video into an image sequence.
To convert a video to an image sequence via ffmpeg, you simply specify a supported file extension for the output, and use a printf expression (the “%03d” part ) as a substitute for the frame number. Thus the following will create a bunch of files named output-001.jpg to output-NNN.jpg where NNN is the last frame of you video. If you have more than 999 frames in your video, replace the “3″ in “%03d” with a larger number.
$ ffmpeg -i input.avi output-%03d.jpg
Unfortunately, there’s no documentation on how to control the compression level of the output images, so you may prefer mplayer.
To convert a video to an image sequence via mencoder (well, actually mplayer, but they’re part of the same package), you use the jpeg pseudo video-driver. See the -vo option in the mplayer manual for more information.
$ mplayer input.avi -vo jpeg
Details are available in the manual, but to force mplayer to output very high quality jpegs, you can include the quality option, like so:
$ mplayer input.avi -vo jpeg:quality=100
Converting an image sequence to a video in ffmpeg is pretty much the opposite in terms of syntax.
$ ffmpeg -i input-%03d.jpg output.avi
Converting an image sequence to a video via mencoder has different syntax. Note that the “-ovc lavc” is unrelated to the task at hand and may be different, depending on your output file format.
$ mendcoder mf://input-*.jpg -ovc lavc -o output.avi
Notes
- Cinelerra can only import RAW images for use as slugs, but it does allow you to manually adjust the gamma. It’s recommended that you render these slugs to a MOV clip for performance reasons.
- ffmpeg can write either animated GIFs or GIF image sequences depending on whether you use a printf expression (e.g. ‘%03d’) in the output file name.
- mplayer will only convert the output to an animated GIF, not a GIF image sequence.