I'm wanting to take a bunch of images and make a video slideshow out of them. There'll be an app for that, right? Yup, quite a few it seems. The problem is I want the slides synced to a piece of music, and all the apps I've seen only allow you to show each slide for a multiple of a whole second. I want them to show for multiples of 1.714285714 seconds to fit with 140 bpm.
The tools I've seen generally seem to have ffmpeg under the hood, so presumably this kind of thing could be done with a script. But ffmpeg has sooo many options...I'm hoping someone will have something close.
I'll have up to about 100 slides, the ones that have to show for 3.428571428 secs or whatever I guess I can simply show twice.
For very recent versions of ffmpeg (roughly from the end of year 2013)
The following will create a video slideshow (using video codec libx264 or webm) from all the png images in the current directory. The command accepts image names numbered and ordered in series (
img001.jpg
,img002.jpg
,img003.jpg
) as well as random bunch of images.(each image will have a duration of 5 seconds)
For older versions of ffmpeg
This will create a video slideshow (using video codec libx264 or webm) from series of png images, named
img001.png
,img002.png
,img003.png
, …(each image will have a duration of 5 seconds)
You may have to slightly modify the following commands if you have a very recent version of ffmpeg
This will create a slideshow in which each image has a duration of 15 seconds:
If you want to create a video out of just one image, this will do (output video duration is set to 30 seconds):
If you don't have images numbered and ordered in series (
img001.jpg
,img002.jpg
,img003.jpg
) but rather random bunch of images, you might try this:or for png images:
That will read all the jpg/png images in the current directory and write them, one by one, using the pipe, to the ffmpeg's input, which will produce the video out of it.
Important: All images in a series need to be of the same size (x and y dimensions) and format.
Explanation: By telling FFmpeg to set the input file's FPS option (frames per second) to some very low value, we made FFmpeg duplicate frames at the output and thus we achieved to display each image for some time on screen. You have seen, that you can set any fraction as framerate. 140 beats per minute would be -r 140/60.
Source: The FFmpeg wiki
For creating images from a video use
This will create images named
img001.png
,img002.png
,img003.png
, …This is an excerpt from the documentation, for more info check on the documentation page of ffmpeg.
I wound up using this:
and changing the sample rate afterwards in
LiVES
.a load more details (and the end result video) at: http://hyperdata.org/hackit/ (mirror)