How to build a slideshow video from images and a voiceover with an API
Syncing the voiceover to the slides is the slow part of a templated video ad, not the render. Setting a duration per image in a template means redoing it whenever the script changes. Letting the transcript decide the durations removes that loop, and it means one template per aspect ratio instead of one per job.
The manual FFmpeg way
One command per slide, then a second pass to join them, then a third for the audio and a fourth for the captions. Each re-encode costs quality, and the durations are still guessed by hand.
ffmpeg -loop 1 -i slide1.png -t 6 -vf "scale=1080:1920,format=yuv420p" slide1.mp4
Do it with one API call
- 1
Transcribe the voiceover first
Send the narration to transcribe-video. The segments come back with start and end times, which is what tells you how long each paragraph takes to read.
- 2
Turn each image into a clip of that length
Call image-to-video per image with the duration its paragraph occupies and the aspect ratio you are producing. Add the job text and branding in the same job with an add_text operation through create_video_job.
- 3
Join, lay the voice, burn the captions
merge-videos joins the clips with a crossfade, add-music-to-video lays the narration over the result, and add-subtitles-to-video burns the SRT the transcription already produced, so the captions are in sync by construction.
- 4
Declining to other formats
Run format-video-for-platform or resize-video on the finished cut. This is the last and cheapest step, and it is the only one you repeat per format.
curl https://kinopipe.com/api/v1/tools/image-to-video \
-H "Authorization: Bearer kp_live_..." \
-H "Content-Type: application/json" \
-d '{
"inputs": [
{ "id": "main", "url": "https://example.com/slide-1.png" }
],
"options": { "duration": 6.4, "aspect_ratio": "9:16" }
}'