Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1203 closed patch (fixed)

Fix channels.conf import for ATSC OTA/QAM

Reported by: bolek-mythtv@… Owned by: danielk
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The goal of this patch is to fix the channels.conf import for ATSC enough so that a fully functional HDTV channel lineup can be created without manually editing the database (for an example of what kind of hoops users currently go through see http://www.mythtv.org/wiki/index.php/Adding_QAM_Channels_For_HDTV_Tuner_Cards).

There are three parts of this patch, all very simple:

  • Fix DVBConfParser::parseConfATSC to understand the standard azap channels.conf format as produced by atscscan. Someone already posted a patch for this a while back but it hasn't been applied and I can't find a reference. Sorry for not providing credit.
  • Do not put the serviceid in the channum column. This is bogus and creates false matches later when running mythfilldatabase.
  • Allow mythfilldatabase to match channels by callsign in addition to channum or xmltvid.

So, with the patch applied, the procedure to setup HDTV channels is as follows:

  1. Create DataDirect? lineup at labs.zap2it.com
  2. Run "atscscan yourfrequencyfile >channels.conf" to produce the initial channels.conf
  3. Edit channels.conf. You should remove unwanted channels and edit the first field of the desired channels to exactly match the callsign of the channels as used in the lineup from step 1. Do not touch other fields. There should be a one-to-one correspondence between the channels in channels.conf and the channels in the zap2it lineup.
  4. Run mythtv-setup and define the video source using the lineup from 1.
  5. Go to Input connections and import the channels.conf file. Note that at this stage channel numbers are not filled in yet, so leave the starting channel at 0.
  6. Exit setup and run "mythfilldatabase --do_channel_updates". This will match channels using callsign and will fill in channum, name and xmltvid fields.
  7. Run setup again and change the starting channel number to something good.

I don't know if this patch can go into 0.19, but as it is there is no good way to setup HDTV channels (especially with QAM) so maybe it should. I tried to make it as small as possible.

Attachments (3)

channel-import.patch (2.1 KB) - added by bolek-mythtv@… 18 years ago.
channel-import-2.patch (4.8 KB) - added by bolek-mythtv@… 18 years ago.
channel-import-3.patch (4.6 KB) - added by bolek-mythtv@… 18 years ago.

Download all attachments as: .zip

Change History (10)

Changed 18 years ago by bolek-mythtv@…

Attachment: channel-import.patch added

comment:1 Changed 18 years ago by danielk

Owner: changed from Isaac Richards to danielk

comment:2 Changed 18 years ago by danielk

Milestone: 0.20
  • Fix DVBConfParser::parseConfATSC to understand the standard azap channels.conf format as produced by atscscan.

This is good, the parser was written before atscscan was finished, it needs to match the actual output from that program...

  • Do not put the serviceid in the channum column

Ok, but you must put something unique in the channum column.

  • match channels by callsign

This will cause too many problems. Can you write something that tries to fill in the blank XMLTV id's from the callsigns instead?

If you can fix the channum column issue (assign consecutive numbers starting at 1 if you must, but don't use any numbers already assigned to a channel from a previous scan), then I'll apply the first two parts of this tonight as bug fixes.

Otherwise work on this for 0.20, though it might be a better use of your time to figure out why the internal QAM scanner isn't working for you.

comment:3 Changed 18 years ago by bolek-mythtv@…

OK, here is a reworked patch. This time is more localized and all channel matching is done in the import code and mythfilldatabase is not touched at all.

The usage is now as follows:

  1. Add Video Source
  2. Run mythfilldatabase
  3. Add Input connection and import the channels.conf file.

As Daniel mentioned, Step 2. should be somehow done automatically from within setup but I wasn't sure how to do this and where exactly. Also, it may require some UI and I have no interest in this. But if this is just a matter of sticking system() call somewhere I will be happy to do this.

Changed 18 years ago by bolek-mythtv@…

Attachment: channel-import-2.patch added

comment:4 Changed 18 years ago by bolek-mythtv@…

Actually, I forgot about the "Fetch Channels" button on Input connections screen. So no need to exit setup to run mythfilldatabase. This works well.

comment:5 Changed 18 years ago by bolek-mythtv@…

I made some small improvements and reuploaded the latest patch.

Changed 18 years ago by bolek-mythtv@…

Attachment: channel-import-3.patch added

comment:6 Changed 18 years ago by danielk

Resolution: fixed
Status: newclosed

(In [8860]) Closes #1203 by applying modified patch.

This is based off version 2 of the patch, but I believe I had already made the fix that Boleslaw made for version 3.

Anyway this allows you to import a channels.conf from atscscan, which is included in the dvb-apps repository at:

  cvs -z3 -d :pserver:anonymous@cvs.linuxtv.org:/cvs/linuxtv co -P dvb-apps"

The procedure is still insanely complicated, but is a little bit simpler than it was:

  • cd dvb-apps/util/scan ; make
  • ./atscscan atsc/us-Cable-[your cable providers standard] > channels.conf
  • Replace the first field of each line of channels.conf with a unique string.
  • Run mythtv-setup (create source, import channels.conf in Channel Scanner)
  • Run mythbackend & mythfrontend, and tune to every channel, renaming the unique strings in the channels.conf with the callsign as listed in your listings provider's channel lineup.
  • Add each channel you found to your listings provider's list of provided channels (with datadirect this means check the checkboxes next to the channel in the labs.zip2it.com HTML interface.)
  • Now quit mythbackend & mythfrontend and run mythtv-setup
  • In "Channel Editor", set Video Source to the source you imported channels.conf into originially and hit the Delete Channels button and confirm.
  • In "Input Connections" select a device connected to the source and press "Fetch channels from listings source". This can take a long time, and the output is sent to the terminal.
  • In the same device window press the "Scan for channels" button to the left of the fetch button, there select "Import channels.conf" as the scan type and import the channels again; this time most of the channels should be using the same channel numbers as your listings provider. Those which do not need additional attention.

NOTE: Any listings channel that is pulled in but does not have matching

tuning information from channels.conf may severe problems.

The rest of the configuration is as with any MythTV source.

comment:7 Changed 18 years ago by bolek-mythtv@…

Thanks and sorry if this was more work for you than originally intended.

Note: See TracTickets for help on using tickets.