Creating a Video from JPEGs and vice versa

Creating a video from JPEGs

I wrote a Bash script for this purpose:

It first renames the images from something like IMG_9999.JPG, IMG_10000, ... to IMG_00001.JPG, IMG_00002.JPG. Then it reduces the image resolution down to FullHD (1920x1080). The last and most important step: Create a video from the images.

Alternative Approaches

With avconv from libav you can also create timelapse movies. To install it run ` on Ubuntu/Debian Linux orbrew install libav` on the Mac with Homebrew.

avconv -r 10 -i myimage_%04d.jpg 
   -r 10 -vcodec libx264 -crf 20 -g 15


With ffmpeg, you can also do it like this:

ffmpeg -f image2 -start_number 6838 -i IMG_%04d.jpg time-lapse.mp4

The start_number of 6838 is the number the first image in the sequence (if not starting with 0000!).

Extracting JPEGs from video

Extract 250 high quality JPEGs from the movie file MVI_7655.MOV starting at the time 02 minutes, 13 seconds and save them to ../series/img-001.jpg, ../series/img-002.jpg, ../series/img-003.jpg:

ffmpeg -i MVI_7655.MOV -ss 00:02:13 -vframes 250 -f image2 -qscale 1 ../series/img-%03d.jpg