<?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>Idius Land! &#187; FFmpeg</title>
	<atom:link href="http://www.idius.net/tag/ffmpeg/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.idius.net</link>
	<description>Nathaniel Stickley&#039;s online playground</description>
	<lastBuildDate>Tue, 01 Jun 2010 07:29:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=8224</generator>
		<item>
		<title>Useful Syntax</title>
		<link>http://www.idius.net/useful-syntax/</link>
		<comments>http://www.idius.net/useful-syntax/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 06:01:52 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[regular update]]></category>
		<category><![CDATA[FFmpeg]]></category>

		<guid isPermaLink="false">http://www.idius.net/?p=1275</guid>
		<description><![CDATA[Although I will only be using still frames from Splotch in my immediate research, it will be useful to have the ability to make movies.  Splotch can interpolate between GADGET snapshots and output still frames.  The syntax for using FFmpeg to  create a movie from still frames is ffmpeg -i image-base-name-%0Nd.xxx -b (bit rate)k -r [...]]]></description>
			<content:encoded><![CDATA[<p>Although I will only be using still frames from Splotch in my immediate research, it will be useful to have the ability to make movies.  Splotch can interpolate between GADGET snapshots and output still frames.  The syntax for using FFmpeg to  create a movie from still frames is</p>
<pre>ffmpeg -i image-base-name-%0Nd.xxx -b (bit rate)k -r (frame rate) output-file.xxx</pre>
<p>Example:</p>
<pre>ffmpeg -i IMG-%04d.JPG -b 512k -r 30 out.avi</pre>
<p>which takes files named IMG-0001.JPG, IMG-0002.JPG, etc. and makes an output file named out.avi with 30 frames per second and a bit rate of 512kbps. The 04d specifies that there are four digits in the file name.</p>
<p>Although the viewing angle and camera position can be controlled using the Splotch parameter file, it may be useful to automatically crop images when making a movie for demonstration / outreach purposes.  The syntax for cropping a directory full of jpeg images using ImageMagick is</p>
<p><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">convert -crop &#8216;*.jpg[<strong>width</strong>x<strong>height</strong>+<strong>xoffset</strong>+<strong>yoffset</strong>]&#8216; output_%04d.jpg</span></p>
<p>The x and y offsets are the coordinates of the upper left corner of the crop box with the specified width and height.  Here’s an example:</p>
<pre>convert -crop '*.jpg[<strong>1280</strong>x<strong>720</strong>+<strong>122</strong>+<strong>60</strong>]' img_%04d.jpg</pre>
<p>Which creates images named img_0001.jpg, img_0002.jpg, img_0003.jpg, etc.  Of course any image format can be cropped and ImageMagick can convert between many different image formats.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.idius.net/useful-syntax/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
