Categories
english Howto photography video

miniature time-lapse with fake tilt shift (howto)…

i recently came across some videos that took my breath. tilt shift time-lapse videos. they produce kind of a miniature look combined with a stop motion and time lapse feature that was just nice.

of course i wanted to make one 🙂

here is how:
get a nice point of view. somewhere where you could be if the whole scene would be a model scale 1:87 (H0 for model train lovers). use a tripod if possible or hold very still.
shoot the scene. i did this with my eos 7d and the HD video function. alternatively you could use any other cam which is able to shoot 2 pictures per second. some canon cams support this if you use CHDK.
having the material to work with load everything to the mac or linux box of your trust.

original frame and fake tilt shift

to make the time lapse i used ffmpeg to extract 2 frames per second from the .MOV:

1
$ ffmpeg -i ~/input.MOV -r 2 -f image2 out/scene_%06d.png

this leaves you 2 frames per second in .png files in the out folder.

faking it. next thing you need to do is getting the fake tilt shift effect in the images to make everything look like it was tiny. additionally i added a little contrast to make it even look better. if you do not extract the images from a HD movie file as i did you probably should resize them to a native HD size before the next step (1920×1080). here is the little script:

#!/bin/bash
# for better performance save the temp img that is created each time somewhere.
# this saves processing power
# convert out/scene_000001.png -sparse-color Barycentric '0,0 black \
# 0,%[fx:h-1] gray80' -solarize 50% -level 50%,0 \
# /tmp/my_blur_effect.png
# then use this:
# convert $filein -sigmoidal-contrast 9x30% \
# /tmp/my_blur_effect.png \
# -compose Blur -set option:compose:args 25 -composite \
# $fileout
test -z $1 && echo "usage: $0 " && exit -1
filein=$1
fileout=$2
\
convert $filein -sigmoidal-contrast 9x30% \
\( +clone -sparse-color Barycentric '0,0 black 0,%[fx:h-1] gray80' \
-solarize 50% -level 50%,0 \) \
-compose Blur -set option:compose:args 25 -composite \
$fileout

this has to be run in a little for loop. look here to see how this is done.
be very patient with this. this can take a looooong time.

after running this you have all your frames converted to have a higher contrast and a fake tilt shift blur, as seen in the lower picture on the side. all that you need to do now is run ffmpeg again and combine those frames to a movie:

1
ffmpeg -i final/%06d.png -sameq ./mymovie.mp4

-sameq tells ffmpeg to leave the quality of the images like it is. this guarantees a nice high quality, if your source material is ok.

if you like to add music to your clip you can tell ffmpeg to take an audio file as well:

1
ffmpeg -i final/%06d.png -sameq -i mysoundtrack.mp3 ./mymovie.mp4

to cut and fade the soundtrack i used sox:

1
sox -t mp3 -r 192k original_soundtrack.mp3 mysoundtrack.mp3 fade p 0 40 5

good luck!
and here is the resulting video:

7 replies on “miniature time-lapse with fake tilt shift (howto)…”

wow das ist wirklich sehr gut gelungen! muss ich auch einmal ausprobieren. wär es empfehlenswert sich etwas zu basteln was alle halben sekunden einen draht-auslöser impuls erzeugt oder sieht das dann nicht so gleichmäßig aus wie beim herausextrahieren aller x frames?

wenn du das alles auf ein stativ schnallst und in regelmässigen abständen auslöst sollte das problemlos funktionieren, auch mit geringerer frequenz. unter umständen kannst du ja an den grenzen der kamera bei maximalen auslösungen pro sekunden arbeiten (oft 3/sec).
wichtig ist nur die fotos vor dem blur effekt und der kontrasterhöhung zu verkleinern, sonst wartest du noch länger…

at first I thought the images are meant to have slightly irregural intervals to make it look even better
could that be possible as well ?

i think this could be done. but this would be a tremendous effort. think about it: you need about 24 frames per second to make it smooth.

Hi There,

Great video. I am going to have a go at this today and will try and produce a movie of my town in miniature. I wanted to know the exact number of frames per second and you have given me the answer.

Cheers

Leave a Reply to blog.flo.cx » [video] Tilt Shift Miniature… Cancel reply

Your email address will not be published. Required fields are marked *

verify you\'re human: * Time limit is exhausted. Please reload CAPTCHA.