Name the photos img01.jpg to img05.jpg and read them at -framerate 1/3: each stays 3 seconds, so five photos and a song make 15 seconds of vertical video. ReelSDK's slideshow API adds transitions for $0.03 per output minute.
Images to video with ffmpeg
Three numbers make a slideshow: seconds per photo, output frame rate and where the music ends, and 3 s, 30 fps and a 2-second fade work well. ReelSDK ran this one as raw ffmpeg in about 20 seconds, under three quarters of a cent.
GuidesUpdated
ffmpeg -framerate 1/3 -i img%02d.jpg -i music.mp3 \
-vf scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,format=yuv420p -r 30 \
-c:v libx264 -crf 20 -preset veryfast \
-af afade=t=out:st=13:d=2 -c:a aac -shortest -movflags +faststart slides.mp4-framerate 1/3 reads one image every 3 seconds, -r 30 writes 30 frames per second, and the scale and crop fill 1080x1920. -shortest stops at the end of the pictures, and afade fades the music out over the last 2 seconds.
Variations
The other commands you will need
A different length for each photo
The concat demuxer reads a list with a
durationper file. Set-tto the total as well: on ffmpeg 8.1 the list alone ran about a second over 15 s of durations, and with the last file listed a second time, about 3 seconds over.custom durations # list.txt file 'img01.jpg' duration 2 file 'img02.jpg' duration 4 file 'img03.jpg' duration 2 file 'img04.jpg' duration 4 file 'img05.jpg' duration 3 ffmpeg -f concat -i list.txt -vf scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,format=yuv420p -r 30 -t 15 \ -c:v libx264 -crf 20 -preset veryfast -movflags +faststart concat.mp4One picture over an audio track
For a podcast clip or a song with cover art, loop the picture at 1 frame per second and let
-tset the length. 20 seconds encode in a few seconds to about 1.3 MB.still with audio ffmpeg -loop 1 -framerate 1 -i cover.jpg -i music.mp3 -t 20 \ -vf scale=1920:1080,format=yuv420p -c:v libx264 -tune stillimage -crf 20 -preset veryfast \ -c:a aac -b:a 192k -movflags +faststart podcast.mp4Rendered frames back into a video
Frames from a renderer or an earlier export go in at their real rate:
-framerate 30with a 4-digit pattern. 60 PNG frames make a 2-second clip in under a second.frames to video ffmpeg -framerate 30 -i seq/frame_%04d.png \ -c:v libx264 -crf 20 -preset veryfast -pix_fmt yuv420p -movflags +faststart from-frames.mp4
The flags
The options in these commands
| Flag | What it does | Used here |
|---|---|---|
-framerate 1/3 | Input rate of the image sequence: one picture per 3 seconds; the default is 25 | Slideshow |
img%02d.jpg | Numbered files: img01.jpg, img02.jpg and on, with no gaps | Slideshow |
-r 30 | Output frame rate; each photo is repeated to fill it | Slideshow, concat |
-shortest | Ends the output with the shortest stream, here the pictures | Slideshow |
-f concat | Reads a list of files with a duration for each | Custom durations |
-t 15 | Caps the output at 15 s | Custom durations |
-loop 1 | Repeats a single image for as long as the output needs | Still with audio |
-tune stillimage | x264 tuning for pictures that do not move | Still with audio |
Sources: ffmpeg formats: image2 and concat, ffmpeg documentation, checked November 2026.
Input rate and output rate
An image sequence has no timing of its own, so ffmpeg reads it at 25 pictures per second unless you say otherwise; five photos would flash past in a fifth of a second. -framerate 1/3 before -i stretches each one to 3 seconds.
A video at one frame every 3 seconds plays badly on phones and platforms, so -r 30 after the inputs repeats each photo to 30 fps. That is why the 15-second result has 450 frames.
The concat list and its extra seconds
A list with a duration per file gives each photo its own length. You will often read that the last file must be listed twice. On ffmpeg 8.1 that made our 15 s of durations run about 3 seconds long; without the repeat it still ran about a second over. Adding -t 15 gave exactly 15 seconds, so put the total in -t.
The list also needs the same size for every photo before it reaches the encoder, which the scale and crop in each command take care of.
Running it on the API
There is no folder to glob on the API: -pattern_type glob gets a 400 answer, "-pattern_type must be one of sequence, none". Give the photos numbered names in inputs and use the %02d pattern, as the job below does. A job takes up to 50 inputs.
If you want transitions, Ken Burns motion or a voiceover without writing filters, the slideshow API takes a list of photo URLs. Raw ffmpeg jobs are billed per compute second; see pricing.
Without installing ffmpeg
The same command as one API call
The keys in inputs are the file names ffmpeg sees, so name the photos to match the pattern. Each job runs ffmpeg 8.1 on a fresh machine at $0.02 per compute minute, billed per second; this one finished in about 20 seconds and cost under three quarters of a cent.
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"inputs": {
"img01.jpg": "https://api.reelsdk.com/f/lib/demo/seville/river.jpg",
"img02.jpg": "https://api.reelsdk.com/f/lib/demo/seville/plaza.jpg",
"img03.jpg": "https://api.reelsdk.com/f/lib/demo/seville/oranges.jpg",
"img04.jpg": "https://api.reelsdk.com/f/lib/demo/seville/flamenco.jpg",
"img05.jpg": "https://api.reelsdk.com/f/lib/demo/seville/tapas.jpg",
"music.mp3": "https://api.reelsdk.com/f/lib/music/chill/calm-currents.mp3"
},
"args": [
"-framerate", "1/3", "-i", "img%02d.jpg", "-i", "music.mp3", "-vf",
"scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,format=yuv420p",
"-r", "30", "-c:v", "libx264", "-crf", "20", "-preset", "veryfast",
"-af", "afade=t=out:st=13:d=2", "-c:a", "aac", "-shortest",
"-movflags", "+faststart", "slides.mp4"
],
"outputs": ["slides.mp4"]
}'FAQ
Questions, answered
How do I make a video from images with ffmpeg?
Name them in order, for example img01.jpg to img05.jpg, and run ffmpeg -framerate 1/3 -i img%02d.jpg -r 30 -c:v libx264 -pix_fmt yuv420p out.mp4. Each image shows for 3 seconds.
How do I set how long each image shows?
For the same length, set -framerate to 1 divided by the seconds, such as 1/3. For a different length per image, use a concat list with a duration line under each file and set -t to the total.
Why is my concat slideshow longer than the durations I set?
On ffmpeg 8.1 our 15 s of durations ran about a second over, and about 3 seconds over with the last file listed twice. Add -t with the total length to cut it exactly.
How do I add music that stops when the photos end?
Add the audio as a second input and pass -shortest. Fade it out with afade=t=out:st=13:d=2 for a 15-second video.
- TikTok slideshow APITurn photos into a vertical TikTok-style slideshow with music and transitions, named or random, in one POST.
- Narrated slideshow APISend images and a script; get back a video narrated in one of 40 voices, with captions and music under the voice.
- Ken Burns effect with ffmpegSlow zooms and pans on a still photo with zoompan, without the jitter: upscale first, or switch to perspective.
- ffmpeg xfade transitions, all 59 renderedEvery xfade transition in ffmpeg 8.1 as a clip you can play, with the offset math and the fix for the do-not-match error.
- Concatenate videos with ffmpegJoin clips with the concat demuxer and -c copy when they match, or with the concat filter when their size, frame rate or codec differ.
- Photo slideshow makerTurn up to 10 photos into a video with transitions and free music for TikTok, Reels or Shorts: free right here, or one POST /v1/slideshow call.
- Product videos from photosTurn ecommerce product photos into a short video with slide transitions and music, in any feed shape, with one POST.
- Real estate listing videosTurn landscape listing photos into a vertical reel with a voiceover, music and captions, without cropping a single photo.
- Best program for a slideshowFree slideshow programs compared by watermark, export quality and device: Canva, iMovie, Clipchamp, Google Photos and a no-signup maker.
Sources, checked November 2026
Ready to build?
Ship video from your app today
Your first $0.50 is free, and one key covers every endpoint.
