Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#13472 closed Developer Task (Fixed)

Channel Scan improvements

Reported by: Klaas de Waal Owned by: Klaas de Waal
Priority: minor Milestone: 32.0
Component: MythTV - Channel Scanner Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This ticket is intended to document and track non-trivial changes to the Channel Scan of mythtv-setup.

The idea is to add patches to this ticket that can be applied to the latest master. This gives the possibility for feedback and early testing, before the changes are committed to master.

The attached patch, 20190724-keep-channum-ok-all.patch, implements the following features.

1. Add "OK All" button

After a channel scan you can get a pop-up dialog with text like this:

"Channel xxx has channel number 1 but that is already in use. Please enter a unique channel number. Default is 5."

This question is repeated for each channel with a duplicate channel number, requiring a press on the OK button for each. There is now an "OK All" button that answers OK for all channels.

2. Keep existing channel numbers with a rescan

In mythtv-setup the channel number is by default the service ID of that channel, unless there is a LCN Logical Channel Number present. The channel numbers can later be modified with the Channel Editor of mythtv-setup.
However, this leads to conflicts when the video source is scanned again.
On a rescan mythtv-setup now keeps the existing channel numbers.
Previously, the only way known to me to have user-defined channel numbers is to run a SQL script over the channel table after each scan.

3. No more channel conflicts on service ID's

A "conflicting channel" in mythtv-setup is a channel that does not have a unique channel number. It is essential to have a unique channel number for all channels in a video source otherwise mythbackend can arbitrarily select any channel with the same channel number for a recording.
However, mythtv-setup also considers a channel conflicting if the service ID is the same as another channel and then forces the user to enter a unique channel number.
In my understanding this is a bug because A. it does not change the service ID and B. service ID's do not need to be unique.
For DVB the test on service ID is removed and all DVB channels are now considered "non-conflicting" to start with. Note that later on the check on uniqueness of the channel number is still done.

The test case for this is the Hotbird 13.0E satellite. This satellite has a number of different networks. Each network has probably unique service ID's but, over all channels of the satellite, there are many channels with identical service ID's and identical Logical Channel Numbers.
With this patch, mythtv-setup can now scan all channels of the Hotbird 13.0E with a minimum number of key presses by the user.

Attachments (5)

20190724-keep-channum-ok-all.patch (14.1 KB) - added by Klaas de Waal 6 years ago.
Keep channel numbers after resecan; added "OK All" button; remove check on service ID
setup4.log (31.0 KB) - added by jpilk 6 years ago.
Tuning log of DVB-T/T2 system
setup.log (39.4 KB) - added by jpilk 6 years ago.
setup5.log (25.9 KB) - added by jpilk 6 years ago.
Successful scan of DVB-T transports: setup5.log
msetup2.txt (53.9 KB) - added by jpilk 6 years ago.
Scan of all known transports for DVB-T only and DVB-T/T2 tuners at 2dcfeb4

Download all attachments as: .zip

Change History (51)

Changed 6 years ago by Klaas de Waal

Keep channel numbers after resecan; added "OK All" button; remove check on service ID

comment:1 Changed 6 years ago by Klaas de Waal <kdewaal@…>

In 85314f4e9/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:2 Changed 6 years ago by Klaas de Waal

In mythtv commit 4636d7e4146a70195b33ba9a565f01e9ed43a521

Check video source and capture card before doing a channel scan

In mythtv-setup page Channel Editor, check that a video source is selected and that the selected video source is connected to a capture card before starting the Channel Scan dialog after pressing the Channel Scan button. Give a popup message when the checks fail.

Previously, if a video source was selected that did not have a capture card connected the Channel Scan page would automatically switch to another video source, one that did have a capture card connected, without warning.

comment:3 Changed 6 years ago by Klaas de Waal <kdewaal@…>

In 1c8a75d3d/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:4 Changed 6 years ago by jpilk

Minor observation. I just rescanned my single-transmitter UK Freeview DVB-T-only system to see if anything had changed. It went very smoothly, (not) finding 1 off-air channel, but reported 7 transports while listing only 6 distinct frequencies. On repeat, it found no changed channels and 6 transports.

Scan params:  All types, Unencrypted only, LCN required, Complete data, Full Search
              All known transports, ignore timeout, follow links


