[mythtv] problems with livetv, mythroku, and the hdhomerun.

Maclaren, James M maclaren at tulane.edu
Tue May 8 15:40:58 UTC 2007

I am looking for some advice from those with a deeper knowledge of the
livetv part of mythtv and in particular with the HDHOMERUN device.


Here is the issue.  I have added watching livetv to the roku application

It works fine for my pvr 250 but is inconsistent with my networked

This device is fine when streamed to roku directly using the tvplay roku


In starting livetv I don't get any errors returned from the backend.
After selecting the correct free recorder


I have called the backend to initiate a livetv chain as follows (as
described in the mythtv wiki)


snprintf(msg, sizeof(msg),"QUERY_RECORDER
%d[]:[]SPAWN_LIVETV[]:[]live-%s-%s[]:[]%d", rec->rec_id, myhostname,
datestr, 0);


msg looks fine and the backend replies ok.  Then, I send the following


snprintf(msg, sizeof(msg),


 snprintf(msg, sizeof(msg), "BACKEND_MESSAGE[]:[]LIVETV_CHAIN UPDATE
live-%s-%s[]:[]empty", myhostname, datestr);


No errors returned.


then I ask If it is recording via


snprintf(msg, sizeof(msg), "QUERY_RECORDER %u[]:[]IS_RECORDING",


I get 1 returned.  If I put a sleep(5) between the livetv_chain_update
and is_recording it works on the hdhomerun more times than if I remove
it - without a sleep it almost always fails.


then I get all the program info from the backend with a msg like

snprintf(msg, sizeof(msg), "QUERY_RECORDER


I get consistent information by querying the mysql database


then I can pull off the file and try to open it.  I have also queried
the recorded table too to see what's is going on.


When it fails I see something like this.  Two files in my livetv
directory e.g.


-rw-r--r--  1 mythtv mythtv           0 May  8 06:45

-rw-r--r--  1 mythtv mythtv    58863176 May  8 06:46



The first is what the database and backend tells me is the file
associated with the show, when really it's the latter.  Of course as its
of zero size it won't open!


looking at the tvchain table I see these entries noting the time if off
by 2/100 of a second (looking at the file names), also it shows DUMMY
rather than the HDHOMERUN as the tuner name.


|   2261 | 2007-05-08 06:45:56 | live-roku1-2007-05-08T06:45:56
|        0 |             0 |        0 | myth:// |
DUMMY     | MPEG2TS   | 26_1     | 2007-05-08 06:45:58 |

|   2261 | 2007-05-08 06:45:58 | live-roku1-2007-05-08T06:45:56
|        1 |             1 |        0 | myth:// |
HDHOMERUN | MPEG2TS   | 26_1     | 2007-05-08 07:00:00 |


When it works it returns the right file name and no DUMMY entry is
present.  Relatively quickly the backend deletes the DUMMY entry from
the database and as a file.  I am at a loss of what to do.  It seems to
work fine from a regular frontend.  If the tvchain returned the base
name, then I could select it properly.


This problem never happens with my pvr250.


On a more general note when I change channels should you keep the same
livetv chain?  Is this true if one changes tuners or should that produce
a new chain?


I feel I am frustratingly close!


Any thoughts on how to solve this consistently would be useful or
general comments about the livetv option which routines in the frontend
handle the same calls.  I am running the latest (as of yesterday)
version of the backend (protocol 34).







-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20070508/8c5e01fd/attachment-0001.htm 

More information about the mythtv-dev mailing list