[mythtv] DVB-C and MythTV

Christiaan van Dijk dvbmail at xs4all.nl
Sat Jun 2 10:56:58 UTC 2007

Hi all,

I've been working on a MythTV box with a DVB-C card and ran into some 
problems. I solved quite some issues and would like to share these here.

A known problem with DVB-C are the network IDs. In a normal DVB 
situation there's only one main network ID in the NIT which describes 
the used network. In DVB-C however the network ID needs to be entered 
manually and is not even located in the NIT but in NITo. I've seen some 
discussion on how to deal with this since it's not really DVB standard 
and solutions are mainly dirty hacks which only pollute the code. I 
tried a solution which is a bit in between (to my opinion :-) ), this 
solution makes it possible to give a network ID in the configuration 
script which is compiled into the code, if not defined (default) the 
code stays in it's original state. There is some code pollution with the 
conditional defines but I tried to keep it to a minimum.
To use a fixed network ID simply add the option --dvb-net-id=1111 to the 
configuration script (for network ID 1111).

There still is a bug in the standard code for handling the NITo tables, 
the buffering of the different sections needs to take the network ID 
into account since the NITo tables can and will include multiple network 
IDs. This could be tricky since there could be up to 64k-1 IDs in 
theory. The patch avoids this problem by only interpreting the NITo/NIT 
with the matching network ID as main NIT.

Also fixed a bug in the channel inversion setting, the scanner used to 
set an invalid value for DVB-C, now it defaults to auto. Really minor 
but avoids warnings in the log files.

When scanning for channels first enter one transport manually, scan the 
transport, all available transports will be added and do a final scan to 
get all the channels. Did not look into a fix for this yet since it's a 
pretty simple action.

Second problem part lies in the program guide. The cable company here 
(AtHome, Netherlands) uses a different interpretation of the short and 
extended EIT tables. The description always starts in the short 
description tables and continues in the extended table, there is no 
sub-title information. I added a fix for this in the EIT code part, 
tried to do it as much as possible in line with the other EIT fixups but 
it's a little tricky since it's both early/normal fix. The code tries to 
extract the episode information first from the description and if this 
fails from the main title. Not perfect but works for me and now I can 
record a series without having to select each episode or define a 
special recording rule. Also the descriptions are now complete.

I did comment out the UK channel numbering part since this screws up the 
channel numbering here. No big issue but it confused me a bit in the 
beginning. Cable box seems to get the channel numbers in another way, 
did not figure this one out yet.

Well, that's it for now. Still working on some other issues but the 
weather is way too nice to sit behind the computer all day :-) . Main 
problem remaining is the starting of live TV, sometimes the DVB stream 
will not start or takes too long and myth returns with an error, did not 
see this in normal recordings.

All the patches are attached, I hope this helps other people fighting 
with DVB-C boxes. Good luck!!!

Christiaan van Dijk
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dvb-c.diff
Url: http://mythtv.org/pipermail/mythtv-dev/attachments/20070602/7349c81b/attachment.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: athome-eit.diff
Url: http://mythtv.org/pipermail/mythtv-dev/attachments/20070602/7349c81b/attachment-0001.diff 

More information about the mythtv-dev mailing list