Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Mythtvnz

Mhegepgsnoop Setup

 

 

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded


nhenwood.lists at gmail

Jun 20, 2012, 12:13 AM

Post #1 of 14 (787 views)
Permalink
Mhegepgsnoop Setup

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

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


stephen_agent at jsw

Jun 20, 2012, 1:41 AM

Post #2 of 14 (798 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

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.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


dmoo1790 at ihug

Jun 20, 2012, 5:15 PM

Post #3 of 14 (769 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

On 20/06/12 20:41, Stephen Worthington wrote:
> 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.
>

Interestingly on my system, with an HVR2200 tuner, I never need to tune
to get the EPG and I never have problems pulling the EPG from an active
tuner. My system is powered off overnight too.

My cron job runs at 10 minutes past every hour. I do this because I have
noticed that the MHEG EPG does get updated at odd times during the day.
Mostly trivial changes to show descriptions I believe. My cron job runs
as root so I don't need to be logged in to get the EPG.

I have a small wrapper script that checks to see if the EPG has changed
before deciding to run mythfilldatabase or not:


#!/bin/bash
FILE_NAME="/home/dmoo1790/linuxdvb-0.1/xmltvaaa.xml"
LOG_FILE="/home/dmoo1790/linuxdvb-0.1/error2.log"

if [ -f $FILE_NAME ]; then
mv $FILE_NAME "$FILE_NAME.old"
else
touch "$FILE_NAME.old"
fi

/home/dmoo1790/linuxdvb-0.1/mhegepgsnoop-0.3.6.py -o $FILE_NAME -vu -d
"/dev/dvb/adapter1/demux0" &> $LOG_FILE

if [ $? -eq 0 -a -f $FILE_NAME ]; then

diff <(tail -n +2 $FILE_NAME) <(tail -n +2 "$FILE_NAME.old") &>> $LOG_FILE

if [ $? -ne 0 ]; then
mythfilldatabase --update --file --sourceid 1 --xmlfile $FILE_NAME &>>
$LOG_FILE
else
echo "Files are identical. Not running mythfilldatabase." >> $LOG_FILE
fi

fi


Stephen, my guess is that user root needs a password or even doesn't
have rights to access the database on your system. I'll probably add an
option to use the python bindings for database access in a future
version. This simplifies the user/password thing so long as you run the
script as a user with permission to read the correct config.xml (and
mysql.txt?) file. On my system I have created links from my
/home/dmoo1790/.mythtv/ directory to /home/mythtv/.mythtv/ to get the
python bindings working.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


dmoo1790 at ihug

Jun 20, 2012, 5:43 PM

Post #4 of 14 (759 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

On 20/06/12 19:13, Neil Henwood 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
>

Just noticed you have "demux1" in the device string. Not sure about your
card/setup but I would have thought "demux0" would be more likely. I
have a dual tuner card so I have /dev/dvb/adapter0 and
/dev/dvb/adapter1. But neither adapter has more than one demux so I only
have demux0 for each. So in my case I can pull EPG data from
/dev/dvb/adapter0/demux0 or /dev/dvb/adapter1/demux0.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


stephen_agent at jsw

Jun 20, 2012, 6:50 PM

Post #5 of 14 (763 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

On Thu, 21 Jun 2012 12:15:19 +1200, you wrote:


>Interestingly on my system, with an HVR2200 tuner, I never need to tune
>to get the EPG and I never have problems pulling the EPG from an active
>tuner. My system is powered off overnight too.

You must have your tuners set up to be used continuously by MythTV. In
mythtv-setup, Capture Card Setup/Recording Options, you will have the
"Open DVB card on demand" option off for that tuner. But I was under
the impression that with that option off, MythTV would not actually
tune the tuner until it first needed it for something, like a
recording or EIT grabbing. So I would have thought that mhegepgsnoop
would not work until that first tuning happened. If you have the next
option on that page, "Use DVB card for active EIT scan", also set,
then that would cause the tuner to be tuned immediately after
mythbackend starts.

>Stephen, my guess is that user root needs a password or even doesn't
>have rights to access the database on your system. I'll probably add an
>option to use the python bindings for database access in a future
>version. This simplifies the user/password thing so long as you run the
>script as a user with permission to read the correct config.xml (and
>mysql.txt?) file. On my system I have created links from my
>/home/dmoo1790/.mythtv/ directory to /home/mythtv/.mythtv/ to get the
>python bindings working.

