Making A Time-lapse With Ubuntu
Doing a time-lapse video isn’t too bad nowadays with all the technology on our phones and DSLR cameras. But for those who want to DIY their own time-lapse tool, I’ve got a couple of programs and one liners that will make a time-lapse video on Linux using a laptop’s built-in camera. So let’s get started.
The first step it make sure you have all the software you need.
From the terminal, type in:
And if the output is the path to the streamer tool, you’re all set. If not, you’ll have to install streamer:
sudo apt-get install streamer
Then perform the same steps with the tool, “ffmpeg”.
Now that we have all the tools we need, we will use a bash script to get the photos.
#!/bin/bash c=1000 while true; do streamer -o photos/stream$c.jpeg sleep 5 c=$(( $c + 1 )) done
Now that all the photos are nicely organized in the photos directory, go into the directory and run this ffmpeg command:
ffmpeg -r 10 -pattern_type glob -i "stream*.jpeg"
-q:a 0 -s hd720 -vcodec libx264 -crf 15 time-lapse.mp4
I have my framerate ( “-r” ) set at 10 frames per second. if you increase the value of the “-r” you’ll have more frames per second, and it will look better as long as you have enough photos.
And that’s all there is to it.
Here’s a link to the time-lapse I made of room painting: https://www.facebook.com/ryan.partlan/videos/10153666903726462/?l=8779786275150037753