<?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>Long-term Memory &#187; Multimedia</title>
	<atom:link href="http://blog.dest-unreach.be/category/multimedia/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.dest-unreach.be</link>
	<description>A collection of note-to-self&#039;s</description>
	<lastBuildDate>Sun, 29 Jan 2012 16:05: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>Dreambox DM8000</title>
		<link>http://blog.dest-unreach.be/2010/01/02/dreambox-dm8000</link>
		<comments>http://blog.dest-unreach.be/2010/01/02/dreambox-dm8000#comments</comments>
		<pubDate>Sat, 02 Jan 2010 15:48:21 +0000</pubDate>
		<dc:creator>Niobos</dc:creator>
				<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[dreambox]]></category>
		<category><![CDATA[DVB-S]]></category>
		<category><![CDATA[DVB-T]]></category>
		<category><![CDATA[MythTV]]></category>

		<guid isPermaLink="false">http://blog.dest-unreach.be/?p=1517</guid>
		<description><![CDATA[Just before the holidays, we got ourselves a Dreambox DM8000, an HD-capable set-top box and personal video recorder. The hardware features look good: twin DVB-S2 tuner build in, 2 free slots for additional tuners, e.g. for DVB-T or -C reception. It has 4 CI (Common Interface) slots for Conditional Access Modules (CAM&#8217;s), and 2 smartcard [...]]]></description>
			<content:encoded><![CDATA[<p>Just before the holidays, we got ourselves a <a href="http://www.dream-multimedia-tv.de/en/dm-8000-hd-pvr">Dreambox DM8000</a>, an HD-capable set-top box and personal video recorder. The hardware features look good: twin DVB-S2 tuner build in, 2 free slots for additional tuners, e.g. for DVB-T or -C reception. It has 4 CI (Common Interface) slots for Conditional Access Modules (CAM&#8217;s), and 2 smartcard readers. Under the hood is a 400MHz MIPS processor, running a special linux, named &#8220;Enigma2&#8243; from a flash-chip. An optional harddisk and (slimline) DVD-reader are also available, but you have to build them in yourself. Doing so was really easy, as all screws and connectors are provided.</p>
<p><a href="http://blog.dest-unreach.be/wp-content/uploads/2009/12/dm8000-front.JPG"><img class="alignnone size-medium wp-image-1523" title="Dreambox DM8000 front" src="http://blog.dest-unreach.be/wp-content/uploads/2009/12/dm8000-front-300x90.jpg" alt="" width="300" height="90" /></a> <a href="http://blog.dest-unreach.be/wp-content/uploads/2009/12/dm8000-back.JPG"><img class="alignnone size-medium wp-image-1522" title="Dreambox DM8000 back" src="http://blog.dest-unreach.be/wp-content/uploads/2009/12/dm8000-back-300x70.jpg" alt="" width="300" height="70" /></a></p>
<p><a href="http://blog.dest-unreach.be/wp-content/uploads/2009/12/dm8000-inside.JPG"><img class="alignnone size-medium wp-image-1525" title="Dreambox DM8000 inside" src="http://blog.dest-unreach.be/wp-content/uploads/2009/12/dm8000-inside-300x209.jpg" alt="Dreambox DM8000 inside" width="300" height="209" /></a> <a href="http://blog.dest-unreach.be/wp-content/uploads/2009/12/dm8000-inside-filled.JPG"><img class="alignnone size-medium wp-image-1524" title="Dreambox DM8000 inside, filled" src="http://blog.dest-unreach.be/wp-content/uploads/2009/12/dm8000-inside-filled-300x205.jpg" alt="Dreambox DM8000 inside, filled" width="300" height="205" /></a></p>
<p><a href="http://blog.dest-unreach.be/wp-content/uploads/2010/01/dm8000-screenshot.jpg"><img class="alignnone size-full wp-image-1548" title="dm8000-screenshot" src="http://blog.dest-unreach.be/wp-content/uploads/2010/01/dm8000-screenshot.jpg" alt="" width="720" height="405" /></a></p>
<p>The installed software is descent, tunes fast and didn&#8217;t crash (yet). It supports decoding multiple channels from a single multiplex (known as <a href="http://www.mythtv.org/wiki/Record_multiple_channels_from_one_multiplex">multirec</a> in the <a href="http://www.mythtv.org/">MythTV</a>-world). The <a href="http://www.dream-multimedia-tv.de/download/instruction_manual_dm8000_06-02-2009.pdf">manual</a> (<a href="http://blog.dest-unreach.be/wp-content/uploads/2010/01/dm8000-manual.pdf">local copy</a>) could be more thorough, though. The recording-scheduling simply sucks, especially if you&#8217;re used to <a href="http://www.mythtv.org/docs/mythtv-HOWTO-12.html">MythTV&#8217;s scheduling</a>.</p>
<p><span id="more-1517"></span>To watch <a href="http://tvvlaanderen.be/">TV Vlaanderen</a>, you need a smartcard and the corresponding CAM. The physical CAM, however <a href="http://www.mythportal.be/node/47#comment-209">doesn&#8217;t seem capable (dutch link)</a> of decoding multiple streams in parallel. So we switched to an alternative firmware&#8230;</p>
<p>I chose to use the <a href="http://openpli.pli-images.org/">openPLI</a> image. I&#8217;m currently using the <a href="http://www.pli-images.org/modules/file_downloads/file_downloads.php?fd_id=1&amp;dir=/dm8000">daily snapshot</a> 2009-12-07 (<a href="http://blog.dest-unreach.be/wp-content/uploads/2010/01/OpenPLi-unstable-dm8000-20091207.zip">local copy</a>). Flashing the device was easy. The manufacturer even provides a <a href="http://www.dream-multimedia-tv.de/en/dm8000-flashing-dreamup">procedure</a> and <a href="http://www.dream-multimedia-tv.de/download/DreamUP.zip">tool</a> (<a href="http://blog.dest-unreach.be/wp-content/uploads/2010/01/DreamUP-1.3.3.4.zip">local copy of version 1.3.3.4</a>) to do it.</p>
<p>After flashing with the new firmware, I installed the CCcam plugin, which is a software implementation of the CAM (commonly referred to as softCAM). I&#8217;m not sure what the legal status of this setup is, but since it still requires an official (and payed-for) smartcard, I guess it&#8217;s ok.</p>
<h3>Additional notes</h3>
<p>When using the networkbrowser (also a plugin), I couldn&#8217;t get my NFS-mount to work properly. It seems that the dreambox-configuration defaults to NFS over TCP, which somehow doesn&#8217;t play well with my server. Explicitly configuring the mount to use UDP solved the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dest-unreach.be/2010/01/02/dreambox-dm8000/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>x264 presets</title>
		<link>http://blog.dest-unreach.be/2009/09/08/x264-presets</link>
		<comments>http://blog.dest-unreach.be/2009/09/08/x264-presets#comments</comments>
		<pubDate>Tue, 08 Sep 2009 12:32:34 +0000</pubDate>
		<dc:creator>Niobos</dc:creator>
				<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[h264]]></category>

		<guid isPermaLink="false">http://blog.dest-unreach.be/?p=1417</guid>
		<description><![CDATA[x264 is an open source h.264 encoder. Since r1177 it includes a preset system. The presets give an easy way to balance quality vs encoding speed, ranging from placebo (highest quality) to ultrafast (lowest quality). I wanted to get an idea what kind of quality/time gains could be archived with these settings. Usually the first [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.videolan.org/developers/x264.html">x264</a> is an open source <a href="http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC">h.264</a> encoder. Since r1177 it includes a preset system. The <a href="http://mewiki.project357.com/index.php?title=X264_Settings#preset">presets</a> give an easy way to balance quality vs encoding speed, ranging from placebo (highest quality) to ultrafast (lowest quality).</p>
<p>I wanted to get an idea what kind of quality/time gains could be archived with these settings. Usually the first steps of extra quality are barely noticeable in encoding time, while the last bits of quality cost significantly more. To verify this statement and to quantify it, I encoded 2 video sequences at 2 resolutions using all 9 available presets. I used <a href="http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio">PSNR</a> as metric. I&#8217;d be the first to admit that PSNR does not correspond to quality, but it correlates reasonably well.</p>
<p><span id="more-1417"></span>The results in short: the &#8220;slower&#8221; profile seems to give very high quality (-0.1dB PSNR loss) while reducing encoding time by roughly a factor 4! &#8220;veryfast&#8221; gives a substantial quality-boost (2.1dB PSNR) while only requiring 15% more encode time compared to ultrafast.</p>
<p>This graph shows the relative speed gain/loss vs PSNR gain/loss. The &#8220;slower&#8221; profile is taken as a reference.<br />
<img class="alignnone size-full wp-image-1418" title="x264-preset" src="http://blog.dest-unreach.be/wp-content/uploads/2009/09/x264-preset.png" alt="x264-preset" width="759" height="450" /></p>
<h3>The presets</h3>
<p>Since they seem to be <a href="http://mewiki.project357.com/index.php?title=X264_Settings&amp;diff=next&amp;oldid=3823">removed from the wiki</a>, here is a copy:</p>
<ul>
<li>ultrafast: subme 0, ref 1, me dia, b-adapt 0, partitions none, trellis 0, bframes 0, weightp 0, no-mixed-refs, no-mbtree, no-scenecut, no-deblock, no-cabac, no-8x8dct, aq-mode 0</li>
<li>veryfast: subme 1, ref 1, me dia, partitions i8x8,i4x4, trellis 0, weightp 0, no-mixed-refs, no-mbtree</li>
<li>faster: subme 4, ref 2, weightp 1, no-mixed-refs, no-mbtree</li>
<li>fast: subme 6, ref 2, rc-lookahead 30</li>
<li>medium: No changes</li>
<li>slow: subme 8, ref 5, me umh, b-adapt 2, direct auto, rc-lookahead 50</li>
<li>slower: subme 9, ref 8, me umh, b-adapt 2, direct auto, rc-lookahead 60, partitions all, trellis 2</li>
<li>veryslow: subme 10, ref 16, me umh, b-adapt 2, direct auto, rc-lookahead 60, partitions all, trellis 2, bframes 8, merange 24</li>
<li>placebo: subme 10, ref 16, me tesa, b-adapt 2, direct auto, rc-lookahead 60, partitions all, trellis 2, bframes 16, no-fast-pskip, slow-firstpass</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dest-unreach.be/2009/09/08/x264-presets/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>h264 limits for iPhone</title>
		<link>http://blog.dest-unreach.be/2009/09/08/h264-limits-for-iphone</link>
		<comments>http://blog.dest-unreach.be/2009/09/08/h264-limits-for-iphone#comments</comments>
		<pubDate>Tue, 08 Sep 2009 11:18:27 +0000</pubDate>
		<dc:creator>Niobos</dc:creator>
				<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[h264]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.dest-unreach.be/?p=1413</guid>
		<description><![CDATA[The internet is filled with guides and howto&#8217;s for getting video on you iPhone. The specs specify the iPhone to support h.264, baseline profile, level 3.0. Translated this means: No B-frames No CABAC No weighted predictions No 8&#215;8 DCT Max resolution around 640&#215;640 (technically 1620 MacroBlocks, 16&#215;16 each) Max 25fps at that resolution (technically 40500 [...]]]></description>
			<content:encoded><![CDATA[<p>The internet is filled with guides and howto&#8217;s for getting video on you iPhone. The <a href="http://www.apple.com/iphone/specs.html">specs</a> specify the iPhone to support h.264, baseline profile, level 3.0. Translated this means:</p>
<ul>
<li>No  B-frames</li>
<li>No  CABAC</li>
<li>No weighted predictions</li>
<li>No 8&#215;8 DCT</li>
<li>Max resolution around 640&#215;640 (technically 1620 MacroBlocks, 16&#215;16 each)</li>
<li>Max 25fps at that resolution (technically 40500 MacroBlocks per second)</li>
<li>Max 10Mbps</li>
</ul>
<p>The iPhone imposes some extra limitations:</p>
<ul>
<li>Max 640&#215;480, 30fps</li>
<li>Max 2.5Mbps</li>
</ul>
<p><a href="http://www.mail-archive.com/iphonewebdev@googlegroups.com/msg01257.html">Most</a> <a href="http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/">guides</a> on the internet additionally force the number of reference frames down to 1 (<a href="http://ffmpeg.org/">ffmpeg</a>&#8216;s -refs parameter), although I could no find any specsheet imposing this limit. So I decided to test this.</p>
<p><span id="more-1413"></span>Testing the number of usable reference frames isn&#8217;t easy. For starters, you can&#8217;t force an encoder to use a certain frame as reference, you can only <em>allow</em> it to use that many if it sees fit. However, by hand-picking the input frames, you can create a frame sequence that almost certainly will use the reference frame you want. Simply take N frames from different shots. Just concatenate these N frames after each other in a loop: frame 0 is exactly the same as frame N. The encoder will try to minimize the residual image by choosing the reference frame which is most similar. Since the N frames are totally different, the encoder will almost certainly choose frame I-N as a reference for frame I.</p>
<p>Upon decoding the stream, the decoder will fetch the referenced frame from its Decoded Picture Buffer (DPB) and work from there. That is, as long as the referenced frame is still available. If the referenced frame is no longer available, the decoding will fail. Depending on the decoder, it might stop, crash, or attempt to cover up it&#8217;s mistake. The iPhone implements the last option. It seems to use a &#8220;wrong&#8221; reference frame and work from there.</p>
<p>After some trail and error, it seems that the iPhone keeps 6 frames for reference, which is what a level 3.0 decoder should do (6.59 according to the spec).</p>
<h3>Update 2009-11-27</h3>
<p>The above was for for 640&#215;480 frames; Since the DPB is specified in bytes, smaller frame sizes should result in more reference frames. My iPhone 3G 3.0.1 however does NOT play this correctly. This is the result with 512&#215;288 video (specs says 13 reference frames in the DPB):</p>
<p><a href="http://blog.dest-unreach.be/wp-content/uploads/2009/09/bbb-iphone-refs-1.png"><img class="alignnone size-full wp-image-1492" title="bbb-iphone-refs-1" src="http://blog.dest-unreach.be/wp-content/uploads/2009/09/bbb-iphone-refs-1.png" alt="bbb-iphone-refs-1" width="480" height="320" /></a></p>
<p><a href="http://blog.dest-unreach.be/wp-content/uploads/2009/09/bbb-iphone-refs-2.png"><img class="alignnone size-full wp-image-1493" title="bbb-iphone-refs-2" src="http://blog.dest-unreach.be/wp-content/uploads/2009/09/bbb-iphone-refs-2.png" alt="bbb-iphone-refs-2" width="480" height="320" /></a></p>
<p><a href="http://blog.dest-unreach.be/wp-content/uploads/2009/09/bbb-iphone-refs-3.png"><img class="alignnone size-full wp-image-1494" title="bbb-iphone-refs-3" src="http://blog.dest-unreach.be/wp-content/uploads/2009/09/bbb-iphone-refs-3.png" alt="bbb-iphone-refs-3" width="480" height="320" /></a></p>
<p>Strangely, an iPod Touch plays it just fine&#8230; So here I&#8217;d like to call for help:</p>
<p>If you have access to an iPhone and/or iPod Touch, try playing the first 30 seconds of <a href="http://www.bigbuckbunny.org/">Big Buck Bunny</a> encoded with <a name="try" href="http://blog.dest-unreach.be/wp-content/uploads/2009/09/refs7.mp4">7 reference frames (4.5MB)</a>. Please report using the comments below:</p>
<ul>
<li>Your hardware type (2G, 3G, 3GS, Touch, &#8230;)</li>
<li>Your model number (Settings -&gt; General -&gt; About -&gt; Model)</li>
<li>Your version number (Settings -&gt; General -&gt; About -&gt; Version)</li>
<li>Does it play with or without artifacts</li>
<li>Anything else that might be important</li>
</ul>
<h3>The list</h3>
<ul>
<li>iPhone 2G (MB346F) 3.1.2 <span style="color: #ff0000;">NOT OK</span></li>
<li>iPhone 3G (MB496NF) 3.0.1 <span style="color: #ff0000;">NOT OK</span></li>
<li>iPhone 3G (MB501DN) 3.1.2 <span style="color: #ff0000;">NOT OK</span></li>
<li>iPhone 3G  (MB489NF) 3.1.2 <span style="color: #ff0000;">NOT OK</span></li>
<li>iPod Touch 1st gen (MB376C) 3.1.2 <span style="color: #ff0000;">NOT OK</span></li>
<li>iPod Touch 1st gen (MA623ZD) 3.1.2 <span style="color: #ff0000;">NOT OK</span></li>
<li>iPod Touch 2nd gen (MB528KN) 2.2.1 <span style="color: #00ff00;">OK</span></li>
<li>iPod Touch 3rd gen (MC008MF) 3.1.2 <span style="color: #00ff00;">OK</span></li>
<li>iPhone 3GS (MC132NF) 3.1.2 <span style="color: #00ff00;">OK, confirmed twice<br />
</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dest-unreach.be/2009/09/08/h264-limits-for-iphone/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
<enclosure url="http://blog.dest-unreach.be/wp-content/uploads/2009/09/refs7.mp4" length="4700379" type="video/mp4" />
		</item>
		<item>
		<title>Converting YUV to BMP, the 10bit variant</title>
		<link>http://blog.dest-unreach.be/2009/08/17/converting-yuv-to-bmp-the-10bit-variant</link>
		<comments>http://blog.dest-unreach.be/2009/08/17/converting-yuv-to-bmp-the-10bit-variant#comments</comments>
		<pubDate>Mon, 17 Aug 2009 08:29:12 +0000</pubDate>
		<dc:creator>Niobos</dc:creator>
				<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[hd]]></category>
		<category><![CDATA[yuv]]></category>

		<guid isPermaLink="false">http://blog.dest-unreach.be/?p=1393</guid>
		<description><![CDATA[I needed to convert a raw YUV image to something viewable on my computer. There are a few tools to do so, including the wonderful ImageMagick toolset. However, running my image through this did not work as is. The source image is a frame from an HD-SDI stream, which has a color-depth of 10 bits [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to convert a raw YUV image to something viewable on my computer. There are a few tools to do so, including the wonderful <a href="http://www.imagemagick.org/">ImageMagick</a> toolset. However, running my image through this did not work as is.</p>
<p>The source image is a frame from an <a href="http://en.wikipedia.org/wiki/HD-SDI">HD-SDI</a> stream, which has a color-depth of 10 bits instead of the usual 8. The sample packing seems to be UYVY, but using 16bit per component (with the lower 6 bits always 0).</p>
<p>Since I only wanted to have a quick view of the frame, I just discarded the lower 2bits (i.e. byte) and converted that instead. This perl-script discards the least significant byte:</p>
<blockquote>
<pre>while( read STDIN, my $block, 2 ) {
 my @value = split //, $block;
 print $value[0];
}</pre>
</blockquote>
<p>The output can be fed into ImageMagick&#8217;s convert tool:</p>
<blockquote><p>convert -size 1280&#215;720 -interlace none -sampling-factor 4:2:2 8bit.uyvy out.bmp</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.dest-unreach.be/2009/08/17/converting-yuv-to-bmp-the-10bit-variant/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

