Skip to content

India EPG data for MythTV (XMLTV listings grabber)

January 9, 2010

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.

India EPG picture

EPG listings for India

Just as I started out researching EPG solutions for India, I luckily came upon the excellent website 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, 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 (" 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!

15 Comments leave one →
  1. January 9, 2010 7:28 pm

    hello this

  2. Pradeep permalink
    February 17, 2010 9:17 pm

    I’m a HTPC newbie. This is one important feature I’m looking for.
    But, I have a Windows system. Will I be able to use this script in windows or does the OS has to be Linux.

    • February 18, 2010 2:33 am

      This is intended to be used on Linux only, with MythTV. This cannot be used on windows.

  3. saurabh kumar permalink
    May 30, 2010 12:37 pm

    Is your xmltv grabber still working? I tried it using xmltv.exe , but it is not downloading any channels.

    Also I see that on the file is only till Jan 18, 2010. Can that be the problem?

  4. Amol permalink
    June 29, 2010 12:00 pm

    Hi Ravi,

    Thanks for the detailed information uploaded here.

    I tried using the file tv_grab_in in my host which is having Ubuntu 10.04 & latest mythtv. I kept file as directed by you in /usr/bin but I’m not able to see it in mythtv-setup, video sources. Is there any other things need to be done so that its visible in video sources.

    Bare with me as first time setting up mythtv…. 🙂


    • July 6, 2010 2:18 pm

      Hi Amol,

      Try the following –
      1. Change permissions on the file to enable the execute bits (755)
      2. Restart the backend and frontend and check again in video sources

      I am currently using this in Ubuntu 10.04, so I can confirm it should work.

      • deepak permalink
        November 24, 2012 6:45 pm

        Hi Ravi,

        I am using ubuntu 12.10, and tried above but I don’t see grabber name by India only three default one is there in video source..I’ve also tried restarting my box..but no use…please help..if this still works?

        • November 26, 2012 5:25 pm

          Hi Deepak,

          The grabber for India has been added to the official MythTV distribution. So if you installed one of the latest MythTV versions, you should see the grabber directly. The instructions in this post are no longer needed. You do need to sign-up with for MythTV to grab the listings file though.

  5. Srikanth permalink
    July 16, 2010 7:26 am

    Hi Ravi,

    I have been working with MediaE2E (the promoters of zipazap and whatsonIndia) for 2 years now. It was in April of 2008 that I contacted Atul regarding an XMLTV EPG for the HTPC community. We are now currently working with Robert Eden of XMLTV to fine tune the subscription method etc.

    I need to discuss a few things with you. Can you please email your contact info to skoka123 at gmail dot com?


  6. Team Whats-On-India permalink
    July 19, 2010 1:15 pm

    Hi! We at What’s-On-India have a new way of sharing the EPGs for enthusiasts like yourselves. Please write to us with your details at to avail of the same. Thanks! Team @

  7. December 13, 2012 7:00 pm

    This is an awesome information that I was desperate to find out. Thanks very much.

  8. Harshad permalink
    February 23, 2013 12:33 pm

    Hi Ravi / All,
    If I use the data from this grabber on my website to show the english movies schedue, or if I make an Android app for movies, schedules and reminders, will it be a legal issue of using this data in any way? Will it be any sort of violation of copyrights because basically this data is being compiled by whatsonindia . come ?
    Thanks and Regards,

    • February 23, 2013 12:51 pm

      Hi Harshad,
      You should be able to use the official MythTV India grabber directly from the distribution now. Note that it needs signing up with whatsonindia website and their terms state this is only for personal use – so I guess it would be an issue to put this data up on a website or app. You may want to contact whatsonindia to license it separately for such usage.

      • Harshad permalink
        February 23, 2013 2:01 pm

        Okay Great, thanks a lot Ravi.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: