<?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>crimulus-dot-com &#187; ffmpeg</title>
	<atom:link href="http://www.crimulus.com/tag/ffmpeg/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.crimulus.com</link>
	<description>A blog; ineptly autobiographical</description>
	<lastBuildDate>Sun, 29 Jan 2012 10:20:00 +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>Linux BASH Script: Convert mp3 to avi with static image (command line)</title>
		<link>http://www.crimulus.com/2010/01/21/linux-bash-script-convert-mp3-to-avi-with-static-image-command-line/</link>
		<comments>http://www.crimulus.com/2010/01/21/linux-bash-script-convert-mp3-to-avi-with-static-image-command-line/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 04:04:54 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[avi]]></category>
		<category><![CDATA[CONFIRM]]></category>
		<category><![CDATA[exit]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[fi fi]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[file avi]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[image file]]></category>
		<category><![CDATA[linux distro]]></category>
		<category><![CDATA[linux mp3 to avi]]></category>
		<category><![CDATA[lt image]]></category>
		<category><![CDATA[mp3 to video]]></category>
		<category><![CDATA[mp32avi]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[png image]]></category>
		<category><![CDATA[source image]]></category>
		<category><![CDATA[static image]]></category>
		<category><![CDATA[upload mp3 to youtube]]></category>

		<guid isPermaLink="false">http://www.coffeecuphalfmoons.com/?p=692</guid>
		<description><![CDATA[This is a script I made to take advantage of the ffmpeg package in linux to quickly convert an mp3 to avi using a static image. I personally use this technique for uploading my songs to YouTube. I originally found the conversion command here. All you need is a linux distro with ffmpeg installed, a [...]]]></description>
			<content:encoded><![CDATA[<p>This is a script I made to take advantage of the ffmpeg package in linux to quickly convert an mp3 to avi using a static image.  I personally use this technique for uploading <a href="http://www.youtube.com/user/crimulus">my songs to YouTube</a>.  I originally found the conversion command <a title="[all variants] Convert mp3 to avi" href="http://ubuntuforums.org/archive/index.php/t-1244112.html">here</a>.</p>
<p>All you need is a linux distro with <a href="http://ffmpeg.org/index.html">ffmpeg</a> installed, a jpeg or png image, and an mp3.<em> Note: It is highly likely other image formats, audio formats, and output video formats will work, but I have only used jpeg/png+mp3+avi and so cannot attest to results otherwise.</em></p>
<p>Usage: bash mp32avi.sh &lt;image_file&gt; &lt;mp3_file&gt; &lt;output_file.avi&gt;</p>
<p><strong>Code (mp32avi.sh): </strong></p>
<pre>#!/bin/bash
FFMPEG=`which ffmpeg`
if [ "$FFMPEG" = "" ] ; then
	echo "Please install ffmpeg.";
	exit 0;
fi
if [ $# != 3 ] ; then
	echo "Usage: $0 &lt;image_file&gt; &lt;mp3_file&gt; &lt;output_file.avi&gt;";
	exit 0;
fi
if [ ! -f $1 ] ; then
	echo "Source image '$1' not found.";
	exit 0;
fi
if [ ! -f $2 ] ; then
	echo "Source mp3 '$2' not found.";
	exit 0;
fi
if [ -f $3 ] ; then
	echo "Output file '$3' exists.  Overwrite? (y/n)";
	read CONFIRM
	if [ "$CONFIRM" == "y" ] ; then
		echo "Overwriting '$3'"
	else
		if [ "$CONFIRM" == "Y" ] ; then
			echo "Overwriting '$3'"
		else
			echo "Operation canceled.";
			exit 0;
		fi
	fi
fi
TIME=`$FFMPEG -i $2 |&amp; grep 'Duration' | awk '{ print $2; }' | sed -e 's/,//g'`
$FFMPEG -loop_input -i $1 -i $2 -acodec copy -y -t $TIME $3</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.crimulus.com/2010/01/21/linux-bash-script-convert-mp3-to-avi-with-static-image-command-line/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

