<?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>Prashanth Ellina &#187; gutsy gibbon</title>
	<atom:link href="http://blog.prashanthellina.com/category/gutsy-gibbon/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.prashanthellina.com</link>
	<description>In Pursuit of Truth</description>
	<lastBuildDate>Sun, 28 Nov 2010 09:35:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Watching Television on Linux: setting up a TV Tuner card</title>
		<link>http://blog.prashanthellina.com/2008/03/23/watching-television-on-linux-setting-up-a-tv-tuner-card/</link>
		<comments>http://blog.prashanthellina.com/2008/03/23/watching-television-on-linux-setting-up-a-tv-tuner-card/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 13:19:57 +0000</pubDate>
		<dc:creator>prashanthellina</dc:creator>
				<category><![CDATA[gutsy gibbon]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[home theatre pc]]></category>
		<category><![CDATA[HTPC]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[pinnacle pctv 50i]]></category>
		<category><![CDATA[television]]></category>
		<category><![CDATA[tv tuner card]]></category>
		<category><![CDATA[tvtime]]></category>

		<guid isPermaLink="false">http://blog.prashanthellina.com/2008/03/23/watching-television-on-linux-setting-up-a-tv-tuner-card/</guid>
		<description><![CDATA[A couple of weeks back, I went shopping looking for a TV tuner card that is compatible with Linux. Googling had told me that &#8220;Hauppauge&#8221; card was known to be compatible. However, I could not find it anywhere in the market (SP Road, Bangalore, India). On going to one of the shops, I found a [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks back, I went shopping looking for a TV tuner card that is compatible with Linux. Googling had told me that &#8220;Hauppauge&#8221; card was known to be compatible. However, I could not find it anywhere in the market (SP Road, Bangalore, India). On going to one of the shops, I found a &#8220;<strong><a href="http://www.pinnaclesys.com/PublicSite/uk/Products/Consumer+Products/PCTV+Tuners/PCTV+Analog+PVR+(cable_antenna)/PCTV+50i.htm">Pinnacle PCTV 50i</a></strong>&#8221; card. I had heard from many people before that Pinnacle was a good card for Windows both in terms of quality of decoding and software provided. I checked in google to ensure that Pinnacle card would work on Linux. I found that the card uses Philips&#8217; SAA7134 chipset for which drivers are available in Linux. I went on and bought the card for Rs 2000 ($50).</p>
<p><center><img src="http://www.pinnaclesys.com/images/screenshots/40_50i_large.jpg" alt="Pinnacle PCTV 50i" height="25%" width="25%"/></center></p>
<p>The card is available through Amazon.com.<br />
<a href="http://www.amazon.com/gp/product/B000FKP2TY?ie=UTF8&#038;tag=prashellin-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B000FKP2TY">Pinnacle PCTV Analog PCI 50i &#8211; TV / radio tuner / video input adapter &#8211; PCI &#8211; SECAM, PAL</a><img src="http://www.assoc-amazon.com/e/ir?t=prashellin-20&#038;l=as2&#038;o=1&#038;a=B000FKP2TY" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<h3>Setting up the card in Linux</h3>
<p>I have Ubuntu Gutsy installed (7.10) and followed this <a href="http://www.cyberciti.biz/tips/debian-ubuntu-linux-configure-pinnacle-pctv-tuner.html">guide</a> to setup the card and the instructions worked like a charm. A gist of the procedure.</p>
<p>Ubuntu Gutsy recognizes the card automatically, the following commands help to check if the recognition happened or not. Both commands should give atleast one line of output each.</p>
<pre lang="bash">
sudo update-pciids
lspci | grep -i saa713
dmesg | grep saa713
</pre>
<p><br/><br/></p>
<h3>Watching TV &#8211; tvtime</h3>
<p><a href="http://www.google.co.in/url?sa=t&#038;ct=res&#038;cd=1&#038;url=http%3A%2F%2Ftvtime.sourceforge.net%2F&#038;ei=klfmR6P-B4KS6gOAlPG7CA&#038;usg=AFQjCNGRL5Fj7JAjfXMzgie-hp7wt7zDrA&#038;sig2=RCYG_ORJgTwlDYRmxgXc2A"><strong>tvtime</strong></a> is a simple to use application for watching TV on Linux. Here is how you configure it.</p>
<blockquote>
<pre lang="bash">
sudo apt-get install tvtime
tvtime &#038;
</pre>
<p><br/></p>
<p>Right click to open a setup menu. You can also hit [F1] or [tab] key to show configuration menu:<br />
Linux Tvtime configuration hit [F1] or [tab] key to show configuration menu<br />
(Fig. 01: Linux tvtime application configuration menu)<br />
First, you need to setup video source, frequencies and channels etc.</p>
<h5>Setup video source</h5>
<p>Visit Input Configuration > Change Video Source > Setup source as per your setup.</p>
<h5>Setup frequencies table</h5>
<p>You need to setup the channels you are receiving with the tuner. Here we use europe frequencies table. Visit Channel management > Change Frequency table > Select new table<br />
Scan Channel</p>
<p>Finally, you need to scan for channels by visiting Channel management > Change Frequency table > Scan channels for signal > Back > Exit</p>
<h5>Sound configuration</h5>
<p>You need to attach internal cables to get sound out of TV tuner card. Use driver saa7134-oss or saa7134-alsa to get sound out of card. This driver get loaded automatically. Open terminal and type the following command to hear the audio through ALSA using tvtime (or other programs that don’t support it directly):</p>
<pre lang="bash">
$ sox -c 2 -s -w -r 32000 -t ossdsp /dev/dsp1 -t ossdsp -w -r 32000 /dev/dsp
</pre>
</blockquote>
<h3>Recording TV using mencoder</h3>
<p>if you do not already have mencoder, you can install it (on Debian/Ubuntu) by doing</p>
<pre lang="bash"
sudo apt-get install mencoder mplayer
</pre>
<p>Note that the above command will also install mplayer which is useful for viewing video files and tv channels. If you are the command line kind of person, you can do away with tvtime and use mplayer!</p>
<p>To record a TV channel, you will first need to figure out the frequency of the channel. For this I found scantv useful. This command will scan channels in the specified range and print out the found channels. After figuring out the frequency of the channel to record, use this mencoder command to record the video in a compressed format.</p>
<pre lang="bash">
mencoder tv:// -tv driver=v4l2:input=0:norm=pal:width=640:height=480:device=/dev/video0:\
freq=775.25:adevice=/dev/dsp1:forceaudio:audiorate=32000 buffersize=64\
 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=400:keyint=30 -oac mp3lame\
-lameopts br=32:cbr:mode=3 -ffourcc divx -o "test.avi"
</pre>
<p><br/></p>
<p>To use <strong>mplayer to view TV</strong> directly (without using tvtime),do this.</p>
<pre lang="bash">
mplayer tv:// -tv driver=v4l2:input=0:norm=pal:width=640:height=480:device=/dev/video0:\
freq=775.25:adevice=/dev/dsp1:forceaudio:audiorate=32000
</pre>
<p><br/></p>
<p>I've been using this card without a glitch and recommend for HTPC attempts on Linux.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.prashanthellina.com/2008/03/23/watching-television-on-linux-setting-up-a-tv-tuner-card/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
	</channel>
</rss>

