1

I have a sequence of jpg images that I would like to turn into an avi or mpeg movie file. I tried to install mplayer/mencoder using Macports, but it told me this is obsolete and has been replaced by mpv. However, the man page for mpv doesn't explain how to do this task, of encoding a sequence of images into a video. How can I do that?

The images are in the form yyyymmdd-hhmm.jpg (so that sorting them alphabetically puts them in the right order) and there are about 22000 of them - I want to produce a time lapse video rather than a slide show.

(Note: I've tried using ImageMagick and ffmpeg as well, but convert seems to want to load all the images into memory first, thus locking up my computer and forcing me to reboot, while ffmpeg inexplicably only uses the first 100 frames or so and then stops, producing an output video that's only a few seconds long. I'm open to other suggestions as well.)

3
  • Which OS are you using? Jan 24, 2017 at 7:16
  • @YisroelTech Mac OS X El Capitan - but it shouldn't make too much difference for a command line task
    – N. Virgo
    Jan 24, 2017 at 7:30
  • I'm just not that familiar with MAC (you mentioned MacPorts) so I wasn't sure if you were talking about Windows Linux or MAC. Mencoder in command line should work all fine according to their office site. Want a normal GUI installation the old ones should still work, like mplayerosx.ch/#downloads. Another program you may try (GUI) is fox-gieg.com/tutorials/2013/image-sequence-to-movie Jan 24, 2017 at 7:41

1 Answer 1

6

I managed to figure this out for myself by trial and error, though I won't accept my own answer in case someone wants to give a more comprehensive answer (e.g. explaining how to change the details of the encoding). But for my purposes, the following worked just fine:

mpv "mf://*.jpg" -mf-fps 30 -o movie.mpg

The "mf://*.jpg" is a special syntax for loading images; the -mf-fps 30 is optional and sets the frame rate, and the -o is needed to create an output file. (Otherwise it opens it in a GUI for playback.)

You must log in to answer this question.

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