<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.flo.cx &#187; howto</title>
	<atom:link href="http://blog.flo.cx/tag/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flo.cx</link>
	<description>Tech, Food, Life</description>
	<lastBuildDate>Fri, 30 Dec 2011 14:37:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>miniature time-lapse with fake tilt shift (howto)…</title>
		<link>http://blog.flo.cx/2010/08/miniature-time-lapse-with-fake-tilt-shift-howto/</link>
		<comments>http://blog.flo.cx/2010/08/miniature-time-lapse-with-fake-tilt-shift-howto/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 09:25:27 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[blur]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fake tilt shift]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sox]]></category>
		<category><![CDATA[tilt shift]]></category>
		<category><![CDATA[time lapse]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=1903</guid>
		<description><![CDATA[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 ...
Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/08/video-tilt-shift-miniature/' rel='bookmark' title='[video] Tilt Shift Miniature&#8230;'>[video] Tilt Shift Miniature&#8230;</a></li>
<li><a href='http://blog.flo.cx/2011/11/video-lisbon-airport-fake-tilt-shift/' rel='bookmark' title='Video: Lisbon Airport Fake Tilt Shift&#8230;'>Video: Lisbon Airport Fake Tilt Shift&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>i recently came across some videos that <a href="http://vimeo.com/9679622">took</a> <a href="http://vimeo.com/2296556">my</a> <a href="http://vimeo.com/6243891">breath</a>. 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.</p>
<p>of course i wanted to make one <img src='http://blog.flo.cx/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>here is how:<span id="more-1903"></span><br />
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.<br />
<strong>shoot the scene.</strong> i did this with my <a href="http://en.wikipedia.org/wiki/Canon_EOS_7D">eos 7d</a> 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 <a href="http://chdk.wikia.com/wiki/CHDK">CHDK</a>.<br />
having the material to work with load everything to the mac or linux box of your trust.</p>
<div id="attachment_1909" class="wp-caption alignright" style="width: 231px"><a href="http://blog.flo.cx/mycontent/2010/08/2_both.png"><img class="size-thumbnail wp-image-1909" title="original frame and fake tilt shift" src="http://blog.flo.cx/mycontent/2010/08/2_both-221x250.png" alt="" width="221" height="250" /></a><p class="wp-caption-text">original frame and fake tilt shift</p></div>
<p>to make the time lapse i used ffmpeg to <strong>extract 2 frames per second</strong> from the .MOV:<br />
<code><br />
$ ffmpeg -i ~/input.MOV -r 2 -f image2 out/scene_%06d.png</code><br />
this leaves you 2 frames per second in .png files in the <em>out</em> folder.</p>
<p><strong>faking it</strong>. next thing you need to do is getting the fake <a href="http://www.google.com/images?q=Tilt+Shift">tilt shift</a> 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&#215;1080). here is the little script:</p>
<pre class="brush: bash; title: ; notranslate">
#!/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 &amp;amp;&amp;amp; echo &amp;quot;usage: $0 &amp;quot; &amp;amp;&amp;amp; 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
</pre>
<p>this has to be run in a little for loop. look <a href="http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html">here</a> to see how this is done.<br />
be very patient with this. this can take a looooong time.</p>
<p>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 <strong>combine those frames</strong> to a movie:<br />
<code>ffmpeg -i final/%06d.png -sameq ./mymovie.mp4</code><br />
-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.</p>
<p>if you like to add music to your clip you can tell ffmpeg to take an audio file as well:<br />
<code>ffmpeg -i final/%06d.png -sameq -i mysoundtrack.mp3 ./mymovie.mp4</code><br />
to cut and fade the soundtrack i used <em>sox</em>:<br />
<code>sox -t mp3 -r 192k original_soundtrack.mp3 mysoundtrack.mp3 fade p 0 40 5</code><br />
good luck!<br />
and here is the resulting video:</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="520" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/UZHIfJ33yyg?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="520" height="300" src="http://www.youtube.com/v/UZHIfJ33yyg?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/08/video-tilt-shift-miniature/' rel='bookmark' title='[video] Tilt Shift Miniature&#8230;'>[video] Tilt Shift Miniature&#8230;</a></li>
<li><a href='http://blog.flo.cx/2011/11/video-lisbon-airport-fake-tilt-shift/' rel='bookmark' title='Video: Lisbon Airport Fake Tilt Shift&#8230;'>Video: Lisbon Airport Fake Tilt Shift&#8230;</a></li>
</ol></p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=1903&amp;md5=a502074fd3f63f251ea90f0385f5ada5" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2010/08/miniature-time-lapse-with-fake-tilt-shift-howto/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to make time-lapse videos on a motorcycle&#8230;</title>
		<link>http://blog.flo.cx/2010/01/how-to-make-time-lapse-videos-on-a-motorcycle/</link>
		<comments>http://blog.flo.cx/2010/01/how-to-make-time-lapse-videos-on-a-motorcycle/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 13:27:39 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Hardware Gadgets]]></category>
		<category><![CDATA[Motoriges]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[bike]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[cameramount]]></category>
		<category><![CDATA[canon]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[motorbike]]></category>
		<category><![CDATA[motorcylce]]></category>
		<category><![CDATA[timelapse]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=1599</guid>
		<description><![CDATA[a few weeks ago i got my hands on a motorcylce camera stand (thx Patrick). one that was actually made for a motorbike and not a modified tankbag with rubber wraps. please don't ever use those and please do never put a camera into your helmet as some youtube idiots present.

the camera i used ...
Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/08/miniature-time-lapse-with-fake-tilt-shift-howto/' rel='bookmark' title='miniature time-lapse with fake tilt shift (howto)…'>miniature time-lapse with fake tilt shift (howto)…</a></li>
<li><a href='http://blog.flo.cx/2011/01/diy-time-lapse-timer/' rel='bookmark' title='DIY time-lapse timer&#8230;'>DIY time-lapse timer&#8230;</a></li>
<li><a href='http://blog.flo.cx/2011/02/video-14h-time-lapse/' rel='bookmark' title='[video] 14h Time Lapse&#8230;'>[video] 14h Time Lapse&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>a few weeks ago i got my hands on a motorcylce camera stand (thx Patrick). one that was actually made for a motorbike and not a modified tankbag with rubber wraps. please don&#8217;t ever use those and please do never put a camera into your helmet as some youtube idiots present.</p>
<p>the camera i used is my canon ixus 750. since the lense on this camera is rather low i had to improve the camera stand. i added some aluminum ducts to make it higher and to make the camera see the street. about 7 centimeters were enough.</p>
<p><img class="aligncenter size-thumbnail wp-image-1618" title="IMG_1040_1200" src="http://blog.flo.cx/mycontent/2010/01/IMG_1040_1200-250x187.jpg" alt="" width="250" height="187" /></p>
<p>since i was not able to get the <a href="http://chdk.wikia.com/wiki/CHDK">CHDK</a> timelapse to work i shot video. to generate a timelapse i used ffmpeg to extract images out of the video and to unite them to a timelapse video.<br />
using this <a href="http://pr0gr4mm3r.com/linux/how-to-create-a-time-lapse-video-using-ffmpeg/">tutorial</a> and the man pages i was able to come up with this:<br />
<code><br />
#!/bin/bash<br />
# sample usage: ./timelapsify.sh input.avi output.mp4<br />
mkdir ffmpeg_temp<br />
ffmpeg -i $1 -r 1.4 -f image2 ffmpeg_temp/%05d.png<br />
ffmpeg -i ffmpeg_temp/%05d.png -sameq $2<br />
rm -rf ./ffmpeg_temp<br />
</code><br />
note that it is important for ffmpeg to have the images you use to generate the timelapse video in order and sequenced. if you decide to delete some images you have to rename them and must not leave gaps.<br />
also you may have to vary the rate (i used: 1.4) acording to the speed of your input video and the speed of the output video you want to have.</p>
<p>one step i did between extracting and generating the timelapse was sending it through imagemagick to blend the speedometer. using info from this <a href="http://studio.imagemagick.org/pipermail/magick-users/2008-September/021801.html">mailing list</a>:<br />
<code><br />
#!/bin/bash<br />
#usage: pixelate_circle.sh IN.file OUT.file center_x_coord center_y_coord border_x_coord border_y_coord<br />
convert $1 \( -clone 0 -scale 10% -scale 1000% \) \<br />
\( -clone 0 -gamma 0 -fill white \<br />
-draw "circle ${3},${4},${5},${6}"\<br />
\) -composite $2<br />
</code><br />
of course this has to be done for every image <img src='http://blog.flo.cx/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>and here is the resulting video:</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="320" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/7Kr1v-kWc6s&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="320" src="http://www.youtube.com/v/7Kr1v-kWc6s&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/08/miniature-time-lapse-with-fake-tilt-shift-howto/' rel='bookmark' title='miniature time-lapse with fake tilt shift (howto)…'>miniature time-lapse with fake tilt shift (howto)…</a></li>
<li><a href='http://blog.flo.cx/2011/01/diy-time-lapse-timer/' rel='bookmark' title='DIY time-lapse timer&#8230;'>DIY time-lapse timer&#8230;</a></li>
<li><a href='http://blog.flo.cx/2011/02/video-14h-time-lapse/' rel='bookmark' title='[video] 14h Time Lapse&#8230;'>[video] 14h Time Lapse&#8230;</a></li>
</ol></p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=1599&amp;md5=3b9eb97b2a136d57760c040cd743f6a4" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2010/01/how-to-make-time-lapse-videos-on-a-motorcycle/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

