<?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>biotext.org.uk &#187; audio</title>
	<atom:link href="http://biotext.org.uk/tag/audio/feed/" rel="self" type="application/rss+xml" />
	<link>http://biotext.org.uk</link>
	<description>Not a typewriter</description>
	<lastBuildDate>Sat, 05 Feb 2011 14:18:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Awesome ways to save audio streams for future listening</title>
		<link>http://biotext.org.uk/awesome-ways-to-save-audio-streams-for-future-listening/</link>
		<comments>http://biotext.org.uk/awesome-ways-to-save-audio-streams-for-future-listening/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 14:16:46 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[audio]]></category>

		<guid isPermaLink="false">http://biotext.org.uk/?p=383</guid>
		<description><![CDATA[For a start, you can use mplayer to save the stream to a local disk: mplayer -bandwidth 10000000000 -cache 32 -dumpstream -dumpfile output_file.ra 'rtsp://some.server/some_stream' The huge bandwidth parameter will make sure that no throttling happens (at the client side anyway) &#8212; i.e. you can download hours of audio in a few seconds. The dumpstream parameter [...]]]></description>
			<content:encoded><![CDATA[<p>For a start, you can use <a href="http://www.mplayerhq.hu/">mplayer</a> to save the stream to a local disk:</p>
<p><code>mplayer -bandwidth 10000000000 -cache 32 -dumpstream -dumpfile output_file.ra 'rtsp://some.server/some_stream'</code></p>
<p>The huge bandwidth parameter will make sure that no throttling happens (at the client side anyway) &#8212; i.e. you can download hours of audio in a few seconds.</p>
<p>The dumpstream parameter writes the stream out byte-for-byte in the format it arrives in, e.g. RealAudio in the example above. But you can use <a href="http://ffmpeg.org/">ffmpeg</a> to decode a RealAudio stream into a wav, and <a href="http://lame.sourceforge.net/">lame</a> to re-encode it as an mp3, on-the-fly:</p>
<p><code>ffmpeg -i output_file.ra -f wav - | lame - output_file.mp3</code></p>
<p>N.B. That can be quite processor-intensive, but hey, what&#8217;s dual-core for??</p>
<p>ffmpeg will tell you what the bitrate of the stream is, so you can use lame&#8217;s -b switch to make sure you&#8217;re not re-encoding it at a vastly higher quality than it&#8217;s actually capable of.</p>
<p>e.g. for spoken word:</p>
<p><code>ffmpeg -i output_file.ra -f wav - | lame -b 64 -f - output_file.mp3</code></p>
<p>(-f = fast mode, slightly quicker encoding for less quality per bit)</p>
<p>Or if you&#8217;re feeling especially boffiny, use a named pipe so you don&#8217;t have to save the original stream to the hard disk:</p>
<p>&#8230; which is apparently possible but I haven&#8217;t got it to work yet. If you know how, leave a comment before I figure it out :-)</p>
<p>Andrew.</p>
]]></content:encoded>
			<wfw:commentRss>http://biotext.org.uk/awesome-ways-to-save-audio-streams-for-future-listening/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

