Changes between Initial Version and Version 1 of Create a video slideshow from images


Ignore:
Timestamp:
Jul 4, 2012, 4:00:59 AM (4 years ago)
Author:
burek
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Create a video slideshow from images

    v1 v1  
     1This will create a video slideshow (using video codec libx264) from series of png images, named named img001.png, img002.png, img003.png, ... 
     2 
     3''(each image will have a duration of 5 seconds)'' 
     4{{{ 
     5ffmpeg -f image2 -r 1/5 -i img%03d.png -vcodec libx264 out.mp4 
     6}}} 
     7 
     8This will create a slideshow in which each image has a duration of 15 seconds: 
     9{{{ 
     10ffmpeg -f image2 -r 1/15 -i img%03d.png -vcodec libx264 out.mp4 
     11}}} 
     12 
     13If you want to create a video out of just one image, this will do (output video duration is set to 30 seconds): 
     14{{{ 
     15ffmpeg -loop 1 -f image2 -i img.png -vcodec libx264 -t 30 out.mp4 
     16}}} 
     17 
     18If 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: 
     19{{{ 
     20cat *.jpg | ffmpeg -f image2pipe -r 1 -vcodec mjpeg -i - -vcodec libx264 out.mp4 
     21}}} 
     22or for png images: 
     23{{{ 
     24cat *.png | ffmpeg -f image2pipe -r 1 -vcodec png -i - -vcodec libx264 out.mp4 
     25}}} 
     26 
     27That 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. 
     28 
     29'''Important:''' 
     30All images in a series need to be of the same size and format. 
     31 
     32'''Explanation:''' 
     33By 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 :) 
     34 
     35'''See also:''' 
     36[[Create a thumbnail image every X seconds of the video]]