[mythtvnz] No EPG, what am i doing wrong

Stephen Worthington stephen_agent at jsw.gen.nz
Fri Apr 8 04:28:15 BST 2022


On Fri, 8 Apr 2022 10:54:54 +1200, you wrote:

>Good to see activity for the NZ MythTV group after such a long time.
>
>Having somewhat resurrected my MythTV box after not using it for a
>while (now updated to v.32/fixes, under Arch linux), I'm having
>trouble with EPG data like others. Trouble is, it's been so many years
>since I first set all this up, I've forgotten where all of the config
>files and scripts are!
>
>So far, I've started fresh, deleting my old channels, and doing a full
>re-scan, which found all the new channels, such as Eden. I can watch
>Live TV fine. They've all got xmltv ID's (tv1.freeviewnz.tv etc).
>
>Downloading from epg.org.nz and using it with mythfilldatabase, I have
>7 days programme guide data for M?ori TV, PRIME, Duke on 12, Eden+1,
>Te Reo and all the 'minor' channels (18, 19, 20, 25, 26, 31, 33, RNZ).
>
>However, there is no data for TVNZ 1, TVNZ 2, TV 3, Bravo, Duke on
>channel 6, TV2+1, Eden, Bravo plus 1, TV1+1, Three+1 or Rush.
>
>I've fiddled with EIT and tv_grab_nz-py stuff as well, but no data.
>
>My old shell script to update the database doesn't work either:
>#! /bin/bash
>wget http://epg.org.nz/freeview.xml.gz
>gunzip freeview.xml.gz
>mythfilldatabase --file --sourceid 1 --xmlfile freeview.xml
>rm freeview.xml
>exit
>
>I'm sure this is some config error. Eventually got mhegepgsnoop.py
>(0.71) running (after realising I needed a tuner open and running),
>but the resultant xml file is empty.
>
>Confused!

The xmltvid values in your database have to be the same as the ones in
the downloaded EPG.  The names of the channels will have changed since
you were last using MythTV.  All the TVNZ channels changed several
years ago - TV1 became TVNZ 1 and so on.  TV3 also became THREE.  But
the epg.org.nz data still uses the old xmltvid values, so as not to
cause problems for the downloaders.  It did update the channel name
values.  But it did not get updated for the recent channel changes and
does not have any of the new channels in it.  I think you will find
that eden+1 is getting EPG via EIT scanning, as it is a completely new
channel.  The eden channel did exist before as Choice TV and your new
channel scan probably reused that channel and it did not get set up to
use EIT, but eden+1 did not match any existing channel and I am
guessing that means it got default settings that included having EIT
scanning enabled.

So, it is not possible to use the epg.org.nz data any more if you want
data for all the channels, including the new ones.  The best option
now for everyone is to use mhegepgsnoop to get the official MHEG5 EPG
data, run xmltv-proc-nz on that data (as epg.org.nz does) and then run
mythfilldatabase on the result.  Hence why I have posted about how I
do that.  Mhegepgsnoop will use whatever xmltvid values you have in
your database for the channels, but you do have to ensure that each
channel has a distinct xmltvid, so you will need to add new xmltvids
for the new channels in the channel editor.  Since you are not using
tv_grab_nz-py, you do not need to also adjust your
$(HOME)/.mythtv/<sourcename>.xmltv file for the new xmltvids as you do
not have that file.

So you will want to take a look at the do_mhegepgsnoop2.sh file on my
web server and change the shell script that currently does the
downloading from epg.org.nz to something like what is in
do_mhegepgsnoop2.sh, but retain the mythfilldatabase lines, adjusted
for the correct new file name.  I presume that script is already being
run daily by a cron job.  You should take a look at the settings for
the use of your DVB-T tuners and see what order they are used in
(controlled by the recpriority and schedorder fields in the
capturecard table), then select the least used one as the one the
script uses to run mhegepgsnoop on.

And you will need to figure out why mhegepgsnoop.py is not working
first, of course.  If you use its verbose option (-v) and take a look
at the output, it should tell you what the problem is.  It does not
need a channel running in order to work - it has options to directly
control a tuner and start the tuner itself.  But if a tuner is already
running (in MythTV or because you used dvbtune or a similar program to
start it), it will reuse the same tuner, unless the program already
using it has locked the tuner.  Fortunately, MythTV does not lock the
tuners (or it did not last time I checked, many versions ago).

I have not wanted to post a full step by step guide for how to do all
this as my EPG collection is more complicated as I also record from
Sky using my DVB-S2 tuners and have to collect Sky EPG as well.  That
means I could not properly test any step by step guide on my own
system.  I could set up a virtual PC with Ubuntu and give it a SAT>IP
DVB-T tuner and use that to work out step by step instructions for how
to do it on a new system, if there is need for that.



More information about the mythtvnz mailing list