How to turn images into a video slideshow with sound

4

2

I have a 65min long MP3 file and 14 different images (a slideshow).

How do combine these into a video file that is less than 500MB?

Is there any free/opensource/trial software for Windows 7 that can take 14 images and 65min MP3 @ 320kbs, and turn that into an AVI file that is 500MB max (for a basic Vimeo account)?

enloz

Posted 2011-11-13T16:11:09.863

Reputation: 171

That means 3900 seconds for 14 images, which equals to each image shown for 278 seconds. Or do you want to loop them and show them every 2 seconds, for example? – slhck – 2011-11-13T16:32:41.213

Thanks for edit. And sorry, I should better explain: MP3 file is actually mix of 14 songs. Various length, so images follow songs (image changes when song ends). – enloz – 2011-11-13T17:56:39.000

On the side of the compressing, remember how compressing works when trying to keep the "animation" the video down in size (and compression lower). anything that changes ALL the pixels (dissolves, moves, sliding, zoom effects) takes a lot of data (wont compress) effects that change less pixels (cuts , non moving wipes, pattern wipes) The compression only has to change the pixels that change between frames. – Psycogeek – 2011-11-13T22:14:47.097

Answers

9

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.

slhck

Posted 2011-11-13T16:11:09.863

Reputation: 182 472

+1.. and I have just one question. Can I set for example: "show Image1 for 2min, show Image2 for 3min..." ? Thanks! – enloz – 2011-11-13T18:00:03.940

2Since you did not specify this before, I couldn't have guessed. I don't think that's possible with FFmpeg. There might be better tools suited for this, such as Windows Movie Maker. – slhck – 2011-11-13T18:04:58.490

Yeah, you'll need something with a storyboard, like Movie Maker. – surfasb – 2011-11-14T02:25:33.390

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.

Mike Fitzpatrick

Posted 2011-11-13T16:11:09.863

Reputation: 15 062

1

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
    

Naveed

Posted 2011-11-13T16:11:09.863

Reputation: 111

0

Follow the following steps:

  1. Create the movie using Windows Movie Maker (you can specify the length of the display of each still)
  2. Encode to MP4 by Windows Movie Maker
  3. Transcode the video in VidCoder, File Factory, or similar - by specifying (e.g.) 2FPS (don't need 24FPS for stills) and keep the audio quality high

Mauricio

Posted 2011-11-13T16:11:09.863

Reputation: 1