MythTV Version : v31-Pre-477ddfdaf5b
MythTV Branch : HEAD -> master

.....
2019-09-04 11:31:56.160298 I  CardUtil[1]: Set delivery system: DVB-T

Off-air channels (1):
qam_64:538000000:Loveworld:270:15000:0: 10270:cnt(pnum:1,channum:1)

2019-09-04 11:32:47.134756 I  ChanImport: Old channels found in same transport: 134
2019-09-04 11:32:47.134766 I  ChanImport: Old channels found in other transport: 0
2019-09-04 11:32:47.134773 I  ChanImport: Old channels not found (off-air): 1

Channel list (134):
qpsk:514000000:Notts TV:7:12323:9018:32844:32780=32780:dvb      10007:cnt(pnum:1,channum:1)
....
qam_64:762000000:QVC Beauty:35:12323:9018:28288:24640=24640:dvb 10035:cnt(pnum:1,channum:1)

Found 7 transports:
Channels: FTA Enc Dec
ATSC        0   0   0
DVB       134   0   0
SCTE        0   0   0
MPEG        0   0   0
NTSC        0
Unique: prog 134 atsc 0 atsc minor 0 channum 134
Max atsc major count: 0

=========
(rescan)
....
qam_64:762000000:QVC Beauty:35:12323:9018:28288:24640=24640:dvb 10035:cnt(pnum:1,channum:1)

Found 6 transports:
Channels: FTA Enc Dec
ATSC        0   0   0
DVB       134   0   0
SCTE        0   0   0
MPEG        0   0   0
NTSC        0
Unique: prog 134 atsc 0 atsc minor 0 channum 134
Max atsc major count: 0

....
qam_64:762000000:QVC Beauty:35:12323:9018:28288:24640=24640:dvb

2019-09-04 11:43:41.151328 I  ChanImport: Found 0 unused transports.
2019-09-04 11:44:03.451605 I  OpenGL2: Deleting OpenGL Resources
2019-09-04 11:44:03.452743 I  OpenGL: Deleting OpenGL Resources
[john@HP_Box ~]$

comment:5 Changed 6 years ago by Klaas de Waal

Questions:

  • Did you delete the off-air channels at the end of the first scan?
  • Is the 538MHz present in the channel list of the first scan?
  • Is the list of 134 channels found in the first scan identical to the 134 channels found in the second scan?

If you still have the complete log then maybe you can add it to the ticket?

N.B. I do appreciate you giving the values of the scan parameters.

comment:6 Changed 6 years ago by jpilk

IIRC I accepted the changes from the first scan and exited mythtv-setup. Then re-entered and scanned again, same params. The frequencies listed were the same in each run, and are those known to the Transport Editor. I think the channel list was unchanged by the second scan, but I didn't check it in detail. No changes were reported. I'm afraid I didn't save the log, and rebooted afterwards, so it has gone.

As you can see from the timestamps it was all quite quick. Obviously I can't create new channels for testing but I will save logs the next time I see anything noteworthy. And thanks!

Changed 6 years ago by jpilk

Attachment: setup4.log added

Tuning log of DVB-T/T2 system

Changed 6 years ago by jpilk

Attachment: setup.log added

comment:7 Changed 6 years ago by jpilk

Log attached from MyGica? 230 tuner under 5.2.11-100.fc29.x86_64 File setup4.log

The DVB-T tuner is having trouble with 2 transports and its logs have ended unexpectedly. Perhaps the rain problem again. The teed displayed logs ended with 'Handling Aborted'. File setup.log

It's also just conceivable that the unexpected exit was caused by a current kdeinit5 closure bug in F29.

Changed 6 years ago by jpilk

Attachment: setup5.log added

Successful scan of DVB-T transports: setup5.log

comment:8 Changed 6 years ago by Klaas de Waal <kdewaal@…>

In 796c4c582/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:9 Changed 6 years ago by Klaas de Waal <kdewaal@…>

In 6ab6329ce1/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

Changed 6 years ago by jpilk

Attachment: msetup2.txt added

Scan of all known transports for DVB-T only and DVB-T/T2 tuners at 2dcfeb4

comment:10 Changed 6 years ago by jpilk

