<?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>Picklebytes &#187; MythTV</title>
	<atom:link href="http://shane.willowrise.com/archives/category/mythtv/feed/" rel="self" type="application/rss+xml" />
	<link>http://shane.willowrise.com</link>
	<description>Tech Notes from Shane Hathaway</description>
	<lastBuildDate>Thu, 22 Jul 2010 17:58:59 +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>Streaming General Conference from MythTV</title>
		<link>http://shane.willowrise.com/archives/streaming-general-conference-from-mythtv/</link>
		<comments>http://shane.willowrise.com/archives/streaming-general-conference-from-mythtv/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 21:09:14 +0000</pubDate>
		<dc:creator>Shane Hathaway</dc:creator>
				<category><![CDATA[MythTV]]></category>
		<category><![CDATA[Religion]]></category>
		<category><![CDATA[church of jesus christ of latter day saints]]></category>
		<category><![CDATA[general conference]]></category>
		<category><![CDATA[videolan]]></category>

		<guid isPermaLink="false">http://shane.willowrise.com/?p=156</guid>
		<description><![CDATA[Every 6 months, the Church of Jesus Christ of Latter-day Saints broadcasts on television a series of meetings called General Conference.  There are usually 6 meetings, each 2 hours long, each meeting consisting primarily of talks by about 6 people.  On General Conference weekends, members of the Church watch the conference instead of attending local [...]]]></description>
			<content:encoded><![CDATA[<p>Every 6 months, the Church of Jesus Christ of Latter-day Saints broadcasts on television a series of meetings called General Conference.  There are usually 6 meetings, each 2 hours long, each meeting consisting primarily of talks by about 6 people.  On General Conference weekends, members of the Church watch the conference instead of attending local meetings.</p>
<p>I like to use MythTV to record the public sessions from <a href="http://www.ksl.com">KSL</a>, a local TV station.  That way, I get a pristine, high definition picture that I can review anytime I like.</p>
<p>Two of the meetings are on Saturday.  During the Saturday meetings, I prefer to multitask while listening to conference.  I want my wireless laptop to play the audio and a miniature version of the video.  I finally figured out how to do that.</p>
<p>I started with the directions on <a href="http://parker1.co.uk/mythtv_stream.php">parker1.co.uk</a>.  That page describes how to use <a href="http://videolan.org">VideoLAN</a> to stream a video even as it&#8217;s being created.  Unfortunately, those directions seem to be out of date, as is the <a href="http://parker1.co.uk/mythtv/mythlink">mythlink</a> script the page links to.   So here is my version of the mythlink script (with the database password replaced with &#8216;fakepw&#8217;):</p>
<pre>#!/bin/sh

# mythlink.sh - Symlinks mythtv files to more readable versions
# by Dale Gass

if [ ! -d /tv/links ]; then mkdir /tv/links; fi
rm -f /tv/links/*

echo "Done RM"
mysql -umythtv -pfakepw mythconverg -B --exec "select chanid,starttime,endtime,title,subtitle from recorded;" &gt;/tmp/mythlink.$$
perl -w -e '
        my $mythpath= "/tv";
        my $altpath= "/tv/links";
        if (!-d $altpath) {
                mkdir $altpath or die "Failed to make directory: $altpath\n";
        }
        &lt;&gt;;
        while (&lt;&gt;) {
                chomp;
                my ($chanid,$start,$end,$title,$subtitle) = split /\t/;
                $start =~ s/[^0-9]//g;
                $end =~ s/[^0-9]//g;
                $subtitle = "" if(!defined $subtitle);
                my $ofn = "${chanid}_${start}.mpg";
                do { print "Skipping $mythpath/$ofn\n"; next } unless -e "$mythpath/$ofn";
                $start =~ /^(............)/;
                my $nfn = "$1_${title}";
                if ($subtitle) {$nfn="${nfn}__${subtitle}"}
                $nfn =~ s/ /_/g;
                $nfn =~ s/&amp;/+/g;
                $nfn =~ s/[^+0-9a-zA-Z_-]+/_/g;
                $nfn = "${nfn}.mpg";
                print "Creating $nfn\n";
                unlink "$altpath/$nfn" if(-e "$altpath/$nfn");
                symlink "$mythpath/$ofn", "$altpath/$nfn" or die "Failed to create symlink $altpath/$nfn: $!";
        }
' /tmp/mythlink.$$
rm /tmp/mythlink.$$</pre>
<p>This handy script generates links to make it easy to find recorded TV programs on the filesystem.  After running the script, I started a VLC streaming server like this:</p>
<pre>vlc 200904041400_LDS_General_Conference.mpg --sout \
'#transcode{vcodec=mp4v,vb=2048,scale=0.25,acodec=mp3,ab=128,channels=2}:std{access=http,mux=ts,dst=:8081}'</pre>
<p>I learned what options are available from the <a href="http://www.videolan.org/doc/streaming-howto/en/ch03.html">VLC streaming documentation</a>.  The command I used creates a 2 megabit per second streaming server using the MPEG-4 and MP3 codecs, with the video scaled from high definition (1920&#215;1080) to 480&#215;270.  Then I launched the client on my laptop:</p>
<pre>vlc http://tiger:8081</pre>
<p>This worked very well. Both the video and audio were very clean and never stalled.  The MythTV server has an <a href="http://shane.willowrise.com/archives/newegg-you-amaze-me/">AMD 5200+</a>, which is more than fast enough to simultaneously record the high definition stream to a hard drive, play it back with scaling, transcode down to 480&#215;270, and send the transcoded stream to multiple clients.</p>
<p>Of course, this will all be much easier when MythWeb gains the ability to <a href="http://www.mythtv.org/wiki/Stream_mythtv_recordings_from_mythweb_using_flash_video">generate Flash videos</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://shane.willowrise.com/archives/streaming-general-conference-from-mythtv/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>12 Cents Per Gigabyte</title>
		<link>http://shane.willowrise.com/archives/12-cents-per-gigabyte/</link>
		<comments>http://shane.willowrise.com/archives/12-cents-per-gigabyte/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 20:56:04 +0000</pubDate>
		<dc:creator>Shane Hathaway</dc:creator>
				<category><![CDATA[Digital Storage]]></category>
		<category><![CDATA[MythTV]]></category>

		<guid isPermaLink="false">http://shane.willowrise.com/?p=40</guid>
		<description><![CDATA[640 GB, 7200 RPM, 32 MB cache, 5 year warranty: $75 ($0.12/GB), free shipping.  It&#8217;s almost too good to be true.
Still, the best drive for MythTV is Western Digital&#8217;s low power series.  I&#8217;ve been using the 750GB GP model with MythTV for about a year now and it has been silent and completely reliable the [...]]]></description>
			<content:encoded><![CDATA[<p>640 GB, 7200 RPM, 32 MB cache, 5 year warranty: <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822148335">$75</a> ($0.12/GB), free shipping.  It&#8217;s almost too good to be true.</p>
<p>Still, the best drive for MythTV is Western Digital&#8217;s <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822136151">low power series</a>.  I&#8217;ve been using the 750GB GP model with MythTV for about a year now and it has been silent and completely reliable the whole time.  It contains an XFS filesystem, which probably helps quite a bit when recording 6 GB/hr (full HD resolution).  The MySQL database that MythTV relies on happens to be on another drive, but I imagine it would be fine to put the database on the same drive.</p>
]]></content:encoded>
			<wfw:commentRss>http://shane.willowrise.com/archives/12-cents-per-gigabyte/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