You are right, root has a mysql password. My database has been around
for a long time now - it has been upgraded with each new MythTV
version from 0.21 originally, before DVB-T existed in NZ. So it
probably has all sorts of interesting things like that in it that are
slightly different from a brand new 0.25 database. Since mysql is
accessible on my network, I think it is a really good idea to have a
password on the mysql root user.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


dmoo1790 at ihug

Jun 20, 2012, 7:14 PM

Post #6 of 14 (760 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

On 21/06/12 13:50, Stephen Worthington wrote:
> On Thu, 21 Jun 2012 12:15:19 +1200, you wrote:
>
>
>> Interestingly on my system, with an HVR2200 tuner, I never need to tune
>> to get the EPG and I never have problems pulling the EPG from an active
>> tuner. My system is powered off overnight too.
>
> You must have your tuners set up to be used continuously by MythTV. In
> mythtv-setup, Capture Card Setup/Recording Options, you will have the
> "Open DVB card on demand" option off for that tuner. But I was under
> the impression that with that option off, MythTV would not actually
> tune the tuner until it first needed it for something, like a
> recording or EIT grabbing. So I would have thought that mhegepgsnoop
> would not work until that first tuning happened. If you have the next
> option on that page, "Use DVB card for active EIT scan", also set,
> then that would cause the tuner to be tuned immediately after
> mythbackend starts.
>

Spot on. I do have "Open DVB card on demand" OFF and "Use DVB card for
active EIT scan" ON. No tuner magic after all. :) Not sure why I have
the EIT scan on. Just playing around I think but happily it works for
MHEG EPG grabbing so I'll leave it as is.


_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


nhenwood.lists at gmail

Jun 21, 2012, 3:21 AM

Post #7 of 14 (762 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

> Just noticed you have "demux1" in the device string. Not sure about
> your card/setup but I would have thought "demux0" would be more
> likely. I have a dual tuner card so I have /dev/dvb/adapter0 and
> /dev/dvb/adapter1. But neither adapter has more than one demux so I
> only have demux0 for each. So in my case I can pull EPG data from
> /dev/dvb/adapter0/demux0 or /dev/dvb/adapter1/demux0.
>
>
That was intentional as I was using a HVR3000, and it is a dual DVB tuner.

I've reconfigured myth to not release the tuner when it has finished and
also tried to use the Nova-T500 that I have as well, this is what I get
in that case


[root [at] serve neil]# /home/neil/mhegepgsnoop-0.3.6.py -m "-u<user> -p
<pw>" -d /dev/dvb/adapter3/demux0 -o /home/neil/mheg.xml
Traceback (most recent call last):
File "/home/neil/mhegepgsnoop-0.3.6.py", line 855, in <module>
main()
File "/home/neil/mhegepgsnoop-0.3.6.py", line 286, in main
the_pid = find_pid3(dmxfd, demux_filter)
File "/home/neil/mhegepgsnoop-0.3.6.py", line 359, in find_pid3
program_info_len =((buf[10] & 0x0F) << 8) | buf[11]
IndexError: list index out of range

I do however get something in the output though, so something is happening.

[root [at] serve neil]# cat mheg.xml
<tv date="20120621220400" generator-info-name="mhegepgsnoop.py"
source-info-name="DVB-T MHEG Stream" />

> My cron job runs at 10 minutes past every hour. I do this because I
> have noticed that the MHEG EPG does get updated at odd times during
> the day. Mostly trivial changes to show descriptions I believe. My
> cron job runs as root so I don't need to be logged in to get the EPG.

So you can successfully run this while recordings are taking place?

I'm going to have to try to find some time to dedicate to working on
this to get it working correctly.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


dmoo1790 at ihug

Jun 21, 2012, 4:16 AM

Post #8 of 14 (765 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

