Myth BOX
The home of guides for Myth TV, IPTables, and other linux based phenomena.
HD version
General guides
Channel setup
Home automation
Product overview
Useful links
SD version
General guides
DVB Card
Myth TV
Broadband modem
Wireless network
Network shares
Network IDS
Extra security
EPIA specific guides
TV-Out cables
Audio/USB cables
Wireless network
EPIA Kernel
Openchrome drivers
Surround sound
Online store
Prebuilt mythbox
Useful links

Making your HD channels work alongside your SD channels

Initial setup

You've got your Freesat HD card ready to receive HD versions of your favourite channels, so all you need to do now is hit the scan button right? Not quite. This is true for scanning on Freeview cards, but for satellite based cards you first need to give a starting frequency that mythtv-setup can tune to before it picks up the other multiplexes. Up-to-date channel frequency info can be found here, but here are the parameters for the lazy:
  • Frequency: 10847000
  • Polarity: Vertical
  • Symbol rate: 23000000
  • Mod sys: DVB-S2
  • FEC: 3/4
  • Modulation: 8PSK
  • Inversion: auto
  • Rolloff: 0.35

Merging the Freeview schedule with the Freesat HD schedule

Assuming you've done a full scan of channels for both Freeview and Freesat HD, you should find you have all of the channels - albeit they're all using different ranges. For instance, BBC One on Freeview is intuitively stored under channel 1, but on Freesat at the time of writing BBC One HD live under channel 108. This range of channels makes it painful to scroll through - do you really want to scroll through 100 channels to reach the HD equivalent of BBC One?

One solution is to use the Freeview channel numbering as a base, and then map the equivalent Freesat channels to the same numbering scheme. So you could have BBC Two living under channel 2 on both Freeview and Freesat, which means that if your Mythbox HD is recording on one tuner your BBC Two will still live under the same channel number regardless. In addition to this, you could move your HD Freesat channels under their corresponding SD channel number, so for instance ITV 1 HD lives at channel 3 along with the Freeview channel ITV 1.

But what about all those extra channels on Freesat HD that don't fit into the Freeview numbering scheme? Well, some of these channels you'll probably love, and some will be tiresome to skip past everyday. So it would be nice if we could remove the channels we're not interested in, and move a whitelist of Freesat channels to the end of the Freeview lineup. This organisation is exactly what we were aiming for here at, and given the frequency of times that rescanning is required, we decided to construct a script to do all of the hard work of moving channel numbers around (and even populate the channel icons while we're at it).

The script has the following usage:
./ <freeviewsourceid> <freesatsourceid> <freeviewchannels> <freesatchannels> <channelstoremove> | mysql -u<mythtv_user> -p<mythtv_pass>
  • The freeviewsourceid and freesatsourceid parameters are the numeric IDs in your mythtv database which point to the cards.
  • The freeviewchannels parameter is a file containing three fields which are separated by a '=' character. The first field is an ordered list Freeview channel names, and the second is the corresponding Freesat HD channel name. The third is the icon for the Freeview channel. E.g. BBC ONE=BBC 1 Yorks=bbc_one_yorkshire_lincolnshire.jpg. A sample file can be found here.
  • The freesatchannels paramter is a file containing four fields, again separated by a '=' character. The first field is an ordered list of Freesat HD channels we wish to keep (whose names aren't referenced in the freeviewchannels file). The second parameter is only used for HD channels, and is the Freeview channel name of the equivalent SD channel. The third parameter is the icon for the Freesat channel, and the forth parameter is the icon for the SD channel version in cases where there are both HD and SD versions. E.g. BBC One HD=BBC ONE=bbc_one_hd.jpg=bbc_one_yorkshire_lincolnshire.jpg. A sample file can be found here.
  • The channelstoremove is a list of channel names to remove after completing all other operations. A sample file can be found here.
Running the script will output some SQL used to update the channels. The SQL will take a copy of the channel table (called channel_new) leaving the original in tact. First, the Freesat SD equivalent channels are renamed to be the same as the Freeview channel names and renumbered. Only one regional variant is kept from the Freesat lineup. Next, the Freesat only channels are moved under channel numbers 200 onwards. Any channels which are HD replacements are swapped with their SD counterparts, and the SD duplicate versions put under channel 250 onwards in case they are needed. Then any channels specified for removal are deleted, and finally any channel number beyond our last SD duplicate channel is removed.

To activate the new channel table, under MySQL run:
rename table channel to channel_old; rename table channel_new to channel
Be sure to stop your mythbackend before running the above, and starting it afterwards.