Vous êtes ici

How to make a video from pictures

Using Linux:

  • open a terminal.
  • create two subdirectories, in your current directory: tmp and img.
  • put pictures into subdirectory tmp.
  • go into directory tmp.
  • using following command, rename pictures so that file names are sequentially numbered, starting from 1 (replace .jpg by a string corresponding to your pictures files names:
x=1; for i in *.jpg; do counter=$(printf %03d $x);  \
ln -s "../tmp/$i" ../img/img"$counter".jpg; x=$(($x+1)); done

  • go into img subdirectory.
  • then, type the command:
ffmpeg -r 5 -b 1M -i img%03d.jpg -s 800x600 ../video.mp4
  • the -r parameter (5, here) is the number of pictures per second. The -b parameter is the bitrate (1 Mb/s, here). The -s parameter is the definition of the resulting video. video.mp4 is the name of the video file that will be created.

Then, using PiTiVi, edit resulting video, if necessary. Output format I use:

  • container format: MP4
  • video:
    • 25 fps
    • FFmpeg MPEG-4 part 2
    • bit rate: 1000000
    • encoding pass/type: VBR encoding - pass 1
  • audio:
    • codec: L.A.M.E. mp3
    • bit rate: 64 (kb/s)