Few days ago, I noticed that you can enjoy a scenic view of the Attica basin as shown from the foothills of Mount
Penteli via a set of web cameras. In particular, National Observatory of Athens/meteo.gr has installed two cameras on the Penteli Astronomical Station premises.
One camera has a view to the south of the basin with Mt. Hymettus on the left, while the other covers the
southwestern part (Mt. Aigaleo and Mt. Parnitha). As with other weather cameras, only still images are provided
that are refreshed at a one-minute interval, rather than a live feed.
Resolution of each image is 2688x1520. Feed for both cameras is available here. To make a step further, meteo.gr is courteous enough a “panorama” that is synthesized from the images of the cameras. Each “panorama” has a resolution of 4190x1394 pixels. Contrary to the actual cameras, panorama is refreshed every two minutes.
So, I thought that this panorama is a prime source of creating a timelapse video of Athens.
Collecting the images is a rudimentary process.
Every two minutes a script is invoked that fetches the panorama image and saves it locally following a predetermined naming scheme:
Then, I set a cronjob to my humble Orange Pi, in order to invoke the script every two minutes.
24 hours and 700 images later, raw material for the video has been collected!
So moving to the next step of creating a video out of these still images. For simplicity, I opt using
ffmpeg to render
the whole video. FFmpeg can render a video using a sequence of images by specifying the following
-pattern_type glob -i <IMG_FOLDER>/*.jpg. Also, you need to specify the
-r flag to set to a reasonable frame rate. Here, I used 12 fps.
Moreover, FFmpeg provides a variety of audio/video filters that can be applied during video rendering. The complete documentation of FFmpeg filters is available here.
Thus, I used
afade filters to add fade-in and fade-out effects on video and audio sources respectively.
Rendering took approximately 2-3 minutes. The final result is shown below:
The glitch at the middle of the image is due to an webcam image being sightly misplaced during the merging of the two sources.
I was astonished with the fact that you can create a complete video just by using two commands;
Hope this small post will help you creating your own timelapses, either from readily available sources (like
web cameras) or even your own captures!