<?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>TikiRobot! &#187; ffmpeg</title>
	<atom:link href="http://www.tikirobot.net/wp/tag/ffmpeg/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tikirobot.net/wp</link>
	<description>Mai Tais and Blinky Lights, Ahoy!</description>
	<lastBuildDate>Wed, 01 Feb 2012 22:14:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Star Wars re-remastered to high quality 1977 version!</title>
		<link>http://www.tikirobot.net/wp/2010/04/18/star-wars-re-remastered-to-high-quality-1977-version/</link>
		<comments>http://www.tikirobot.net/wp/2010/04/18/star-wars-re-remastered-to-high-quality-1977-version/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 18:41:05 +0000</pubDate>
		<dc:creator>tracey pooh</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[remaster]]></category>
		<category><![CDATA[star wars]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/?p=3099</guid>
		<description><![CDATA[So I wanted to sit down in my updated home theatre and watch one of my favorite films, &#8220;Star Wars&#8221;. Problem is, I have two versions on DVD, and neither are ideal. The 2004 DVD version has remastered audio and video, but also added scenes and changes I really don&#8217;t like. The 1977 DVD version [...]]]></description>
			<content:encoded><![CDATA[<p>So I wanted to sit down in my updated home theatre and watch one of my favorite films, &#8220;Star Wars&#8221;.  Problem is, I have two versions on DVD, and neither are ideal.  The 2004 DVD version has remastered audio and video, but also added scenes and changes I really don&#8217;t like.  The 1977 DVD version is a poor quality transfer and encoding.</p>
<p>So I <strong> combined the 1977 and 2004 DVDs</strong> into the highest quality 1977 version of the film!   I show all my scripts and techniques here, too, so you can make the same version from your two DVDs, too!<br />
<a href="http://www.archive.org/details/reremaster">http://www.archive.org/details/reremaster</a></p>
<p><div class="wp-caption alignleft" style="width: 434px"><a href="http://www.archive.org/details/reremaster"><img title="star wars comparison of two films" src="http://www.archive.org/download/reremaster/both10107-small.jpg" alt="star wars comparison of two films" width="424" height="480" /></a><p class="wp-caption-text">star wars comparison of two films</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2010/04/18/star-wars-re-remastered-to-high-quality-1977-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ffmpeg building on mac intel/x386</title>
		<link>http://www.tikirobot.net/wp/2009/04/01/ffmpeg-building-on-mac-intelx386/</link>
		<comments>http://www.tikirobot.net/wp/2009/04/01/ffmpeg-building-on-mac-intelx386/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 05:14:36 +0000</pubDate>
		<dc:creator>tracey pooh</dc:creator>
				<category><![CDATA[osx]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[ffmpeg]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/?p=2409</guid>
		<description><![CDATA[ffmpeg v0.5 just came out. it&#8217;s the bomb. it&#8217;s got tons of fixes and massive amounts of new codecs that it can read. for example, it can now decode my professional filmmaker brother&#8217;s &#8220;DVC ProHD&#8221; highly proprietary (and massive bitrate!) format! it can also decode flac and 24-bit flac. (encoding flac is disappointing though). at [...]]]></description>
			<content:encoded><![CDATA[<p>ffmpeg v0.5 just came out.  it&#8217;s the bomb.  it&#8217;s got tons of fixes and massive amounts of new codecs that it can read.  for example, it can now decode my professional filmmaker brother&#8217;s &#8220;DVC ProHD&#8221; highly proprietary (and massive bitrate!) format!   it can also decode flac and 24-bit flac.  (encoding flac is disappointing though).</p>
<p>at any rate!   macports is a great way to get it installed on your mac.<br />
the current way of setting up macports and then doing<br />
   sudo port install ffmpeg<br />
works fine on my PPC at work (oddly &#8212; pretty old computer now) but not my Air (intel x386)</p>
<p>So I set out to find the fixes needed to make it work.  Here they are:</p>
<p>step 1: install  macports &#8212; see http://www.macports.org/install.php</p>
<p>sudo port install x264 +noasm   # for i386 (not needed for PPC)<br />
sudo port fetch ffmpeg<br />
sudo port checksum ffmpeg<br />
sudo port extract ffmpeg<br />
sudo port patch ffmpeg<br />
remove &#8220;&#8211;enable-shared&#8221; from /opt/local/var/macports/sources/rsync.macports.org/release/ports/multimedia/ffmpeg/Portfile<br />
sudo port install ffmpeg</p>
<p>(and &#8220;ffplay&#8221; is pretty cool now!  i am considering using it over mplayer, hmm&#8230;.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2009/04/01/ffmpeg-building-on-mac-intelx386/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ffmpeg hook to aid with &#8220;rectangular pixels&#8221;</title>
		<link>http://www.tikirobot.net/wp/2008/11/16/ffmpeg-hook-to-aid-with-rectangular-pixels/</link>
		<comments>http://www.tikirobot.net/wp/2008/11/16/ffmpeg-hook-to-aid-with-rectangular-pixels/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 19:44:51 +0000</pubDate>
		<dc:creator>tracey pooh</dc:creator>
				<category><![CDATA[video]]></category>
		<category><![CDATA[code code]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[rectangular pixels]]></category>
		<category><![CDATA[widescreen]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/?p=2048</guid>
		<description><![CDATA[Tired of screen-scraping the output of ffmpeg and/or mplayer to get the parameters / clip info for a media file? This hook attempts to remedy this by printing simple information about the passed in video from the cmd line. It will also print out whether or not the clip is using &#8220;rectangular pixels&#8221;. WTF is a rectangular [...]]]></description>
			<content:encoded><![CDATA[<p>Tired of screen-scraping the output of ffmpeg and/or mplayer to get the parameters / clip info for a media file?</p>
<p><strong>This hook attempts to remedy this by printing simple information about the passed in video</strong> from the cmd line.</p>
<p><strong><span style="font-weight: normal;">It</span> will also print out whether or not the clip is using &#8220;rectangular pixels&#8221;.</strong></p>
<h2>WTF is a rectangular pixel?</h2>
<p> </p>
<p>Well, the easiest examples are DVDs.  You <strong>only want to buy a DVD</strong> if it says one of two standard phrases on it &#8212; &#8220;<strong>Enhanced for 16:9 TVs</strong>&#8221; or &#8220;<strong><a href="http://en.wikipedia.org/wiki/Anamorphic_widescreen#Packaging">Anamorphic widescreen</a></strong>&#8220;.  They both mean the same thing &#8212; namely that the video on the DVD disk is wider than 4:3 aspect (pretty much all films are ratio 16:9 or even wider like ratio 2.35:1) *and* that it didn&#8217;t *waste* any DVD bytes by encoding &#8220;top/bottom black bars&#8221;.  (If it doesn&#8217;t say those code phrases, it&#8217;s an older, crappy/low budget produced, or worse a &#8220;pan-n-scan&#8221; chopped film (where they lop off the left and right sides of each frame to fit into a 4:3 TV!)  Worst yet, if the DVD <em>only</em> says something like &#8220;widescreen version&#8221;, though it sounds good, it means while they didn&#8217;t cut off the picture, they wasted 25% (or more!) of the pixels encoding &#8220;black bars&#8221; on the top and bottom.  So you have less pixels in the DVD encoding the picture compared to an &#8220;anamorphic&#8221; version of the same thing.  Hello crappy quality!)</p>
<p> </p>
<p> </p>
<h3>Anamorphic DVDs are encoded internally at 720&#215;480 pixels per image.</h3>
<p>Now look at this:</p>
<p>  4:3 video == 1.33 ratio == <span style="text-decoration: underline;">640&#215;480</span> pixels image</p>
<p>16:9 video  == 1.78 ratio == <span style="text-decoration: underline;">854&#215;480</span> pixels image</p>
<p>so <strong>w</strong><strong>hat is <span style="text-decoration: underline;">720&#215;480</span>?  it&#8217;s almost perfectly in the middle of those two</strong> &#8212; math: 720/480 = 1.5</p>
<p>So the &#8220;encoded transport image size&#8221; is neither 16:9, nor 4:3 &#8212; it&#8217;s right in the middle, capable to encode either a 4:3 video (like non-high def TV, many computer screens) or 16:9 video (high def TV, some digital video).  I like to think of it as &#8220;how the formats that came out right before HDTV took off, compromised to hedge there bets to be between 4:3 and 16:9&#8243;.</p>
<p>The final <strong>critical bit of information about a DVD is the &#8220;aspect ratio&#8221; </strong>(not of the overall image, confusingly, but <strong>of each encoded *pixel*</strong>!)  This says &#8220;wait, this pixel isn&#8217;t square, literally, like you&#8217;d think if you just read the image &#8212; it&#8217;s actually supposed to be stretched to make the *overall image* either 640 pixels wide (squoosh down from 720) or 854 (stretch wider to 854).  So the video track is &#8220;flagged&#8221; with a &#8220;pixel aspect&#8221; (often referred to as PAR (Pixel Aspect Ratio), SAR (Sample Aspect Ratio), or DAR (Display Aspect Ratio) &#8212; some of those have some slight nuances/differences, but that&#8217;s digging too deep).  Anyway, neat, huh?  Your anamorphic DVD is a changeling!  (maybe &#8220;anamorphic&#8221; makes more sense mnemonically now 8-)  (PS: &#8220;DV&#8221; video &#8212; the most common format that digital camcorders that write to tape use &#8212; is similar.  720&#215;480 pixels/image plus a &#8220;flag&#8221; for what each pixel &#8220;shape&#8221; is).</p>
<p> </p>
<p><strong>This hook I wrote will output information about the clip</strong> (like &#8220;ffmpeg -i&#8221; will do, but in a format easier to parse) <strong>as well as information about the pixels</strong> (unlike ffmpeg).  So you can then know more about a clip if you are going to do things like pull single frames/thumbnails from it or convert it to another format.  We have been using this at Internet Archive for our movies for over a year and a half now and it works great!</p>
<p> </p>
<h3><a href="http://www.archive.org/~tracey/downloads/identify.c">C Code is here</a>.  </h3>
<p>There are some instructions for compiling with an ffmpeg source at the top of the C code.  (There is also an ubuntu-on-AMD compiled &#8220;.so&#8221; at that link by changing the suffix from &#8220;.c&#8221; to &#8220;.so&#8221;, FWIW)</p>
<p> </p>
<h2>Example invocation and output:</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-vhook</span> <span style="color: #ff0000;">&quot;/petabox/deriver/identify.so oldpresidio.mpeg&quot;</span>
FFmpeg version SVN-rUNKNOWN, Copyright <span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">2000</span>-<span style="color: #000000;">2007</span> Fabrice Bellard, et al.
  configuration: <span style="color: #660033;">--enable-gpl</span> <span style="color: #660033;">--enable-pp</span> <span style="color: #660033;">--enable-libvorbis</span> <span style="color: #660033;">--enable-libogg</span> <span style="color: #660033;">--enable-liba52</span> <span style="color: #660033;">--enable-libdts</span> <span style="color: #660033;">--enable-dc1394</span> <span style="color: #660033;">--enable-libgsm</span> <span style="color: #660033;">--disable-debug</span> <span style="color: #660033;">--enable-libfaac</span> <span style="color: #660033;">--enable-libfaad</span> <span style="color: #660033;">--enable-libmp3lame</span> <span style="color: #660033;">--enable-x264</span> <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>
  libavutil version: 49.3.0
  libavcodec version: 51.38.0
  libavformat version: 51.10.0
  built on Nov <span style="color: #000000;">30</span> <span style="color: #000000;">2007</span> <span style="color: #000000;">19</span>:09:<span style="color: #000000;">20</span>, <span style="color: #c20cb9; font-weight: bold;">gcc</span>: 4.1.3 <span style="color: #000000;">20070929</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>prerelease<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>Ubuntu 4.1.2-16ubuntu2<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Video: mpeg2video, yuv420p, 720x480, <span style="color: #007800;">q</span>=<span style="color: #000000;">2</span>-<span style="color: #000000;">31</span>, <span style="color: #000000;">8000</span> kb<span style="color: #000000; font-weight: bold;">/</span>s
width: <span style="color: #000000;">720</span>
height: <span style="color: #000000;">480</span>
aspect: <span style="color: #000000;">32</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">27</span>
fps: <span style="color: #000000;">29.97</span>
duration: 00:03:<span style="color: #000000;">05.2</span>
audio: <span style="color: #c20cb9; font-weight: bold;">true</span>
Failed to Configure <span style="color: #000000; font-weight: bold;">/</span>petabox<span style="color: #000000; font-weight: bold;">/</span>deriver<span style="color: #000000; font-weight: bold;">/</span>identify.so
Failed to add video hook <span style="color: #000000; font-weight: bold;">function</span>: <span style="color: #000000; font-weight: bold;">/</span>petabox<span style="color: #000000; font-weight: bold;">/</span>deriver<span style="color: #000000; font-weight: bold;">/</span>identify.so oldpresidio.mpeg</pre></div></div>

<div>The &#8220;failure&#8221; above at the end is deliberate/OK (it just makes sure ffmpeg stops and doesn&#8217;t try to transcode).</div>
<div>So we see that <a href="http://www.archive.org/details/oldpresidio">this video clip:</a></div>
<div style="background-color:black; text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="320" height="268" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.archive.org/flow/FlowPlayerLight.swf?config={embedded:true,showFullScreenButton:true,showMuteVolumeButton:true,showMenu:false,autoBuffering:false,autoPlay:false,initialScale:'fit',usePlayOverlay:false,playList:[{url:'oldpresidio/oldpresidio_512kb.mp4'}],controlBarGloss:'high',showVolumeSlider:true,baseURL:'http://www.archive.org/download/',loop:false,controlBarBackgroundColor:'0x000000',splashImageFile:'oldpresidio/oldpresidio.thumbs/oldpresidio_00000001.jpg'}" /><embed type="application/x-shockwave-flash" width="320" height="268" src="http://www.archive.org/flow/FlowPlayerLight.swf?config={embedded:true,showFullScreenButton:true,showMuteVolumeButton:true,showMenu:false,autoBuffering:false,autoPlay:false,initialScale:'fit',usePlayOverlay:false,playList:[{url:'oldpresidio/oldpresidio_512kb.mp4'}],controlBarGloss:'high',showVolumeSlider:true,baseURL:'http://www.archive.org/download/',loop:false,controlBarBackgroundColor:'0x000000',splashImageFile:'oldpresidio/oldpresidio.thumbs/oldpresidio_00000001.jpg'}"></embed></object></div>
<div>is indeed widescreen by the &#8220;aspect&#8221; line above (indicating the pixels are rectangular, not square) with value 32/27.</div>
<div>If we multiply the encoded image width of &#8220;720&#8243; by 32 and divide by 27, we get the magic/correct 853.33 (round up or down to nearest pixel).</div>
<div>We use this utility at Internet Archive to make user friendly formats like &#8220;h.264 .mp4&#8243; videos and &#8220;Ogg Theora .ogv&#8221; videos that get converted to the proper square pixel equivalent (and *not* messup widescreen videos 8-)</div>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2008/11/16/ffmpeg-hook-to-aid-with-rectangular-pixels/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Timelapse: OSS Secrets</title>
		<link>http://www.tikirobot.net/wp/2007/11/17/timelapse-oss-secrets/</link>
		<comments>http://www.tikirobot.net/wp/2007/11/17/timelapse-oss-secrets/#comments</comments>
		<pubDate>Sat, 17 Nov 2007 18:40:46 +0000</pubDate>
		<dc:creator>peliom</dc:creator>
				<category><![CDATA[photos]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[commandline]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[jhead]]></category>
		<category><![CDATA[timelapse]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/2007/11/17/timelapse-oss-secrets/</guid>
		<description><![CDATA[I thought I would share a couple of helpful GPL command lines that really get the job done if you want to animate a sequence of images. First (via Mike) is news of the jhead project. Unbelievably the ImageCapture.app application that ships with Mac OS X cannot handle more than several thousand images. ImageCapture.app will [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I would share a couple of helpful GPL command lines that really get the job done if you want to animate a sequence of images.</p>
<p>
First (via Mike) is news of the <a href="http://www.sentex.net/~mwandel/jhead/">jhead</a> project.  Unbelievably the ImageCapture.app application that ships with Mac OS X cannot handle more than several thousand images.  ImageCapture.app will copy all of the image files, but the number sequence wraps around and it overwrites thousands of the earlier images in the sequence!!  <a href="http://www.sentex.net/~mwandel/jhead/">jhead</a> fixes all that by renaming all of the image files based on the EXIF timestamp in the JPG file.  brilliant!  Here is the commandline he recommends:</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">jhead -nfpx<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #000000; font-weight: bold;">%</span>d-<span style="color: #000000; font-weight: bold;">%</span>H<span style="color: #000000; font-weight: bold;">%</span>M<span style="color: #000000; font-weight: bold;">%</span>S <span style="color: #660033;">-dt</span> <span style="color: #660033;">-ft</span> <span style="color: #007800;">$*</span></pre></div></div>

<p>
Now you have a nifty sequence of hopefully hi-res images.  One of the cool things about timelapse is you can shoot 5 megapixel images and then scale them down to NTSC (720&#215;480) or HD (1920&#215;1024) resolution.  In fact if some crazy 5 megapixel video format comes out 10 years from now, you will be able to support that as well! (As an aside, the <a href="http://www.dolby.com/professional/motion_picture/solutions_digitalcinemas.html">Digital Cinema</a> releases that are dribbling out to theaters these days are at 2,000 pixels wide.  Eventually that will go up to 4,000 pixels wide, but there are not currently projectors that can support that resolution!)</p>
<p>
So anyway, megapixels.  How do you scale the images without fudging it up?  A little known fact is that most video that looks crappy because of &#8220;the video compression&#8221; actually looks crappy because of the way the video was scaled down to its postage stamp resolution.  So here is what you do: Use the fantastic <a href="http://www.imagemagick.org/">ImageMagick</a> &#8220;convert&#8221; command to scale your images down at even higher quality than photoshop! for free! and without using a dumb GUI scripting language.  You can read about image scaling in <a href="http://www.xs4all.nl/~bvdwolf/main/foto/down_sample/down_sample.htm">laborious detail</a> or you can just use this command line:</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">convert  <span style="color: #660033;">-filter</span> sinc <span style="color: #660033;">-resize</span> 720x480 foo.JPG foo_ntsc.JPG</pre></div></div>

<p>
I put the following bash script into a makefile to process my timelapse library:</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*</span>; <span style="color: #000000; font-weight: bold;">do</span>  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>  <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$i</span>/ntsc_jpg/&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>  <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$i</span>/ntsc_jpg&quot;</span>; <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> orig_jpg<span style="color: #000000; font-weight: bold;">/*</span>.JPG; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$i</span>; <span style="color: #7a0874; font-weight: bold;">echo</span> convert  <span style="color: #660033;">-filter</span> sinc <span style="color: #660033;">-resize</span> 720x480 ntsc_jpg<span style="color: #000000; font-weight: bold;">/`</span><span style="color: #c20cb9; font-weight: bold;">basename</span> <span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">`</span>;  <span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">fi</span> <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>And finally I would like to share the &#8220;ghetto HD&#8221; format that VJ Science came up with for doing 16:9 format on an XGA projector.  This command includes cropping to get my 1600&#215;1200 images into 16:9 aspect ratio &#8230; if you have a different source resolution, I&#8217;m going to leave it to you multiply your image width by 9 and divide by 16 to figure out the how many pixels to crop on top and bottom.  The idea is to crop first and then scale down.  Although I guess in terms of quality it doesn&#8217;t matter the order.</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">convert  <span style="color: #660033;">-crop</span> 1600x900+<span style="color: #000000;">0</span>+<span style="color: #000000;">150</span> <span style="color: #660033;">-filter</span> sinc <span style="color: #660033;">-resize</span> 1024x576 foo.JPG foo_xga.JPG</pre></div></div>

<p>
Now you&#8217;ve got a nifty sequence of beautifully scaled images.  Time to make video!  Which of the <a href="http://www.fourcc.org/codecs.php">7 bajillion </a> video codecs are you going to use?  My recommendation is to use <a href="http://ffmpeg.mplayerhq.hu/">ffmpeg</a> to make an mpeg-2 &#8220;master&#8221; that you can distribute by uploading to youtube, archive.org, and so on.  ffmpeg understands image sequences! So here is a quick way to get your mpeg-2 video (no audio).  This command assumes your images are named like &#8220;IMG_0001.JPG&#8221; and so on &#8230; I know that doesn&#8217;t jive with the <a href="http://www.sentex.net/~mwandel/jhead/">jhead</a> naming I&#8217;ve outlined above, but you are a <a href="http://blackhole.sk/big-unix-haxor">big unix haxor</a> and can figure that out.</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>  <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;IMG_%04d.JPG&quot;</span> <span style="color: #660033;">-b</span> <span style="color: #000000;">10000</span> test.m2v</pre></div></div>

<p>
For my purpose I am building up a video library for doing VJ/video mixing stuff.  In this use case video quality and decode speed is much more important than bitrate.  Since decoding mpeg-2 &#8220;I&#8221; frames is about 3x faster than decoding &#8220;P&#8221; or &#8220;B&#8221; (difference) frames I use this command to get a high quality I-frame only mpeg-2 stream:</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>  <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;IMG_%04d.JPG&quot;</span> <span style="color: #660033;">-vcodec</span> mpeg2video <span style="color: #660033;">-intra</span> <span style="color: #660033;">-qscale</span> <span style="color: #000000;">4</span> test.m2v</pre></div></div>

<p>
You can get higher quality by dropping qscale down even lower, but I think if you do qscale=1 your video basically won&#8217;t be compressed at all :-)  rajbot?</p>
<p>
So there you have it! The basics of an Open Source timelapse production pipeline.  I use these tools on <a href="http://finkproject.org/">Mac OS X</a>.  Of course they are available on <a href="http://www.gnu.org/gnu/linux-and-gnu.html">GNU/Linux</a>.  And you can also get them working under windows using <a href="http://www.cygwin.com/">Cygwin</a> &#8230; We need more timelapse!</p>
<p>
<a href="http://www.sentex.net/~mwandel/jhead/">Link</a> to jhead project<br />
<a href="http://www.imagemagick.org/">Link</a> to ImageMagick project<br />
<a href="http://ffmpeg.mplayerhq.hu/">Link</a> to FFmpeg project</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2007/11/17/timelapse-oss-secrets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