On 21/06/12 22:21, Neil Henwood wrote:
>
>> Just noticed you have "demux1" in the device string. Not sure about
>> your card/setup but I would have thought "demux0" would be more
>> likely. I have a dual tuner card so I have /dev/dvb/adapter0 and
>> /dev/dvb/adapter1. But neither adapter has more than one demux so I
>> only have demux0 for each. So in my case I can pull EPG data from
>> /dev/dvb/adapter0/demux0 or /dev/dvb/adapter1/demux0.
>>
>>
> That was intentional as I was using a HVR3000, and it is a dual DVB tuner.
>
> I've reconfigured myth to not release the tuner when it has finished and
> also tried to use the Nova-T500 that I have as well, this is what I get
> in that case
>
>
> [root [at] serve neil]# /home/neil/mhegepgsnoop-0.3.6.py -m "-u<user> -p
> <pw>" -d /dev/dvb/adapter3/demux0 -o /home/neil/mheg.xml
> Traceback (most recent call last):
> File "/home/neil/mhegepgsnoop-0.3.6.py", line 855, in <module>
> main()
> File "/home/neil/mhegepgsnoop-0.3.6.py", line 286, in main
> the_pid = find_pid3(dmxfd, demux_filter)
> File "/home/neil/mhegepgsnoop-0.3.6.py", line 359, in find_pid3
> program_info_len =((buf[10] & 0x0F) << 8) | buf[11]
> IndexError: list index out of range
>
> I do however get something in the output though, so something is happening.
>
> [root [at] serve neil]# cat mheg.xml
> <tv date="20120621220400" generator-info-name="mhegepgsnoop.py"
> source-info-name="DVB-T MHEG Stream" />
>

The bit of output you got is not dependent on whether you managed to
connect to the demux or not. Looks like I need to do a bit more error
trapping so the code stops immediately after it fails to read from the
demux, which is what I think happened in your case.

>> My cron job runs at 10 minutes past every hour. I do this because I
>> have noticed that the MHEG EPG does get updated at odd times during
>> the day. Mostly trivial changes to show descriptions I believe. My
>> cron job runs as root so I don't need to be logged in to get the EPG.
>
> So you can successfully run this while recordings are taking place?
>

Yes. Just tested again to be certain.

> I'm going to have to try to find some time to dedicate to working on
> this to get it working correctly.
>

Use the -v option to get verbose output. Might help you to see what
progress you're making.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


nhenwood.lists at gmail

Jun 21, 2012, 5:52 PM

Post #9 of 14 (759 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

On Thu, Jun 21, 2012 at 11:16:23PM +1200, David Moore wrote:
>
> Use the -v option to get verbose output. Might help you to see what
> progress you're making.
>

I've run it again, and below is the output. I had to kill it as it was doing nothing more after about an hour.

[root [at] serve neil]# /home/neil/mhegepgsnoop-0.3.6.py -v -m "-u<un> -p<pw>" -d /dev/dvb/adapter3/demux0 -o /home/neil/mheg.xml

