<?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>rwec.co.uk &#187; avi</title>
	<atom:link href="http://rwec.co.uk/blog/tag/avi/feed/" rel="self" type="application/rss+xml" />
	<link>http://rwec.co.uk/blog</link>
	<description>Rowan&#039;s World, Et Cetera</description>
	<lastBuildDate>Sun, 27 Nov 2011 19:13:17 +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>A script for rotating digital camera videos!</title>
		<link>http://rwec.co.uk/blog/2009/09/rotating-digital-camera-videos/</link>
		<comments>http://rwec.co.uk/blog/2009/09/rotating-digital-camera-videos/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 20:37:25 +0000</pubDate>
		<dc:creator>Rowan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[avi]]></category>
		<category><![CDATA[digital camera]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[longphoto]]></category>
		<category><![CDATA[mjpeg]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://rwec.co.uk/blog/?p=45</guid>
		<description><![CDATA[A while ago, after flickr launched the ability to upload "long photos", I shot a clip of waves crashing on the beach, and wanted to share it. But it seems there is no easy way of rotating a video to sit upright - so, to cut a long story short, I wrote one: welcome to VidRotate!]]></description>
			<content:encoded><![CDATA[<p>A while ago, after flickr launched the ability to <a href="http://www.flickr.com/help/video/">upload "long photos"</a>, I shot a clip of waves crashing on the beach, and wanted to share it. But there was a catch: being taken on a compact camera, it felt perfectly natural to turn it upright, and shoot the video in a "portrait" orientation. So, like a lot of my photos, it needed turning 90° clockwise - but unlike a photo, there was no obvious way to do this.</p>
<p>I hunted around at the time, and found that while plenty of players can transform video <em>during playback</em> (my copy of <a href="http://www.videolan.org/">VLC</a> seems to have got stuck, and now rotates <em>everything</em>!), few video editing tools could save a rotated video. I finally managed it with a power-utility which required me to import the video, tweak a large number of output options I didn't understand, and hope the result wasn't too mangled. Hardly ideal.</p>
<p>But while reading up on it, I discovered that most digital cameras - including my Casio Ezilim EX-Z1050 - shoot videos in a format called "Motion JPEG" or "MJPEG", which is basically a bunch of JPEG pictures stuck together. So if I could extract the images from the video, they should be easy to rotate, and all I'd need to do was stick them together again...</p>
<p>Well, yesterday I was playing with lossless image rotation using <a href="http://jpegclub.org/jpegtran/">jpegtran</a>, and then managed to find <a href="http://mjpeg.sourceforge.net/">MJPEG tools</a> - a bunch of commandline tools for manipulating MJPEG data, actually designed for video capture utilities. And guess what? <strong>It works!</strong> I can split the AVI file from my camera into a bunch of JPEGs, rotate them, and stitch them back together, with minimal loss of quality!</p>
<p>Oddly, the biggest sticking point was sound - the mjpegtools utilities can't see the sound stream in my source files. In fact, the only utility I could was <a href="http://ffmpeg.org/">FFmpeg</a>, which at over 10 times the size of all the other tools put together is like the proverbial sledgehammer to the sound streams nut.</p>
<p>So, with my meagre Windows batch-scripting skills, I've put together something which might, just about, be useful, and called it <strong><a href="http://rwec.co.uk/vidrotate/">VidRotate</a></strong>. <strong>Go forth, download!</strong> But beware - I make absolutely <em>no</em> guarantee that it won't blow your computer up at this stage...</p>
]]></content:encoded>
			<wfw:commentRss>http://rwec.co.uk/blog/2009/09/rotating-digital-camera-videos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

