ImageJ & ffmpeg: How to create a video from a set of images using ffmpeg that can be opened by ImageJ?

350 Views Asked by At

I have a set of PNG images and want to create a video file from them that can be opened by ImageJ or Fiji. To do so I use the following command:

ffmpeg -i *.png -c:v ayuv -r 25 outvideo.avi

It works good, ImageJ\Fiji opens this video, but the resulted AVI is huge.

How to create a video with smaller size that can be opened by ImageJ\Fiji?

1

There are 1 best solutions below

0
Herbie On

For those who prefer to see code, here is the ImageJ-macro code that converts images in a directory to a JPG-compressed AVI-video:

dirImages=getDir("Choose a Directory");
File.openSequence(dirImages,"virtual");
run("AVI... ","compression=JPEG frame=25 save="+dirImages+"test.avi");

The video-file "test.avi" is saved to the directory of its images.