Note: The information in this post is no longer valid. The listings provider seems to have ceased the service as of 2013. I am leaving the post here for historical interest.
An enhanced TV viewing and recording experience is one of the cornerstones of an HTPC.
But perhaps it is also the most challenging aspect of setting up HTPC in India, because the non-availability of India specific electronic program guide (EPG) listings makes TV viewing and recording next to impossible.
Although this is one of my first posts and too early to get into EPG listings, I wanted to get this out and share for the benefit of poor souls stopped in their tracks trying to build and use HTPC for TV viewing in India.
North America has paid listings sources that are reliable, while a few other countries have “grabber” scripts that scrape the websites of TV channels or other webpages and try to re-format the html into machine readable XMLTV format. India had none – until now.
Just as I started out researching EPG solutions for India, I luckily came upon the excellent website http://www.whatsonindia.com that has comprehensive listings for all channels and providers in India. I set about writing a grabber script for MythTV that uses listings from this provider. With help from the XMLTV documentation and the good fellows at whatsonindia.com, an automated grabber script that can load good quality EPG data for all channels in India was developed. I have been using this for viewing and recording TV for the past 2 months and am quite happy with the way it turned out. It may be a while before it can be submitted to the official XMLTV distribution so that it gets into MythTV installations easily, but am putting it up here for download till then.
tv_grab_in (Opens in new window for download)
Installation instructions –
Tested with MythTV 0.22 on Mythbuntu 9.10 1. Download the file tv_grab_in using the above link 2. Copy it to /usr/bin/ directory. (Note: If you happen to wipe and re-install your OS, this file will naturally disappear. Until it is packaged into official XMLTV, this step would need to be done each time you install the OS). 3. Restart your mythbackend and mythfrontend 4. Go into mythtv-setup, video sources. Either choose to setup new video source or edit your existing video source - you should be able to see a Listings grabber named "India (www.whatsonindia.com)" now (it is detected from the /usr/bin directory). Select it, make sure the checkbox to perform an EIT scan is unchecked, and finish the setup. 5. Related settings - under Input Connections, make sure the source above is assigned to your video input. 6. When you exit mythtv-setup you will be prompted to run mythfilldatabase - allow it to run. You should see it running in the terminal window. You should be connected to the internet throughout this time. It may take anywhere from a minute to ten minutes to finish. 7. Now open mythtv-setup again, and get into Channel editor. You should see an exhaustive listing of all India channels now. Select each channel which you are interested in and fill in the Channel number. This number must be the same number used by your STB if your input connection is from an STB via a capture card (using IR blaster to change channels), or the frequency number if your input connection is from a tuner. Finish and exit the setup. (Note: It would be much easier and faster to do the above step using the MythWeb interface)
That is it, now you can check it out in Live TV. You should be able to see the EPG on pressing “S”.
Settings to have MythTV populate the latest data everyday automatically –
In mythfrontend, go to Settings->General, and navigate to the page for mythfilldatabase settings. Change the settings as follows - mythfilldatabase program: mythfilldatabase mythfilldatabase arguments: <leave this blank> mythfilldatabase log path: <mythtv home dir (~mythtv)>/mfdb.log mythfilldatabase run frequency (days): 1 mythfilldatabase execution start: <enter a number between 0 and 24> mythfilldatabase execution end: <enter a number that is prev number + 2> Uncheck the "Run mythfilldatabase at time suggested by grabber" checkbox and click finish. Note that the log path must be full path including the file name, and it should be writable by "mythtv" user (or more generally, the user id under which the mythbackend runs). The execution start/end times could be chosen at random and give it a window of about 3 hours - this helps to spread out the load on the listings server.
That is it, you are set to receive EPG updates everyday and should have guide info in your MythTV program guide now for 2~4 days in advance.
There will be other posts in future detailing the best ways to get channel icons, and thoughts on the best IR hardware to change STB channels (hint – my local dealer in Bangalore bundled an HP IR receiver + blaster + MCE remote control with Hauppauge PVR150. This receiver+blaster really rocks!). Now then, happy channel surfing!
A HTPC (Home Theater PC for the uninitiated) is a pretty useful thing to have around – especially since it can replace the DVD player/recorder, provide a single place to manage your entire music, movies, CD and DVD collection and provide a new great way to watch the old cable/broadcast TV. It can have many more features depending on the hardware/software used (access your movie collection from any other PC in the world…).
Unfortunately, such a beast of a machine is not yet ready-incarnated – it has to be home brewed with your own hands and wit, piecing together arcane and diverse bits of technology, software and hardware into the wee hours of the morning… not very unlike what Dr.Frankenstein ventured out to do. The end-result sometimes would be just as harrowing as Dr.Frankenstein’s.. but fear not – this is the raison d’etre of this blog – to try and save you from just such an experience and instead turn it into a fruitful and rewarding activity.
I will recount the pieces of info I picked up in my foray into this HTPC world, provide sage advice and try to separate the wheat from the chaff, and try to help you setup a HTPC of your own without the accompanying headaches and aspirins.
Every person has an own unique mindset.. what can illustrate this more resoundingly than the difference between the maniacal “Open source” zealots at one end and the who-cares-a-damn Microsoft/Apple users on the other. Mind you, the articles in here will tilt towards any of the above two philosophies which at that point of time meets the basic principles that I believe in –
1. Any activity into which we invest our time should be free from vendor lock-in’s and provide sustainability and scalability
2. A bit of time and effort can be compromised for a highly enhanced experience and perfection
3. We must have at any point of time, ability to customize the product fully add/remove features and functionality at our will
Naturally, going from the above, open source wins out most of the times. That means, mostly, MythTV on a Linuxbox.. a Mythbuntu! A packaged Microsoft solution with a pre-tested hardware may not need this blog anyway!!
I have felt the lack of a single authoritarian and exhaustive source of information on setting up HTPC using open source software such as MythTV on Linux. The MythTV site does have decent documentation, but a HTPC is much more than just MythTV – it would include IR remote control software, program listings grabbers, server utilities, video card drivers etc. The documentation for all these is spotty at best, outdated most times and more often than not plain wrong!
The Linux world is a nightmare for a newbie trying to step out of the trodden paths or stuck in a trouble spot. Help forums are littered with quickfix advices rather than attacking the issue from the root – we often see advices to the effect of editing a config file without even bothering to first find out what exactly went wrong – such foolhardy practices put the newbie in trouble and paint a pretty bad picture of Linux in the eyes of the world. Here I will try to avoid all such practices – whatever we do will be sustainable and in line with the intent by which tools are supposed to work. So hopefully nothing that is fragile, breaks with the next update or interferes with other functionality, will be presented here on this blog.