Mailing List Archive

mythtv-users@snowman.net
So, I've finally got IVTV working and mplayer is currently happily
displaying TMF on my monitor (ok, the sound is about 1 second behinid
the image but that's a problem for another day).

It was a bit difficult to be able to tune into a channel using the
ptune.pl that comes with IVTV because the only setting that made any
sense "europe-west" didn't show anything for any channel (which was
pretty obvious because it wouldn't even allow channels with numbers
lower than 21 when most Dutch channels are < 20).

So I figured out which frequencies were used for most channels and used
ioctl_test directly to tune into a channel (frequency * 16 for those who
don't want to figure it out for themselves). That works perfectly.

So what I want to know is how I can "teach" MythTV which frequencies
belong to which channels. Anyone?

Cheers,
-Tako
Re: mythtv-users@snowman.net [ In reply to ]
On Sunday 08 June 2003 02:18 pm, Tako Schotanus wrote:
> So what I want to know is how I can "teach" MythTV which frequencies
> belong to which channels. Anyone?

Edit libs/libmythtv/frequencies.c

Isaac
Re: mythtv-users@snowman.net [ In reply to ]
> So what I want to know is how I can "teach" MythTV which frequencies
> belong to which channels. Anyone?

Had a similar problem in the UK while receiving cable TV signals which are
modulated at different frequencies to the standard pal europe-west
frequencies, in some cases.

Wrote a little script to try all the frequencies and figured out which ones
had channels on.

I hacked the "channel" table to make the 'channum' field a varchar(6) instead
of varchar(5), then after I run mythfilldatabase I run another script which
puts the actual frequencies into the channum field. This works out handily
for passing to 'ptune.pl -f europe-west -F' in the channel change command
field in myth.


--8<-- fix_myth_channels.pl --8<--
#!/usr/bin/perl -w

use strict;

# in %chans hash, key is the xmltv id, value is the frequency
my %chans = qw/
west.bbc1.bbc.co.uk 471250
west.bbc2.bbc.co.uk 487250
west.htv.co.uk 503250
channel4.com 519250
channel5.co.uk 311250
news-24.bbc.co.uk 63250
sky-one.sky.com 271250
thebox.co.uk 351250
british.eurosport.com 55250
/;

use DBI;

my $dsn = "DBI:mysql:database=mythconverg";
my $dbh = DBI->connect($dsn, "user", "password") or die $!;

my $sql = "";
for my $key (keys %chans)
{
$sql = "update channel set channum='$chans{$key}' where
xmltvid='$key'";
print "$sql\n";
$dbh->do($sql) or die $!;
}
Re: mythtv-users@snowman.net [ In reply to ]
Not wanting to burden the developers with even more work, but how about
putting the channel -> frequency tabel in the database as well?
It seems like a pity to hard-code all this regional information in a
couple of static arrays when we've got this entire database to use :-)
It would make it much easier to make a user interface later on where
channels could be managed (adding new, removing
non-existing/uninteresting ones, changing the order of the list).

I wouldn't mind doing it myself if effort would be appreciated.

Cheers,
-Tako

Isaac Richards wrote:

>On Sunday 08 June 2003 02:18 pm, Tako Schotanus wrote:
>
>
>>So what I want to know is how I can "teach" MythTV which frequencies
>>belong to which channels. Anyone?
>>
>>
>
>Edit libs/libmythtv/frequencies.c
>
>Isaac
>_______________________________________________
>mythtv-users mailing list
>mythtv-users@snowman.net
>http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
>