<?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>Intrepid Blog &#187; gstreamer</title>
	<atom:link href="http://blog.affien.com/archives/tag/gstreamer/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.affien.com</link>
	<description>A few thoughts</description>
	<lastBuildDate>Mon, 01 Mar 2010 00:58:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>GStreamer: accurate duration</title>
		<link>http://blog.affien.com/archives/2009/04/19/gstreamer-accurate-duration/</link>
		<comments>http://blog.affien.com/archives/2009/04/19/gstreamer-accurate-duration/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 13:26:01 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[duration]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.affien.com/?p=371</guid>
		<description><![CDATA[When decoding, for instance, a variable-bitrate MP3, gstreamer reported durations are, to say the least, estimates.  I&#8217;ve tried to get a better result in a few ways.  First off, some files yield a duration tag, but even if you&#8217;re lucky and it is there, there are no guaranties about precision.  After that [...]]]></description>
			<content:encoded><![CDATA[<p>When decoding, for instance, a variable-bitrate MP3, gstreamer reported durations are, to say the least, estimates.  I&#8217;ve tried to get a better result in a few ways.  First off, some files yield a <code>duration</code> tag, but even if you&#8217;re lucky and it is there, there are no guaranties about precision.  After that I tried seeking to the end (<code>GST_SEEK_END</code>) of the stream and querying the position, which gstreamer didn&#8217;t like.  Finally, routing the audio into a <code>fakesink</code>, waiting for the end of stream and then querying for the position gives the right result.  It&#8217;s not the prettiest method, but it works.</p>
<p><a href='http://blog.affien.com/wp-content/uploads/2009/04/gst-duration.py'>This</a> is a Python script that prints the duration of a media to stdout.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2009/04/19/gstreamer-accurate-duration/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
