Overview
Ever heard of ffmpeg? This is a bash script to generate a timelapse video from a video source using the ffmpeg CLI tool.
Requirements
Ensure you have ffmpeg installed on your system.
Usage
-
Navigate to the
timelapse-generatordirectory:cd timelapse-generator -
Run the script with the following command:
sudo bash ./generate_timelapse.sh ~/path/to/destination/folder ~/path/to/video/source -
You can adjust the number of frames per second by modifying the
-r 1attribute in the script to-r <any number of frames># Adjust frames per second as needed, example: ffmpeg -i "$filename" -r 10 -f image2 "$temp_dir/%05d.png"Note: the higher the framerate the slower the video. This means you can generate a slow motion video too.