Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to convert a movie into jpeg in a specific way. I was wondering if ffmpeg can help here.

What I need to achieve is every 25 frames from the movie needs to be written in a single .jpeg file - one under another. So that from a single movie I get




Can this be done without dumping the file into separate .jpegs and then modifying them?

share|improve this question
Do you mean that you want a jpeg of every 25th frame (i.e., ignoring every other frame), starting at frame 1? Or are you looking for some kind of composition of 25 frames into one image? – sblair Feb 6 '10 at 4:54
A composition of every 25 frames into one partXXX.jpeg - frames saved one vertical stripe. – viraptor Feb 6 '10 at 11:32
up vote 2 down vote accepted

I'm far from an ffmpeg expert, but I don't believe ffmpeg is capable of this level of image processing by itself. I think, in order to achieve your desired goal, you'll need this workflow:

  1. Extract all frames to individual, temporary image files with ffmpeg;
  2. Combine a sequence of 25 temporary image files into a single final image with a JPEG tool (such as montage from the ImageMagick package);
  3. Repeat step 2 until all final images have been created.

This should be fairly easy to script, but it will take up a lot of disk space while it's working.

share|improve this answer
Exactly - I wanted to save on the disk space by not creating every frame separately... – viraptor Feb 6 '10 at 14:56
some other tool might be able to do that, but i don't think ffmpeg is capable, sorry. (i could also be wrong.) – quack quixote Feb 6 '10 at 18:07

With a recent ffmpeg, you can simply use the tile filter like so:

ffmpeg -i input.mp4 -filter:v 'tile=layout=1x25' out%03d.jpg

This will produce files labelled out001.jpg, out002.jpg, and so on; and each image will be exactly as described in the question.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .