Convert Cinepak videos with FFmpeg for ImageJ

less than 1 minute read

ImageJ/FIJI cannot read Cinepak codec video files, so we convert from Cinepak to popular video formats using FFmpeg.

Motion JPEG

Motion JPEG is widely-compatible with video players including ImageJ.

ffmpeg -i old.avi -c:v mjpeg -qscale 1 out.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 old.avi -c:v rawvideo out.avi

Lossless FFV1

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

ffmpeg -i old.avi -c:v ffv1 out.avi

PNG image stack

You can 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 using dmcutils/avi2hdf5.py for analysis purposes.

Notes

There are two plugins that attempt to address this for ImageJ:

  • https://rsb.info.nih.gov/ij/plugins/jmf-player.html
  • https://rsb.info.nih.gov/ij/plugins/jmf.html

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

Tags:

Categories:

Updated:

Leave a comment