[mythtvnz] Mhegepgsnoop Setup

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Jun 20 09:41:21 BST 2012


On Wed, 20 Jun 2012 19:13:25 +1200, you wrote:

>With all the recent talk about epg I thought I would give the 
>mhegepgsnoop grabber a go and see what I could get.
>
>Is there any documentation on how to get it running as I don't seem to 
>be having any luck.
>
>If I run the with the command line
>/home/neil/mhegepgsnoop-0.3.6.py -m "-u <user> -p<pw>" -d 
>/dev/dvb/adapter0/demux1 -o /home/neil/mheg.xml
>
>I get this in dmesg
>cx8802_start_dma() Failed. Unsupported value in .mpeg (0x00000001)
>
>What am I doing wrong as I would like to give it a go.
>
>Neil

mhegepgsnoop.py does not tune the DVB-T adapter.  I use dvbtune to do
that.  This is the script I use to get the ChoiceTV EPG:

#!/bin/bash

# DVB-T multiplex frequency (kHz)
DVB_T_FREQ=594000

# Adapter number of DVB-T card.
ADAPTER=2

# Output file to store the xmltv EPG data.
OUTPUT_FILE=/tmp/xmltv.xml

# Temp directory name.
TEMP_DIR=/tmp/mhegepgsnoop_jsw

PWD=`pwd`

if [ -e "$OUTPUT_FILE" ] && [ -f "$OUTPUT_FILE" ] ; then
    rm "$OUTPUT_FILE"
fi

# Get the MHEG5 EPG data from the DVT-T multiplex.
dvbtune -f $DVB_T_FREQ -qam 64 -gi 16 -cr 3_4 -bw 8 -tm 8 -m -c
$ADAPTER 2>1 >/dev/null &
DVBTUNE_PID=$!
sleep 1
mhegepgsnoop_jsw.py -z -d /dev/dvb/adapter${ADAPTER}/demux0 -o
$OUTPUT_FILE
kill $DVBTUNE_PID >/dev/null

# Extract the ChoiceTV channel data only.
mkdir $TEMP_DIR
cd $TEMP_DIR
tv_split -o %channel.xml.not $OUTPUT_FILE
mv choicetv.freeviewnz.tv.xml.not $OUTPUT_FILE
rm *.not

cd $PWD
rmdir $TEMP_DIR

Note that long lines may be wrapped by your newsreader (eg the dvbtune
one).

My mhegepgsnoop_jsw.py file is a slightly modified version of
mhegepgsnoop.py 0.3.5 with the "mysql_args =" line changed to allow a
valid login to my mythconverg database.  "mysql_args =-u root" does
not work on my system.

I run this from a cron job that does all my epg processing at 15:10
using my third DVB-T tuner as I know that it will never be in use at
that time.



More information about the mythtvnz mailing list