Getting channel info from MythTV database
mysql Ver 14.14 Distrib 5.5.23, for Linux (x86_64) using readline 5.1
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Usage: mysql [OPTIONS] [database]
-?, --help Display this help and exit.
-I, --help Synonym for -?
--auto-rehash Enable automatic rehashing. One doesn't need to use
'rehash' to get table and field completion, but startup
and reconnecting may take a longer time. Disable with
--disable-auto-rehash.
(Defaults to on; use --skip-auto-rehash to disable.)
-A, --no-auto-rehash
No automatic rehashing. One has to use 'rehash' to get
table and field completion. This gives a quicker start of
mysql and disables rehashing on reconnect.
--auto-vertical-output
Automatically switch to vertical output mode if the
result is wider than the terminal width.
-B, --batch Don't use history file. Disable interactive behavior.
(Enables --silent.)
--character-sets-dir=name
Directory for character set files.
--column-type-info Display column type information.
-c, --comments Preserve comments. Send comments to the server. The
default is --skip-comments (discard comments), enable
with --comments.
-C, --compress Use compression in server/client protocol.
-#, --debug[=#] This is a non-debug version. Catch this and exit.
--debug-check Check memory and open file usage at exit.
-T, --debug-info Print some debug info at exit.
-D, --database=name Database to use.
--default-character-set=name
Set the default character set.
--delimiter=name Delimiter to be used.
-e, --execute=name Execute command and quit. (Disables --force and history
file.)
-E, --vertical Print the output of a query (rows) vertically.
-f, --force Continue even if we get an SQL error.
-G, --named-commands
Enable named commands. Named commands mean this program's
internal commands; see mysql> help . When enabled, the
named commands can be used from any line of the query,
otherwise only from the first line, before an enter.
Disable with --disable-named-commands. This option is
disabled by default.
-i, --ignore-spaces Ignore space after function names.
--init-command=name SQL Command to execute when connecting to MySQL server.
Will automatically be re-executed when reconnecting.
--local-infile Enable/disable LOAD DATA LOCAL INFILE.
-b, --no-beep Turn off beep on error.
-h, --host=name Connect to host.
-H, --html Produce HTML output.
-X, --xml Produce XML output.
--line-numbers Write line numbers for errors.
(Defaults to on; use --skip-line-numbers to disable.)
-L, --skip-line-numbers
Don't write line number for errors.
-n, --unbuffered Flush buffer after each query.
--column-names Write column names in results.
(Defaults to on; use --skip-column-names to disable.)
-N, --skip-column-names
Don't write column names in results.
--sigint-ignore Ignore SIGINT (CTRL-C).
-o, --one-database Ignore statements except those that occur while the
default database is the one named at the command line.
--pager[=name] Pager to use to display results. If you don't supply an
option, the default pager is taken from your ENV variable
PAGER. Valid pagers are less, more, cat [> filename],
etc. See interactive help (\h) also. This option does not
work in batch mode. Disable with --disable-pager. This
option is disabled by default.
-p, --password[=name]
Password to use when connecting to server. If password is
not given it's asked from the tty.
-P, --port=# Port number to use for connection or 0 for default to, in
order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/services, built-in default (3306).
--prompt=name Set the mysql prompt to this value.
--protocol=name The protocol to use for connection (tcp, socket, pipe,
memory).
-q, --quick Don't cache result, print it row by row. This may slow
down the server if the output is suspended. Doesn't use
history file.
-r, --raw Write fields without conversion. Used with --batch.
--reconnect Reconnect if the connection is lost. Disable with
--disable-reconnect. This option is enabled by default.
(Defaults to on; use --skip-reconnect to disable.)
-s, --silent Be more silent. Print results with a tab as separator,
each row on new line.
-S, --socket=name The socket file to use for connection.
--ssl Enable SSL for connection (automatically enabled with
other flags).
--ssl-ca=name CA file in PEM format (check OpenSSL docs, implies
--ssl).
--ssl-capath=name CA directory (check OpenSSL docs, implies --ssl).
--ssl-cert=name X509 cert in PEM format (implies --ssl).
--ssl-cipher=name SSL cipher to use (implies --ssl).
--ssl-key=name X509 key in PEM format (implies --ssl).
--ssl-verify-server-cert
Verify server's "Common Name" in its cert against
hostname used when connecting. This option is disabled by
default.
-t, --table Output in table format.
--tee=name Append everything into outfile. See interactive help (\h)
also. Does not work in batch mode. Disable with
--disable-tee. This option is disabled by default.
-u, --user=name User for login if not current user.
-U, --safe-updates Only allow UPDATE and DELETE that uses keys.
-U, --i-am-a-dummy Synonym for option --safe-updates, -U.
-v, --verbose Write more. (-v -v -v gives the table output format).
-V, --version Output version information and exit.
-w, --wait Wait and retry if connection is down.
--connect-timeout=# Number of seconds before connection timeout.
--max-allowed-packet=#
The maximum packet length to send to or receive from
server.
--net-buffer-length=#
The buffer size for TCP/IP and socket communication.
--select-limit=# Automatic limit for SELECT when using --safe-updates.
--max-join-size=# Automatic limit for rows in a join when using
--safe-updates.
--secure-auth Refuse client connecting to server if it uses old
(pre-4.1.1) protocol.
--server-arg=name Send embedded server this as a parameter.
--show-warnings Show warnings after every statement.
--plugin-dir=name Directory for client-side plugins.
--default-auth=name Default authentication client-side plugin to use.

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf
The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
auto-rehash TRUE
auto-vertical-output FALSE
character-sets-dir (No default value)
column-type-info FALSE
comments FALSE
compress FALSE
debug-check FALSE
debug-info FALSE
database (No default value)
default-character-set auto
delimiter ;
vertical FALSE
force FALSE
named-commands FALSE
ignore-spaces FALSE
init-command (No default value)
local-infile FALSE
no-beep FALSE
host (No default value)
html FALSE
xml FALSE
line-numbers TRUE
unbuffered FALSE
column-names TRUE
sigint-ignore FALSE
port 0
prompt mysql>
quick FALSE
raw FALSE
reconnect FALSE
socket (No default value)
ssl FALSE
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cert (No default value)
ssl-cipher (No default value)
ssl-key (No default value)
ssl-verify-server-cert FALSE
table FALSE
user mythtv
safe-updates FALSE
i-am-a-dummy FALSE
connect-timeout 0
max-allowed-packet 16777216
net-buffer-length 16384
select-limit 1000
max-join-size 1000000
secure-auth FALSE
show-warnings FALSE
plugin-dir (No default value)
default-auth (No default value)
Getting program_map_pid from PAT
program_map_pid = 1416
Getting carousel_pid from PMT
^CTraceback (most recent call last):
File "/home/neil/mhegepgsnoop-0.3.6.py", line 855, in <module>
main()
File "/home/neil/mhegepgsnoop-0.3.6.py", line 286, in main
the_pid = find_pid3(dmxfd, demux_filter)
File "/home/neil/mhegepgsnoop-0.3.6.py", line 349, in find_pid3
buffer.extend(dmxfd.read(3))
KeyboardInterrupt


