[mythtv-users] Guidance for phase 9

Tom Dexter digitalaudiorock at gmail.com
Thu Aug 15 17:10:09 UTC 2019


On 8/15/19, Tom Dexter <digitalaudiorock at gmail.com> wrote:
>
> The utility I wrote for my own purposes essentially allows a frequency
> change to the channel table for an existing specific channel...either
> by assigning a different existing transport on the dtv_multiplex table
> or by creating a new one if necessary, and will also adjust the freqid
> and the serviceid (the program id in the transport) on the channel
> table as needed as well. You can get the parameters it requires from
> that hdhomerun_config output. It's basically a surgical one at a time
> utility, but the changes go pretty fast using it. I don't see any good
> way to do that via either the channel editor and/or the "Edit
> Transports". I originally wrote it in PHP only because I code database
> stuff in PHP every day.
>
> Yesterday I actually finished a version of the same written in perl
> that's adjusted to where it should be usable for others...though
> obviously on a "use at your own risk", no guarantees basis. As luck
> would have it, I hadn't yet turned my antenna to scan for the 8/1
> changes to Philideiphia market and make those changes. So today I did
> so and that allowed me to test that out, and it worked great for me.
> In fact I was able to change frequencies with the backend running
> testing them with LiveTV as I changed each.
>
> I'll send another reply with that script attached (if the list allows
> that), with some notes.
>
> Tom
>

I've attached that perl script here. Note that it has pretty thorough
help using -h or --help. A few things to note:

1. Obviously this is only intended for U.S. ATSC.

2. You might get warnings that the TID (transportid) of an existing
transport on dtv_multiplex differs from the one you've specified on
the command line. As far as I've seen however ATSC is totally
unaffected by that functionally.

3. The script currently relies on the MythTV Perl bindings, however it
does so only as an easy way to get a database connection. If need be,
this could easily be tweaked to just use DBI and  DBD::mysql directly
for someone without those bindings installed.

Here's an example from today when I corrected the CBS network out of
Philly (10.1). Here's the output from the hdhomerun_config scan:

SCANNING: 557000000 (us-bcast:28)
LOCK: 8vsb (ss=73 snq=98 seq=100)
TSID: 0x09BB
PROGRAM 3: 10.1 WCAU-TV
PROGRAM 4: 10.2 COZI-TV
PROGRAM 5: 62.1 WWSI-TV
PROGRAM 6: 62.2 EXITOS

Based on that, this tests the existing channel:

./mythtv-us-atsc-freq-check 557000000 0x09BB 10.1 3
CHECKING: dtv_multiplex: Freq: 557000000	TID: 2491 (0x09BB)
FOUND: mplexid: 3 transportid: 2491 frequency: 557000000

CHECKING channel channum: 10.1
CHANNEL INFO:
	mplexid: 20
	chanid: 1101
	serviceid: 3
	channum: 10.1
	callsign: WCAU-TV
	freqid: 34

DIFFERING DB freq: 34 New: 28
DIFFERING DB mplexid: 20 New: 3
Matching DB serviceid 3 New: 3

...and this updates it. Note that if a new transport is required this
would need the -c option:

./mythtv-us-atsc-freq-check -u 557000000 0x09BB 10.1 3
WARNING: Continue enabling the following update(s): Update channel? (y/n)?: y
CHECKING: dtv_multiplex: Freq: 557000000	TID: 2491 (0x09BB)
FOUND: mplexid: 3 transportid: 2491 frequency: 557000000

CHECKING channel channum: 10.1
CHANNEL INFO:
	serviceid: 3
	callsign: WCAU-TV
	mplexid: 20
	chanid: 1101
	channum: 10.1
	freqid: 34

DIFFERING DB freq: 34 New: 28
DIFFERING DB mplexid: 20 New: 3
Matching DB serviceid 3 New: 3

UPDATING channel info...
	OK: affected rows: 1
CHANNEL INFO:
	mplexid: 3
	chanid: 1101
	callsign: WCAU-TV
	serviceid: 3
	freqid: 28
	channum: 10.1

Matching DB freq: 28 New: 28
Matching DB mplexid: 3 New: 3
Matching DB serviceid 3 New: 3

Again, no guarantees, but this has sure saved me a world of hurt.

Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythtv-us-atsc-freq-check
Type: application/octet-stream
Size: 9287 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20190815/69cb6906/attachment.obj>


More information about the mythtv-users mailing list