jpg2mpg howto

Jul 08, 2009 06:47

After much fumbling, I figured out how to convert a pile of JPGs into a video. The magic line was this:

convert -delay 20 -resize 800x600 IMG_{1840..1922}.JPG ~/foo.mpg

where -delay is a number in centiseconds (so 20 is 5 fps).

The thing is, Ubuntu's install of ImageMagic (which provides convert) doesn't come with mpeg2encode, which is what it uses to make mpg files. I had to do this:

$ wget ftp://ftp.mpegtv.com/pub/mpeg/mssg/mpeg2vidcodec_v12.tar.gz
$ tar xvzf mpeg2vidcodec_v12.tar.gz
$ cd mpeg2
$ make
$ cd mpeg2enc
$ sudo cp mpeg2encode /usr/bin

Then convert it worked happily.

video, linux, psa

Previous post Next post
Up