_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


dmoo1790 at ihug

Jun 21, 2012, 8:13 PM

Post #10 of 14 (749 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

On 22/06/12 12:52, Neil Henwood wrote:
> On Thu, Jun 21, 2012 at 11:16:23PM +1200, David Moore wrote:
>>
>> Use the -v option to get verbose output. Might help you to see what
>> progress you're making.
>>
>
> I've run it again, and below is the output. I had to kill it as it was doing nothing more after about an hour.

If it doesn't produce more screen output after about a minute you can
kill it. Doesn't take long to read the data if things are working OK.

>
> [root [at] serve neil]# /home/neil/mhegepgsnoop-0.3.6.py -v -m "-u<un> -p<pw>" -d /dev/dvb/adapter3/demux0 -o /home/neil/mheg.xml
>
> Getting channel info from MythTV database
> mysql Ver 14.14 Distrib 5.5.23, for Linux (x86_64) using readline 5.1
> Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
>
> Oracle is a registered trademark of Oracle Corporation and/or its
> affiliates. Other names may be trademarks of their respective
> owners.
>
> Usage: mysql [OPTIONS] [database]
> -?, --help Display this help and exit.
> -I, --help Synonym for -?
....

> secure-auth FALSE
> show-warnings FALSE
> plugin-dir (No default value)
> default-auth (No default value)

All this (quite helpful) stuff means that mysql has received a malformed
command. My guess is a missing space between "-u" and your username. I
hate that mysql wants a space here but doesn't want a space between "-p"
and your password. So I think you need:

-m "-u myname -pmypassword"

> Getting program_map_pid from PAT
> program_map_pid = 1416

This is promising. Looks like device I/O is working.

> Getting carousel_pid from PMT
> ^CTraceback (most recent call last):
> File "/home/neil/mhegepgsnoop-0.3.6.py", line 855, in<module>
> main()
> File "/home/neil/mhegepgsnoop-0.3.6.py", line 286, in main
> the_pid = find_pid3(dmxfd, demux_filter)
> File "/home/neil/mhegepgsnoop-0.3.6.py", line 349, in find_pid3
> buffer.extend(dmxfd.read(3))
> KeyboardInterrupt
>

But something stops device reads later on. Puzzling because all the
reads are almost identical except for requested PID and number of bytes
to read.

I'm working on the next version so I'll add some more error trapping
around the device I/O to try and produce some clues about what's
failing. Should be out in a day or so.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


nhenwood.lists at gmail

Jun 21, 2012, 9:30 PM

Post #11 of 14 (742 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