This scan was the second tried after the build, and looks OK. The first one, with wind and rain, again had problems with one DVB-T transport and included 26 lines of CVCT debug info at the start of the DVB-T/T2 section; but those results looked OK too.

comment:11 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In be306250bd/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:12 Changed 5 years ago by Klaas de Waal <klaas@…>

In 952e76461c/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:13 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In d7a79b6a5/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:14 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In f9eadcacf5/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:15 Changed 5 years ago by Klaas de Waal

In commit ef9cc022c1baa888add8b4d0bfc99ec190b0c607 (but not mentioned in the commit comments):

Logical channel numbers maybe possible on all Sky satellite channels.

The way the channel numbers are coded on the Astra-2 28E2 satellite for Sky UK is done in exactly the same way on the Sky New Zealand satellite. It uses the same private descriptor so table 0xB1 with the channel numbers should be decoded correctly. For New Zealand, the orginal network ID is different and the bouquet ID is specific for New Zealand and most likely also region-specific.

I have now removed the check on the original network ID so that a channel scan with mythtv-setup might now get the channel numbers correct for all Sky satellites if they use this way of channel number coding everywhere.

Note that there must be a valid bouquet ID given in the Video Source; this is needed to select the bouquet that contains the channel numbers.

comment:16 Changed 5 years ago by Mark Spieth <mspieth@…>

In efbc436e3/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:17 Changed 5 years ago by Klaas de Waal <klaas@…>

In 83d8bbc825/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:18 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In 6d2e7b2771/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:19 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In aeb0f2558/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:20 Changed 5 years ago by Klaas de Waal

Milestone: needs_triage32.0

comment:21 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In 3c6622881e/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:22 Changed 5 years ago by Klaas de Waal

In commit f1ea02d40b52d2a46636159c659c45d061bcf1d2

One-part channel number for ATSC cable

Implement the one-part channel number for ATSC cable as defined in ATSC standard A65/2013 7 August 2013 page 35. In this case the ATSC major number is 1008 (0x3F0) or higher and all channels in all multiplexes have this major number.

Change the name of the MPTS full-transport stream channel to use the freqid instead of the major number when the one-part channel number is used.

comment:23 Changed 5 years ago by Klaas de Waal

In commit cae6477880ce310a4b43516eb8fde73c9b06754e

ATSC scan fixes part 1

Fix HasCachedAllCVCTs and HasCachedAllTVCTs to give the correct answer when no tables have been found yet. Add listening to SCTE_PSIP_PID in the stream reset functions because this pid is also added in the constructor.

comment:24 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In b4fc0e1f8a/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:25 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In 3c6622881e/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:26 Changed 5 years ago by Klaas de Waal

Transport Editor for DVB-C

The transport editor of mythtv-setup can now edit the modulation system of a DVB-C transport stream multiplex to any of the three supported values. The list of choices and the default value for the symbol rate are now correct for DVB-C and the same as presented in the "Full Scan (Tuned)" pane of the scanner.

Commit: afb2de9fa4418a23a0e4fc2bac65d54ede58a83f

comment:27 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In ac67d5837/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:28 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In c7128cf0d3/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:29 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In 7097da34c/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:30 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In 405e049c7/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:31 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In f599c35bd/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:32 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In 31129946b7/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:33 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In d0626e9028/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:34 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In 1b4d44b46/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:35 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In 81d4056c2/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:36 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In d052cbc41c/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:37 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In e0e09b6b6/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:38 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In c8c59f554/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:39 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In ee78ba330/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:40 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In 82502230c0/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:41 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In 0085bdf66/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:42 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In c970d5837/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:43 Changed 5 years ago by Klaas de Waal <kdewaal@…>

In e05a8a841b/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:44 Changed 5 years ago by Klaas de Waal <klaas@…>

In f1cfc489b0/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:45 Changed 5 years ago by Klaas de Waal

Resolution: Fixed
Status: assignedclosed

No big changes in channel scanning foreseen for the near future, but when that happens new tickets will be created as Github issues. Therefore closing this ticket.

comment:46 Changed 5 years ago by Klaas de Waal <klaas@…>

In 2e1cccb62/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available
Note: See TracTickets for help on using tickets.