Changes between Version 6 and Version 7 of Slideshow
- Timestamp:
- May 6, 2013, 7:19:31 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Slideshow
v6 v7 1 This will create a video slideshow (using video codec libx264) from series of png images, named named img001.png, img002.png, img003.png, ...1 This will create a video slideshow (using video codec libx264) from series of PNG images, named named img001.png, img002.png, img003.png, … 2 2 3 ''(each image will have a duration of 5 seconds)'' 3 Here, each image will have a duration of 5 seconds (the inverse of 1/5 frames per second). 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: 4 4 {{{ 5 5 ffmpeg -f image2 -r 1/5 -i img%03d.png -c:v libx264 -r 30 out.mp4 … … 9 9 {{{ 10 10 ffmpeg -f image2 -r 1/15 -i img%03d.png -c:v libx264 -r 30 out.mp4 11 }}}12 13 If you want to create a video out of just one image, this will do (output video duration is set to 30 seconds):14 {{{15 ffmpeg -loop 1 -f image2 -i img.png -c:v libx264 -t 30 out.mp416 11 }}} 17 12 … … 25 20 }}} 26 21 22 '''Important:''' All images in a series need to be of the same size and format. 27 23 28 '''Important:''' 29 All images in a series need to be of the same size and format. 24 If you want to create a video out of just one image, this will do (output video duration is set to 30 seconds with `-t 30`): 25 {{{ 26 ffmpeg -loop 1 -f image2 -i img.png -c:v libx264 -t 30 out.mp4 27 }}} 30 28 31 '''Explanation:''' 32 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 :) 29 If you want to add audio (e.g. `audio.wav`) to one "poster" image, you need `-shortest` to tell it to stop after the audio stream is finished. We use the internal AAC encoder, but you can [[AACEncodingGuide|use any other AAC encoder]] as well: 30 {{{ 31 ffmpeg -shortest -loop 1 -f image2 -i img.png -i audio.wav -c:v libx264 -c:a aac -strict experimental -b:a 192k out.mp4 32 }}} 33 33 34 34 35 '''See also:'''