On Fri, Jun 22, 2012 at 03:13:17PM +1200, David Moore wrote:
>
> All this (quite helpful) stuff means that mysql has received a
> malformed command. My guess is a missing space between "-u" and your
> username. I hate that mysql wants a space here but doesn't want a
> space between "-p" and your password. So I think you need:
>
> -m "-u myname -pmypassword"
>
Boom.

Well I seem to have some success if I update the spaces in the username/passwords, it downloads and populates the xml file as expected.

If you are going to do some work on it, would it make sence to use your script to capture and sanity check the mysql information, then pass it on as needed? That would let you be in control of what is being passed through.

Neil

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


dmoo1790 at ihug

Jun 21, 2012, 10:19 PM

Post #12 of 14 (748 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

On 22/06/12 16:30, Neil Henwood wrote:
> On Fri, Jun 22, 2012 at 03:13:17PM +1200, David Moore wrote:
>>
>> All this (quite helpful) stuff means that mysql has received a
>> malformed command. My guess is a missing space between "-u" and your
>> username. I hate that mysql wants a space here but doesn't want a
>> space between "-p" and your password. So I think you need:
>>
>> -m "-u myname -pmypassword"
>>
> Boom.
>
> Well I seem to have some success if I update the spaces in the username/passwords, it downloads and populates the xml file as expected.
>
Good to hear. Did you make any other changes apart from the
user/password thing?

> If you are going to do some work on it, would it make sence to use your script to capture and sanity check the mysql information,
> then pass it on as needed? That would let you be in control of what is being passed through.
>
Maybe. It's really something mysql should give you a clear error message
about IMHO. I've been bitten more than once running mysql from the
command line and forgetting about no space allowed between -p and
password. Trouble is the mysql error message is not helpful. Just tells
you access is denied. So maybe your idea makes sense.

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


nhenwood.lists at gmail

Jun 22, 2012, 3:22 AM

Post #13 of 14 (746 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

On 22/06/12 17:19, David Moore wrote:
>>
>> Well I seem to have some success if I update the spaces in the
>> username/passwords, it downloads and populates the xml file as expected.
>>
>
> Good to hear. Did you make any other changes apart from the
> user/password thing?
>
No other changes, however I may have spoken too soon, as running it at
the moment it starts, lists the channels in Myth, then dies with
[root [at] serve neil]# /home/neil/mhegepgsnoop-0.3.6.py -v -m "-u <un>
-p<pw>" -d /dev/dvb/adapter3/demux0 -o /home/neil/mheg.xml

Getting channel info from MythTV database
TV ONE TV ONE tv1.freeviewnz.tv
TV2 TV2 tv2.freeviewnz.tv
U U u.freeviewnz.tv
TVNZ 7 TVNZ 7 tvnz7.freeviewnz.tv
TV3 TV3 tv3.freeviewnz.tv
<snip>
U U u.freeviewnz.tv
TV2 TV 2 tv2.freeviewnz.tv
C4 C4 c4.freeviewnz.tv
ONE One tv1.freeviewnz.tv
TV3 TV3
FOUR FOUR
TV3 PLUS1 TV3 PLUS1
C4 C4
TV3 TV3
FOUR FOUR
TV3 PLUS1 TV3 PLUS1
C4 C4
Getting program_map_pid from PAT
program_map_pid = 300
Getting carousel_pid from PMT
carousel_pid = 1003
Started downloading blocks. Waiting for Download Message Block...
block_size = 4066 no_of_modules = 21
module_id = 1 module_size = 19685
module_id = 3 module_size = 13860
module_id = 4 module_size = 17221
module_id = 6 module_size = 17986
module_id = 7 module_size = 14853
module_id = 8 module_size = 20369
module_id = 9 module_size = 19278
module_id = 10 module_size = 19907
module_id = 11 module_size = 19850
module_id = 12 module_size = 19075
module_id = 13 module_size = 19352
module_id = 15 module_size = 16993
module_id = 16 module_size = 16939
module_id = 17 module_size = 1219
module_id = 18 module_size = 50991
module_id = 19 module_size = 16684
module_id = 20 module_size = 28518
module_id = 21 module_size = 10840
module_id = 23 module_size = 409
module_id = 27 module_size = 4642

