Shell scripts to create video slideshows from images using FFmpeg.
ffmpeg 2.8.x
or later
Advanced 'Moving Text' script needs ffmpeg to be build with freetype.
If you compile ffmpeg from source you need to provide --enable-libfreetype
flag on ./configure
.
Under macOS, ffmpeg is available under Homebrew,
you can install it using --with-freetype
option, aka brew install ffmpeg --with-freetype
.
Each script creates a video slideshow using 5 photos inside photos
folder.
Advanced scripts use additional objects & fonts from their respective folders.
Output slideshow is an h264 encoded 1280x720 px MPEG-4 video.
Generally, scripts use the following scene arrangement.
photo 1 - 3 seconds
- transition to photo 2 - 1 second
photo 2 - 2 seconds
- transition to photo 3 - 1 second
photo 3 - 2 seconds
- transition to photo 4 - 1 second
photo 4 - 2 seconds
- transition to photo 5 - 1 second
photo 5 - 2 seconds
=======
Total = 15 seconds
- Input images are scaled to fit the screen using
scale=w='if(gte(iw/ih,1280/720),min(iw,1280),-1)':h='if(gte(iw/ih,1280/720),-1,min(ih,720))'
formula. As an alternative, cropping input images can be implemented by replacing the scale statement withcrop=min(iw\,1280):min(ih\,720)
.
You may notice the following warnings when executing the scripts. Below you can find their reasons and possible fixes.
[swscaler @ 0x............] deprecated pixel format used, make sure you did set range correctly
This warning is printed because input image streams are decoded with yuvj444p
pixel format, which is deprecated.
You can safely ignore it, ffmpeg
users are not effected from this warning.
[out_0_0 @ 0x............] 100 buffers queued in out_0_0, something may be wrong.s dup=. drop=. speed=...
[Parsed_overlay_80 @ 0x............] [framesync @ 0x............] Buffer queue overflow, dropping.
Statements inside filter_complex
are ordered into logical groups to give a better understanding of how they work.
In this ordering scheme too many streams/statements wait in the buffer queue, which generates these two warnings.
If you want to resolve them change the order of statements inside filter_complex
and use new streams immediately
after they are created.
Past duration 0.xyz too large
Currently push_box
and box_in
transitions print this warning. setpts=0.5*PTS
statements used inside the scripts
cause this. If you know how to remove it safely please submit an issue.
How to prevent shake effect for zoompan filter
Feel free to submit issues or pull requests.
This project is licensed under the MIT License with the following exceptions.
Photos inside photos
folder are published in the public domain. These photos are:
Snow flake and heart images inside objects
folder are downloaded from pngimg.com and pngimg.com, both licensed under the Creative Commons 4.0 BY-NC.
Film strip images inside objects
folder are modified from Film Strip by Nevit Dilmen and licensed under Creative Commons Attribution-Share Alike 3.0 Unported.
Falling Sky font inside fonts
folder is licensed under the SIL Open Font License (OFL).