Frame interpolation for timelapse, using Julia

A long time ago I wrote a python utility to interpolate frames for use in timelapse. This project was timelapse.py.

Back in 2014 I ported the idea to the very-alpha-level language Julia.

In recent weeks Julia released version v1.0.0, followed shortly by compatibility fixes in the Images.jl library.

And so I’m pleased to announce that the julia implementation of my project, timelapse.jl (working simply off file mtimes without reference to exif) has also been updated to work with julia v1.0.0 and the new Images.jl API.

Usage:

zsh/scr, photos 11:32AM sunset/ % ls *
images-in/:
med-00001.png med-00022.png med-00065.png med-00085.png
med-00009.png med-00044.png med-00074.png

images-out/:

zsh/scr, photos 11:32AM sunset/ % ~/j/timelapse/timelapse.jl 50 images-in images-out
[1.536147186333474e9] - Starting
[1.536147186333673e9] - Loading modules
[1.536147201591988e9] - Sorting parameters
[1.536147201648837e9] - Reading images from directory [images-in]
[1.536147202022173e9] - Interpolating 50 frames
[1.53614720592181e9] - frame 1 / 50 left=1, right=2, prop=0.11999988555908203
[1.536147217019145e9] - saving images-out/image-00001.jpg
[1.536147218068828e9] - frame 2 / 50 left=1, right=2, prop=0.24000000953674316
[1.536147222013697e9] - saving images-out/image-00002.jpg
[1.536147222819911e9] - frame 3 / 50 left=1, right=2, prop=0.3599998950958252
[1.536147226688287e9] - saving images-out/image-00003.jpg

...

[1.536147597050891e9] - saving images-out/image-00048.jpg
[1.53614761140285e9] - frame 49 / 50 left=6, right=7, prop=0.880000114440918
[1.536147615090572e9] - saving images-out/image-00049.jpg
[1.536147615649168e9] - frame 50 / 50 left=6, right=7, prop=1.0
[1.536147619363807e9] - saving images-out/image-00050.jpg
[1.536147619960565e9] - All done
zsh/scr, photos 11:40AM sunset/ %

zsh/scr, photos 11:51AM sunset/ % ffmpeg -i images-out/image-%05d.jpg -qscale 0 -r 50 sunset-timelapse.mp4
ffmpeg version 3.4.2-2+b1 Copyright (c) 2000-2018 the FFmpeg developers

...

zsh/scr, photos 11:51AM sunset/ % ll -h sunset-timelapse.mp4
-rw------- 1 tim tim 4.9M Sep 5 11:46 sunset-timelapse.mp4

Announcing Timelapse.jl – frame interpolation for timelapse photography

A few years ago I wrote a python utility for interpolating a greater number of frames from a smaller set, for use in timelapse video/photography.

Recently, I’ve been trying to learn Julia. As a small challenge – to fulfil a potential forthcoming need – and because it claimed to be quite a fast language – I’ve rewritten the core of the script.

It’s quite refreshing – none of the gratuitous OO classes I had to create with Python, just a couple of functions to do the essential interpolation. And watching the output frames flash by… it’s pretty nippy, too.

It doesn’t yet support EXIF directly, nor can it modify images directly on the fly, but if you want to have a play then go download it from Githubhttps://github.com/spodzone/Timelapse.jl