Convert Cinepak videos with FFmpeg for ImageJ

ImageJ/FIJI cannot read Cinepak codec video files. There are two plugins that attempt to address this for ImageJ:

But I found neither of them to work for me on the particular AVI Cinepak video I was given.

FFmpeg video format conversion

These snippets show to how to convert from any FFmpeg-readable video format to particular video formats.

Motion JPEG

Motion JPEG is widely-compatible with video players.

ffmpeg -i video1990s.avi -vcodec mjpeg -qscale 1 test.avi

Uncompressed AVI

Uncompressed AVI output file size could be a factor of 10 larger than the Cinepak version. By definition, every video player should be able to play uncompressed AVI–including ImageJ.

ffmpeg -i video1990s.avi -vcodec rawvideo out.avi

Lossless FFV1

FFV1 preserves the original video quality with lossless compression. Many video players can handle FFV1 AVI video.

ffmpeg -i video1990s.avi -vcodec ffv1 out.avi

PNG image stack

Convert video to PNG image stack. The advantage of using a PNG image stack comes in frame-by-frame analysis of the video.

You could also consider converting video to HDF5 for analysis purposes.

Leave a Comment