How to turn images into a video slideshow with sound

Solution 1:

This is for FFmpeg (see here for Windows versions).

First, prepare your images so they are named image-001.jpg, image-002.jpg, et cetera. Put them into one folder.

Now, use the following command:

ffmpeg -y -loop 1 -f image2 -r 0.5 -i image-%03d.jpg -s:v 1280x720 -b:v 1M \
       -i soundtrack.mp3 -t 01:05:00 -map 0:0 -map 1:0 out.avi

You can of course change the parameters. Here's an explanation of what they do:

  • -loop_input – loops the images. Disable this if you want to stop the encoding when all images are used or the soundtrack is finished.

  • -r 0.5 – sets the framerate to 0.5, which means that each image will be shown for 2 seconds. Just take the inverse, for example if you want each image to last for 3 seconds, set it to 0.33.

  • -i image-%03d.jpg – use these input files. %03d means that there will be three digit numbers for the images.

  • -s 1280x720 – sets the output frame size.

  • -b 1M – sets the bitrate. You want 500MB for one hour, which equals to 4000MBit in 3600 seconds, thus a bitrate of approximately 1MBit/s should be sufficient.

  • -i soundtrack.mp3 – use this soundtrack file. Can be any format.

  • -t 01:05:00 – set the output length in hh:mm:ss format.

  • out.avi – create this output file. Change it as you like, for example using another container like MP4.

Solution 2:

Windows DVD Maker is a component of Windows 7 Home Premium and above. It is very easy to take a sequence of images and apply a soundtrack to them. It doesn't just burn to DVD - you can also save to file.

Solution 3:

I was trying to create video using multiple images and sound track, Follow these steps, works for me somehow:

  1. Create file which list the image path and duration for each image image-list.txt

    file 'imgs/114_1.png'
    duration 9
    file 'imgs/114_2.png'
    duration 7
    file 'imgs/114_2.png'
    

    Note: Repeat last image twice and don't enter duration for last entry.

  2. Create another file which contain the audio files path audio-list.txt

    file 1.mp3
    duration 9
    file 2.mp3
    duration 6
    
  3. ffmpeg magic!

    ffmpeg -f concat -safe 0 -i img-list.txt -f concat -safe 0 -i audio-list.txt -c:a aac -pix_fmt yuv420p -crf 23 -r 24 -shortest -y -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4