<?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>Die Welt ist gar nicht so. &#187; mencoder</title>
	<atom:link href="http://blog.dieweltistgarnichtso.net/tag/mencoder/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.dieweltistgarnichtso.net</link>
	<description>Sie ist ganz anders.</description>
	<lastBuildDate>Mon, 23 Sep 2013 15:41:20 +0000</lastBuildDate>
	<language>de-DE</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.35</generator>
	<item>
		<title>Fixing dropped frames in digital video</title>
		<link>http://blog.dieweltistgarnichtso.net/fixing-dropped-frames-in-digital-video</link>
		<comments>http://blog.dieweltistgarnichtso.net/fixing-dropped-frames-in-digital-video#comments</comments>
		<pubDate>Sun, 10 Jun 2012 23:32:28 +0000</pubDate>
		<dc:creator><![CDATA[erlehmann]]></dc:creator>
				<category><![CDATA[Bastelei]]></category>
		<category><![CDATA[In eigener Sache]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[dv]]></category>
		<category><![CDATA[fotografiona]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[spackeriade]]></category>

		<guid isPermaLink="false">http://blog.dieweltistgarnichtso.net/?p=4795</guid>
		<description><![CDATA[Occasionally, when capturing DV, data is generated faster than it can be saved, thus audio and video frames are dropped. The resulting small gaps in the recording are noticeable at playback time as footage appears sped up and choppy, AV-sync &#8230; <a href="http://blog.dieweltistgarnichtso.net/fixing-dropped-frames-in-digital-video">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>
Occasionally, when capturing <a href="http://en.wikipedia.org/wiki/DV">DV</a>, data is generated faster than it can be saved, thus audio and video frames are dropped. The resulting small gaps in the recording are noticeable at playback time as footage appears sped up and choppy, <a href="http://en.wikipedia.org/wiki/Audio_to_video_synchronization"><abbr title="Audio-Video">AV</abbr>-sync</a> being lost occasionally. For most people, those recordings are unwatchable.
</p>
<p>
Obviously the lost data cannot be recovered. The symptoms however – stuttering and uncomfortable playback speed – can be remedied somewhat by interpolating the missing audio frames. Assuming a file with a nominal framerate of 25 <a href="http://en.wikipedia.org/wiki/Frame_rate"><abbr title="frames per second">FPS</abbr></a> that had every second frame dropped, this can easily be achieved using <a href="http://www.mplayerhq.hu/"><i>mplayer</i></a> for playback at half speed:
</p>
<kbd>mplayer -af scaletempo=stride=16:overlap=.25:search=10 -speed 0.5 -fps 25 example.dv</kbd>
<p>
The important piece is the <a href="http://scaletempo.sourceforge.net/0/"><i>scaletempo</i></a> filter, which can <a href="http://en.wikipedia.org/wiki/Audio_timescale-pitch_modification">change audio speed without altering the pitch</a>. Without it, speech played at half its original speed has more resemblance to <a href="http://en.wikipedia.org/wiki/Goa%27uld"><i>Goa&#8217;uld</i></a> utterances than to real-world language. Unfortunately, this approach is limited by the <a href="http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem">sampling theorem</a>: If too many audio frames are missing, the result will sound like it was created using a bad mobile phone.
</p>
<p>
Though missing video frames could also be interpolated to smooth jerky movements, simply duplicating frames is adequate for real-world usage. The following shell script utilizes <i>mplayer</i> and <i>mencoder</i> to interpolate audio and duplicate video frames, creating a file that should be easier on viewers&#8217; eyes and ears than the original – broken – recording.
</p>
<kbd>
mplayer -af scaletempo=stride=16:overlap=.25:search=10 -speed 0.5 -fps 25 example.dv -vc null -vo null -ao pcm:waveheader:file=example.wav &amp;&amp; mencoder -fps 12.5 -ofps 25 -ovc copy -oac copy -o example-fixed.dv example.dv -audiofile example.wav &#038;&#038; rm example.wav
</kbd>
<p>
For an example recording processed using this method, see the <a href="http://daten.dieweltistgarnichtso.net/video/talks/fickileaks.ogv">video</a> of the <a href="http://lanyrd.com/2011/spack0/smrrw/"><i>Fickileaks</i> talk</a> me and <a href="http://mobile.twitter.com/fotografiona"><i>fotografiona</i></a> gave at the <a href="http://blog.spackeria.org/0-spackeriade/"><i>Spackeriade</i></a>; the original file was missing about every second frame.
</p>]]></content:encoded>
			<wfw:commentRss>http://blog.dieweltistgarnichtso.net/fixing-dropped-frames-in-digital-video/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://daten.dieweltistgarnichtso.net/video/talks/fickileaks.ogv" length="148123843" type="video/ogg" />
		</item>
	</channel>
</rss>