Found Download Message Block. 97 blocks total to download...
Traceback (most recent call last):
File "/home/neil/mhegepgsnoop-0.3.6.py", line 855, in <module>
main()
File "/home/neil/mhegepgsnoop-0.3.6.py", line 288, in main
download2(the_pid, datablocks, module_numbers, dmxfd, demux_filter)
File "/home/neil/mhegepgsnoop-0.3.6.py", line 416, in download2
message_id = (buf[10] << 8) | buf[11]
IndexError: list index out of range

Running it again (and going away for a short while) and it hangs at
[root [at] serve neil]# /home/neil/mhegepgsnoop-0.3.6.py -v -m "-u <un>
-p<pw>" -d /dev/dvb/adapter3/demux0 -o /home/neil/mheg.xml

Getting channel info from MythTV database
TV ONE TV ONE tv1.freeviewnz.tv
TV2 TV2 tv2.freeviewnz.tv
U U u.freeviewnz.tv
TVNZ 7 TVNZ 7 tvnz7.freeviewnz.tv
TV3 TV3 tv3.freeviewnz.tv
<snip>
TV3 PLUS1 TV3 PLUS1
C4 C4
Getting program_map_pid from PAT
program_map_pid = 1647
Getting carousel_pid from PMT

Then running it again, is working.

Something is making it intermittent. Is there a way that i can make it
log a bit more to figure out what is going on? I'll have another go in
the morning to see what happens there, as the system is recording at the
moment, and seems to be ok.



_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


dmoo1790 at ihug

Jun 22, 2012, 4:55 PM

Post #14 of 14 (729 views)
Permalink
Re: Mhegepgsnoop Setup [In reply to]

On 22/06/2012 22:22, Neil Henwood wrote:

On 22/06/12 17:19, David
Moore wrote: Well I seem to have some success if I update the spaces in
the username/passwords, it downloads and populates the xml file as
expected. Good to hear. Did you make any other changes apart from the
user/password thing? No other changes, however I may have spoken too
soon, as running it at the moment it starts, lists the channels in Myth,
then dies with [root [at] serve neil]# /home/neil/mhegepgsnoop-0.3.6.py -v
-m "-u -p

" -d /dev/dvb/adapter3/demux0 -o /home/neil/mheg.xml Getting
channel info from MythTV database TV ONE TV ONE tv1.freeviewnz.tv TV2
TV2 tv2.freeviewnz.tv U U u.freeviewnz.tv TVNZ 7 TVNZ 7
tvnz7.freeviewnz.tv TV3 TV3 tv3.freeviewnz.tv U U u.freeviewnz.tv TV2
TV 2 tv2.freeviewnz.tv C4 C4 c4.freeviewnz.tv ONE One tv1.freeviewnz.tv
TV3 TV3 FOUR FOUR TV3 PLUS1 TV3 PLUS1 C4 C4 TV3 TV3 FOUR FOUR TV3 PLUS1
TV3 PLUS1 C4 C4 Getting program_map_pid from PAT program_map_pid = 300
Getting carousel_pid from PMT carousel_pid = 1003 Started downloading
blocks. Waiting for Download Message Block... block_size = 4066
no_of_modules = 21 module_id = 1 module_size = 19685 module_id = 3
module_size = 13860 module_id = 4 module_size = 17221 module_id = 6
module_size = 17986 module_id = 7 module_size = 14853 module_id = 8
module_size = 20369 module_id = 9 module_size = 19278 module_id = 10
module_size = 19907 module_id = 11 module_size = 19850 module_id = 12
module_size = 19075 module_id = 13 module_size = 19352 module_id = 15
module_size = 16993 module_id = 16 module_size = 16939 module_id = 17
module_size = 1219 module_id = 18 module_size = 50991 module_id = 19
module_size = 16684 module_id = 20 module_size = 28518 module_id = 21
module_size = 10840 module_id = 23 module_size = 409 module_id = 27
module_size = 4642 Found Download Message Block. 97 blocks total to
download... Traceback (most recent call last): File
"/home/neil/mhegepgsnoop-0.3.6.py", line 855, in main() File
"/home/neil/mhegepgsnoop-0.3.6.py", line 288, in main download2(the_pid,
datablocks, module_numbers, dmxfd, demux_filter) File
"/home/neil/mhegepgsnoop-0.3.6.py", line 416, in download2 message_id =
(buf[10]

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.