View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 56 posts ] 
Go to page 1, 2, 3, 4  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Jan 22, 2005 6:27 pm 
Offline
Joined: Sat Sep 18, 2004 9:07 pm
Posts: 94
Okay, I've managed to install KnoppMyth R4V5 on my SATA hdd and load DVB drivers for my VisionPlus card, thanks to very useful guides at:

http://mysettopbox.tv/phpBB2/viewtopic.php?t=1357
http://mysettopbox.tv/phpBB2/viewtopic.php?t=1701.

Now, I can't figure out how to set up mythtv channels. I'm in Sydney, and I have no idea which tv_grab_au file to use (there seems to be a few on the web, and am having no luck with any of them).

So, please point me to a howto of tuning channels in Sydney for KnoppMyth.

Oh, and another thing, I got the DVB drivers working, but the howto doesn't describe how to load the drivers on boot.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 8:25 am 
Code:
#!/usr/bin/perl -w
# Australian TV Guide XMLTV grabber by Damon Searle
# Derived from a yahoo XMLTV grabber by Ron Kellam which was itself...
# Derived from original code by Justin Hawkins
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

# 30 Oct 2004
#  Damon Searle <djsearle@netspace.net.au>
#  - wrote first version
#  - gets data from NineMSN as a backup. Its not that fancy,
# 31 Oct 2004
#  Fred Donelly <fdonelly@hotmail.com>
#  - added an option so that the output file can be specified on the
#    command line and from the quick test I gave it, it now works with
#    mythfilldatabase.
#  - $offset set to +1000 at the top and then had "+1000" set in a
#  output string further down rather than the variable
# 4 Nov 2004
#  Paul Andreassen <paulx@andreassen.com.au>
#  - learned some perl and now wants to go back to python
#  - added and then reduced status info
#  - retry on failure to getstore
#  - changed cache to '/var/local/tv_grab_au'
#  - added threading for each day
# 5 Nov 2004
#  - improved threading with use of queue
#  Eyal Lebedinsky <eyal@eyal.emu.id.au>
#  - easier location selection
# 8 Nov 2004
#  Paul
#  - fixed pid=0 bug
#  - did some merging, I hate merging
# 9 Nov 2004
#  Rob Hill <rob@dot.net.au>
#  - added Sydney
# 10 Nov 2004
#  Mary Wright <mwright@taz-devil.dyndns.org>
#  - digital info for Sydney
#  Paul
#  - more cleanup and improved error checking
#  - used mirror instead of getstore to get any updates
#  - mirror didn't work replaced with own smarts to check for updates to times
# 11 Nov 2004
#  - added program name in check
# 13 Nov 2004
#  - added freesd for Brisbane
# 14 Nov 2004
#  - --configure to exit nicely
#  - if no program data then skip program nicely, mainly for foxtel data
#  - added foxtel channels

use strict;
use Getopt::Long;
use XMLTV;
use LWP::Simple;
use Date::Manip;
use File::Path;
use threads;
use Thread::Queue;

# Instructions:
# Select your region and source.
# If your location isn't listed below, go to
# http://tvguide.ninemsn.com.au/guide/ select your area
# look at the last number in the URL before ".asp" and set
# the region variable below. Then put the channel names as listed
# on the tv guide site into the variables below.
# Then set your XMLTV ids from the database in the XMLTVID_URL variable.
#
# If it doesn't work with mythfilldatabase, try:
# ./tv_grab_au
# mythfilldatabase --file 1 -1 /var/local/tv_grab_au/guide.xml

# pick your region
#
#my $location = "Brisbane";
#my $location = "Canberra";
#my $location = "Sydney";
my $location = "Australia";

# pick your source
#
#my $source = "free";
#my $source = "freesd";
#my $source = "freehd";
my $source = "foxtel";

# choose the XMLID URL suffix that mythtv knows
#
my $XMLTVID_URL = "d1.com.au";

# change to how you think it should work
my $days_to_grab = 7;
my $threads = 5;
my $retrys = 3;
my $secondsbeforeretry = 2;

# Variables
my $guide_url = "http://tvguide.ninemsn.com.au/guide/";
my $details_url = "http://tvguide.ninemsn.com.au/closeup/default.asp?pid=";
my $cache_dir = "/var/local/tv_grab_au";

my $XMLTV_prefix = $source . "." . $location . ".";
my $XMLTV_suffix = "." . $XMLTVID_URL;

my $region; my $offset;
my %channels;

if ("Canberra" eq $location) {
   $region = "126";
   $offset = "+1100";
   if ("free" eq $source) {
      $channels{"ABC NSW"}="2";
      $channels{"Prime Southern"}="PrimS";
      $channels{"SBS Sydney"}="SBS";
      $channels{"Southern Cross TEN Capital"}="10Cap";
      $channels{"WIN Television NSW"}="WIN"
   } elsif ("freesd" eq $source) {
      $channels{"ABC NSW"}="2";
      $channels{"Prime Southern"}="7";
      $channels{"SBS Sydney"}="SBS";
      $channels{"Southern Cross TEN Capital"}="10";
      $channels{"WIN Television NSW"}="9"
   } else {
      print "Unknows source '$source' for $location\n";
      exit (1);
   }
} elsif ("Brisbane" eq $location) {
   $region = "79";
   $offset = "+1000";
   if (("free" eq $source)||("freesd" eq $source)) {
      $channels{"ABC QLD"}="2";
      $channels{"Channel Seven Queensland"}="7";
      $channels{"SBS Queensland"}="SBS";
      $channels{"Southern Cross TEN Queensland"}="10";
      $channels{"WIN Television QLD"}="9";
   } else {
      print "Unknows source '$source' for $location\n";
      exit (1);
   }
} elsif ("Sydney" eq $location) {
   $region = "73";
   $offset = "+1000";
   if (("free" eq $source)||("freesd" eq $source)) {
      $channels{"ABC NSW"}="2";
      $channels{"Channel Seven Sydney"}="7";
      $channels{"SBS Sydney"}="SBS";
      $channels{"Network TEN Sydney"}="10";
      $channels{"Channel Nine Sydney"}="9";
   } else {
      print "Unknows source '$source' for $location\n";
      exit (1);
   }
} elsif ("Australia" eq $location) {
   $region = "123";
   $offset = "+0930";
   if ("foxtel" eq $source) {
      $channels{"Arena TV"}="Arena";
      $channels{"BBC World"}="BBC";
      $channels{"Cartoon Network"}="Cartoon";
      $channels{"Channel [V]"}="Red";
      $channels{"CNBC"}="CNBC";
      $channels{"CNN"}="CNN";
      $channels{"Discovery Channel"}="Disc";
      $channels{"FOX News"}="FoxFNC";
      $channels{"FOX8"}="FOX";
      $channels{"MAX"}="FoxMMX";
      $channels{"National Geographic Channel"}="NatGe";
      $channels{"Nickelodeon"}="Nick";
      $channels{"Showtime"}="Show";
      $channels{"Showtime 2"}="FoxSH2";
      $channels{"Sky News"}="SkyNews";
      $channels{"TV1"}="TV1";
      $channels{"UKTV"}="UKTV";
   } else {
      print "Unknows source '$source' for $location\n";
      exit (1);
   }
} else {
   print "Unknows location '$location'\n";
   exit (1);
}

my $prog_ref;
my $chan_ref;

foreach my $channel (keys %channels)
{
   $$chan_ref{$channel} =
        {
      'id' => $XMLTV_prefix . $channels{$channel} . $XMLTV_suffix,
      'display-name' => [ [ $channel, undef ]]
   };
}


# Options
my $opt_days;
my $opt_output;
my $opt_configfile;
my $opt_configure = 0;

GetOptions('days=i'        => \$opt_days,
      'output=s'      => \$opt_output,
      'config-file=s' => \$opt_configfile,
      'configure'     => \$opt_configure,
      );

if ($opt_days) {
   $days_to_grab = $opt_days
}

if (!($opt_output)) {
   $opt_output = $cache_dir . "/guide.xml";
}

# $opt_configfile should probably do something ('/home/mythtv/.mythtv/tv_grab_au.xmltv')

if ($opt_configure == 1)
{
    print "configuration must be done in this script $0\n";
    exit (0);
}

print "grabing $days_to_grab days into $opt_output\n";




print "starting $threads threads\n";

my @thrlist;
my $datepids = Thread::Queue->new;

for (my $thread=0; $thread<$threads; $thread++)
{
        push @thrlist, threads->new(\&fetch_details);
}

print "loading queue\n";

my $currentday = &ParseDate("today");
my $day_counter = 1;
while ($day_counter <= $days_to_grab)
{
   my $date = &UnixDate($currentday, "%d%m%Y");
   my @day_lines = get_day($date,1);
   if (@day_lines == 0)
   {
      $currentday = &DateCalc($currentday, "+ 1 day");   
      $day_counter++;
           next;
   }

   my @pids;
   my @rowspans;
   my @names;
   foreach my $line (@day_lines)
   {
      foreach my $link (split /\n|tr|TR|TD|tr/, $line )
      {
         if ($link =~ /closeup\/default.asp/)
         {
            my $rowspan = $link;
            $rowspan =~ s/.+rowspan=//g;
            $rowspan =~ s/ .+//g;
            
            my $name = $link;
            $name =~ s/.+target=new>(<P>|)//g;
            $name =~ s/<\/a>.+//g;
         
            $link =~ s/.+pid=//g;
            $link =~ s/".+//g; #"
            if (($rowspan =~ /\d+/) and ($link =~ /\d\d+/))
            {
               push @pids, $link;
               push @rowspans, $rowspan;
               push @names, $name;               
            }
         }
      }
   }

   if (changed_guide($date,@pids,@rowspans,@names))
   {
      for (my $count=0; $count <= $#pids; $count++)
      {
         $datepids->enqueue($date . "-" . $pids[$count]);
      }
   }

   $day_counter++;
   $currentday = &DateCalc($currentday, "+ 1 day");
}

for (my $thread=0; $thread<$threads; $thread++)
{
   $datepids->enqueue(0 . "-" . 0);
}

print "queue is complete\n";

foreach my $thr (@thrlist)
{
    $thr->join;
}

print "all threads done\n";
print "building xml structure\n";

$currentday = &ParseDate("today");
$day_counter = 1;
while ($day_counter <= $days_to_grab)
{
   my @pids;
   my $date = &UnixDate($currentday, "%d%m%Y");

   my $guide_prn_file = $cache_dir . "/" . $date . "/guide.prn";
   if (open(PRN, $guide_prn_file)) 
   {
      my @prn = split />/, <PRN>;
      close(PRN);
      
      if ($#prn > 1)
      {
         my $pidlast = ($#prn + 1)/3 - 1;
         @pids=@prn[0..$pidlast];
      }
      else
      {
         print "no pids in $guide_prn_file\n";
         @pids=();
      }
   }
   else
   {
      print "can't read $guide_prn_file\n";
      @pids=()
   }
   
   my $retry = 0;      
   foreach my $pid (@pids)
   {
      my @details = get_details($date, $pid);
      if (@details == 0)
      {
              next;
      }
      
      my $show_details_table = "";
      my $use_line = 0;
      my $close_html = 0;
      foreach my $line (@details)
      {
         if ($line =~ /bgColor=#f7f3e8/)
         {
            $use_line = 0;
         }
         if ($use_line == 1)
         {
            $show_details_table .= $line;
         }
         if ($line =~ /bgcolor=#ffffff/)
         {
            $use_line = 1;
         }
         if ($line =~ /<\/HTML>/)
         {
            $close_html = 1;
         }
          }

      if ($close_html == 0)
      {
         my $name = $cache_dir . "/" . $date . "/" . $pid . ".html";
         if ($retry++ >= $retrys)
         {
            print "giving up on truncated $name\n";
            $retry=0;
            next;
         }
         unlink $name;
         push @pids, $pid;
         print "t";   # truncated
         sleep($secondsbeforeretry);
         next;
      }

      if ((length $show_details_table) == 0)
      {
         print "m";   # missing: can't do anything about this
         $retry=0;
         next;
      }
          
          $show_details_table =~ s/<[^>]*>/\n/g;
      $show_details_table =~ s/\&nbsp\;//g;
      #$show_details_table =~ s/<BR>|<TR>|<TD><B><b><\/B><\/b>/\n/g;
      #$show_details_table =~ s/Genre://g;
      #$show_details_table =~ s/Rated:/\n/g;
      my $count = 0;

      my $channel = "";
      my $start_date = &UnixDate($currentday, "%Y-%m-%d");
      my $time;
      my $title1 = "";
      my $title2 = "";
      my $genre = "";
      my $descr = "";
      my $details = "";
      my $duration;


      #print $show_details_table. "\n\n\n";
      foreach my $line (split /\n/, $show_details_table)
      {
         if ($count == 4){
            #print "Time: " . $line . "\n";
            $time = $line;
         }
         elsif ($count == 7){
            $channel = $line;
            #print "Channel: " . $line . "\n";
         }
         elsif ($count == 19){
            $title1 = $line;
            #print "Program: " . $line . "\n";
         }
         elsif ($count == 20){
            $line =~ s/ - //g;
            $title2 = $line;
            #print "Subtitle: " . $line . "\n";
         }
         elsif ($count == 21){
            $line =~ s/\D//g;
            $duration = $line;
            #print "Run time: " . $line . "\n";
         }
         elsif ($count == 22){
            $line =~ s/[^A-Z]//g;
            $details = $line;
            #print "Rating: " . $line . "\n";
         }
         elsif ($count == 26){
            $line =~ s/ //g;
            $genre = $line;
            #print "Genre: " . $line . "\n";
         }
         elsif ($count == 28 && $line =~ /[a-zA-Z]/){
            $descr = $line;
            #print "Description: " . $line . "\n";
         }
         #elsif ($count == 26 && $line =~ /[a-zA-Z]/){
         #   $descr = $line;
         #   print "Description: " . $line . "\n";
         #}
         #print $count .": " . $line . "\n";
         ++$count;
      }
      
      
      my $start_time = &UnixDate($time, "%H:%M");
#      my $start_datetime = $start_date . " " . $start_time;
      if ($start_time =~ /00:|01:|02:|03:|04:|05:/)
      {
         $start_date = &DateCalc($start_date, "+ 1 day");
      }
      $start_date = &UnixDate($start_date, "%Y%m%d");
      my $end_time = &DateCalc($start_time, " + " . $duration . "minutes");
      $end_time = &UnixDate($end_time, "%H:%M");
      
      my $end_date;
      if (&Date_Cmp($start_time, $end_time) <= 0)
      {
         $end_date = $start_date;
      }
      else
      {
         my $err;
         my $edate = &DateCalc($start_date, "+ 1 day", \$err);
         $end_date = &UnixDate($edate, "%Y%m%d");
      }

      if (defined $channels{$channel})
      {
         $channel = $XMLTV_prefix . $channels{$channel} . $XMLTV_suffix;
      }
      else
      {
         print "unknown channel $channel\n";
         $retry=0;
         next;
      }
      
      my $start;
      my $stop;
      
      $start = $start_date . &UnixDate($start_time,"%H%M") . "00 " . $offset;
      $stop = $end_date . &UnixDate($end_time,"%H%M") . "00 " . $offset;
      
      my $a_prog = {
         channel => $channel,
         start   => $start,
         stop    => $stop,
         title   => [ [ $title1, undef ] ]
      };
      
      $descr =~ s/^\s+//;
      $descr =~ s/\s+$//;

      if ($title2) { $$a_prog{'sub-title'} = [ [ $title2, undef ] ]; }
      if ($descr)  { $$a_prog{desc}        = [ [ $descr, undef ] ]; }
      if ($genre)  { $$a_prog{category}    = [ [ $genre, undef ] ]; }
                 
      push @$prog_ref, $a_prog;
      $retry=0;      
   }
   
   $currentday = &DateCalc($currentday, "+ 1 day");   
   $day_counter++;
}

my $data = [
    'ISO-8859-1',
    {
     'source-info-name'    => 'http://tvguide.ninemsn.com.au/',
     'generator-info-name' => 'NineMSN grabber',
     'generator-info-url'  => '',
     'generator-info-name' => "XMLTV - tv_grab_au NineMSN v0.2"
    },
    $chan_ref,
    $prog_ref
];

my $hour=&UnixDate(&ParseDate("now"),"%H");
if ($hour < 6)
{
    print "can't update between 0:00 and 6:00\n";
# If we update between these hours we lose any data we had up to 6:00.
# This is because the web site starts a day at 6:00 and ends at 6:00 the next day
# This could be fixed by read the previous days info and adding the needed shows.
# I did try adding the whole previous day but got lots of mythfilldatabase errors.
    exit(1);
}

print "writing file\n";

my $fh = new IO::File ">$opt_output";
XMLTV::write_data($data, OUTPUT=>$fh);

print "done\n";

# subroutines
sub get_day
{
   my $date = shift;
   my $force = shift;
   my $url = $guide_url . $date . "_" . $region . ".asp";
   
   my $guide_dir = $cache_dir . "/" . $date;
   my $guide_file = $guide_dir . "/guide.html";
   mkpath ($guide_dir);

   for (my $retry=0; (($force==1) || (!(-e $guide_file))) && is_error(getstore($url, $guide_file)) && ($retry<$retrys); $retry++)
   {
      print ".";
      sleep($secondsbeforeretry);
   }
   
   my @guide_lines;
   if (open(GUIDE, $guide_file))
   {
      @guide_lines = <GUIDE>;
      close(GUIDE);
   }
   else
   {
      @guide_lines = ();
      print "giving up on $guide_file\n";
   }
   return @guide_lines;
}

sub get_details
{
   my $date = shift;
   my $program_id = shift;
   
   my $url = $details_url . $program_id;
   my $guide_dir = $cache_dir . "/" . $date;
   my $details_file = $guide_dir . "/" . $program_id . ".html";
   mkpath ($guide_dir);
   
   for (my $retry=0; (!(-e $details_file)) && is_error(getstore($url, $details_file)) && ($retry<$retrys); $retry++)
   {
      print ".";
      sleep($secondsbeforeretry);
   }

   my @details_lines;
   if (open(DETAILS, $details_file))
   {
      @details_lines = <DETAILS>;
      close(DETAILS);
   }
   else
   {
      @details_lines = ();
      print "giving up on $details_file\n";
   }
   return @details_lines;
}

sub fetch_details
{
   my $datepid=$datepids->dequeue;
   my @datepidl=split /-/, $datepid;
   my $date = $datepidl[0];
   my $pid = $datepidl[1];

   while (($date!=0) and ($pid!=0))
   {
      my $guide_dir = $cache_dir . "/" . $date;
      mkpath ($guide_dir);
   
      my $url = $details_url . $pid;
      my $details_file = $guide_dir . "/" . $pid . ".html";

      for (my $retry=0; is_error(getstore($url, $details_file)) && ($retry<$retrys); $retry++)
      {
         sleep($secondsbeforeretry);
      }

      $datepid=$datepids->dequeue;
      @datepidl=split /-/, $datepid;
      $date = $datepidl[0];
      $pid = $datepidl[1];
   }
}

sub changed_guide
{
   my $date = shift;
   my @pidsrowspansnames = @_;
   
   my $guide_prn_file = $cache_dir . "/" . $date . "/guide.prn";
   if (open(PRN, $guide_prn_file)) 
   {
      my @prn = split />/, <PRN>;
      close(PRN);

      if (($#prn > 1) and ($#prn == $#pidsrowspansnames))
      {
         my $count;
         my $diff = ((($#prn+1)*2)/3)-1;
         for ($count=0; ($count <= $diff) && ($prn[$count]==$pidsrowspansnames[$count]); $count++)
         { }
         
         if ($count==($diff+1))
         {
            for (; ($count <= $#prn) && ($prn[$count] eq $pidsrowspansnames[$count]); $count++)
            { }
         
                if ($count==($#prn+1))
            {
               print "$date unchanged\n";
               return 0;
            }
         }
      }
   }

   print "$date downloading\n";

   if (open(PRN, ">", $guide_prn_file))
   {
      for (my $count=0; $count<$#pidsrowspansnames; $count++)
      {
         print PRN "$pidsrowspansnames[$count]>";
      }
      print PRN "$pidsrowspansnames[$#pidsrowspansnames]";
      close(PRN);
   }
   else
   {
      print "can't open for writing $guide_prn_file\n";
   }

   return 1;
}


Thats your grabber for your tv guide.

just save it as tv_grab_au

copy it over to /usr/bin and you can then run mythfilldatabase to grab your channel data. when you do your first setup via mythtv-setup you will need to pop out of the mythtv-setup when you choose to use this grabber to choose your state and what channels you need. Any other problems please ask :)


Top
  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 8:33 am 
get your frequencies for your state here

and if u need any more help please ask.

i am thinking of making a AU version on how to set up mythtv/knoppmyth with my experiences with it all and how i got it to work.

so if there is any interest i will get it started next week


Top
  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 1:32 pm 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
That's terrific info. You may want to start by creating a page here on the KnoppMyth Wiki that describes how to get KnoppMyth running down under. I see there's already a page for the Kiwis.

_________________
Do you code to live, or live to code?
Search LinHES forum through Google


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 2:44 pm 
Offline
Joined: Sat Sep 18, 2004 9:07 pm
Posts: 94
Thanks jbman! That's great! I think I found a version of that script on the web somewhere (download December 21 2004 version here). When I tried running the script, I got a permission error on line 640:
Code:
mkpath ($guide_dir)
Then when I tried running it as root, the script would say "Queue completed" but would stay there until I pressed control-c. Also, it keeps repeating "Unknown channel SBS Digital".

Sorry I can't be more detailed, but those were some of the problems I saw over the weekend. Since I know for sure someone else is using it successfully, I'll give it another shot tonight.


Liv2Cod wrote:
I see there's already a page for the Kiwis.
Please don't compare us Aussies with them Kiwis :)[/url]


Last edited by sammo2828 on Sun Jan 23, 2005 3:11 pm, edited 4 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 3:05 pm 
Offline
Joined: Sat Sep 18, 2004 9:07 pm
Posts: 94
jbman wrote:
i am thinking of making a AU version on how to set up mythtv/knoppmyth with my experiences with it all and how i got it to work.

so if there is any interest i will get it started next week


Yes! This is much needed - there are some general AU guides for mythtv DVB already, but it's the channel tuning part that has gotten me lost!!

I'm interested, and I'll be more than willing to help .. From the point of view of someone who has never used mythtv / knopmyth before. One of the things about channel tuning that I think is weird is that there is such a dependency on having the EPG configured properly - am I right to think that you can't even watch TV unless the EPG is configured?

Well, all this effort better be worth it cos it's taking so much time ;)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 8:16 pm 
ok with the SBS problem. I had the same thing. You need to go into tv_grab_au and edit the lines with SBS in them to be the same as the guide you are pulling from. I had to fiddle a bit to get this to work. Mine says
Code:
$channels{"SBS Perth"}="SBS";
but it took a little fiddling to get it right.

As for the channels? What are you stuck with. Put in the frequencies from the link i gave you, make sure the have the extra 0's on the end since its in Hz in the setup.

[/code]


Top
  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 9:40 pm 
Offline
Joined: Sat Sep 18, 2004 9:07 pm
Posts: 94
jbman wrote:
As for the channels? What are you stuck with. Put in the frequencies from the link i gave you, make sure the have the extra 0's on the end since its in Hz in the setup.

Okay, I have the frequencies from the dba website. I also have the PIDs generated from the scan util from dvb-apps-1.1.0 from linuxtv.org (channels.conf).

Off the top of my head (I'm at work now), this is what I understand the procedure is:

1. Get the DVB drivers working and re-compile mythtv for DVB support. OKAY
2. Download tv_grab_au and copy into /usr/bin, and chmod 755 the file
3. mythtv-setup
3.1. Capture Card config - add DVB card(s). OKAY
3.2. Video Sources - add a new entry called "NineMSN" or anything else
3.3. Video input - add a new entry to link DVB card with NineMSN
3.4. Channels - add a new entry with frequency and pid from channels.conf.
3.5. Exit mythtv-setup
4. mythfilldatabase

After this, click on the KnoppMyth wallpaper and select MythTV. Then goto "Watch TV" and start watching TV ..

Is this right?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 10:18 pm 
Offline
Joined: Sat Sep 18, 2004 9:07 pm
Posts: 94
These questions aren't really Sydney AU specific, but I'll put them down here if you have an answer or have a link ..

How do I see what's in the mythtv database? How do I flush or reset it to make sure there is no corrupt data?

Do I need to restart mythtv backend? How do I check if the backend is running properly?

Where does mythtv store the channel information? Can I edit the channel information file directly? Can I convert my channels.conf file generated by scan util in dvb-apps into one that mythtv can use?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 10:53 pm 
Offline
Joined: Wed Mar 03, 2004 7:43 pm
Posts: 748
Location: Sydney, Australia
Firstly, this isn't an installation issue - If you have gotten the PC to boot Linux then the Installation is over, and you are up to configuration.

Getting DVB setup initially is hard. I think I had to:

1) compile linuxtv-dvb-apps and run scan to generate a list of tunable channels in my area. This generates a channels.conf file

2) get a working tv_grab_au and do mythfilldatabase --manual. This enters a channel in the database for each network the grabber knows about

3) run an auxilliary script, channels.conf-import.pl, which inserts the DVB data from channels.conf into the database for each channel the grabber knows about. There is an alternative script out there (from the UK), but I cannot remember the name.

If this is all too hard, I can provide an SQL dump of the relevant Sydney data.

_________________
| Nigel Pearson, nigel.pearson.au@gmail.com
| "Things you own end up owning you" - Tyler, Fight Club


Last edited by nigelpearson on Sun Jan 23, 2005 11:27 pm, edited 1 time in total.


Top
 Profile  
 
PostPosted: Sun Jan 23, 2005 11:09 pm 
Offline
Joined: Wed Mar 03, 2004 7:43 pm
Posts: 748
Location: Sydney, Australia
sammo2828 wrote:
Oh, and another thing, I got the DVB drivers working, but the howto doesn't describe how to load the drivers on boot.


It is in this "quide":
http://mysettopbox.tv/phpBB2/viewtopic.php?t=1357

Edit /etc/modules
Add something like:
dst
dvb-bt8xx

_________________
| Nigel Pearson, nigel.pearson.au@gmail.com
| "Things you own end up owning you" - Tyler, Fight Club


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 11:13 pm 
Offline
Joined: Wed Mar 03, 2004 7:43 pm
Posts: 748
Location: Sydney, Australia
sammo2828 wrote:
When I tried running the script, I got a permission error on line 640: mkpath ($guide_dir)


Make the directory first:

sudo mkdir /var/local/tv_grab_au
sudo chown mythtv /var/local/tv_grab_au

_________________
| Nigel Pearson, nigel.pearson.au@gmail.com
| "Things you own end up owning you" - Tyler, Fight Club


Top
 Profile  
 
PostPosted: Sun Jan 23, 2005 11:19 pm 
Offline
Joined: Sat Sep 18, 2004 9:07 pm
Posts: 94
nigelpearson wrote:
sammo2828 wrote:
Oh, and another thing, I got the DVB drivers working, but the howto doesn't describe how to load the drivers on boot.


It is in this "quide":
http://mysettopbox.tv/phpBB2/viewtopic.php?t=1357

Edit /etc/modules
Add something like:
dst
dvb-bt8xx

Hmm, sorry, I missed it because I was only looking at "Option 1: Keep 2.4 kernel" section. Thanks :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 11:21 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
sammo2828 wrote:
How do I see what's in the mythtv database?

as root:
Code:
mysqldump mythconverg

sammo2828 wrote:
How do I check if the backend is running properly?

Code:
ps ax | grep mythbackend

You should see the backend process. Don't worry if there are more than 1 (multiple threads show up as more than one). The process "grep mythbackend" is not the backend process.
sammo2828 wrote:
Where does mythtv store the channel information?

In the database in two three tables (for DVB).
sammo2828 wrote:
Can I edit the channel information file directly?

If you know sql and the format of the database and what to put in the database.
sammo2828 wrote:
Can I convert my channels.conf file generated by scan util in dvb-apps into one that mythtv can use?

You can use it to make some sql commands to insert the channel information into the database. I have done this and will post the details later if I can remember.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2005 11:22 pm 
Offline
Joined: Sat Sep 18, 2004 9:07 pm
Posts: 94
nigelpearson wrote:
sammo2828 wrote:
When I tried running the script, I got a permission error on line 640: mkpath ($guide_dir)


Make the directory first:

sudo mkdir /var/local/tv_grab_au
sudo chown mythtv /var/local/tv_grab_au

Ahh .. that's great! Thanks again! :)

Can't wait to go home and try it tonight ..

PS, do you know if I can zoom and change aspect ratios on the fly in mythtv? I like to be able to zoom in tiny increments (e.g. 1%) to get the best display on my screen.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 56 posts ] 
Go to page 1, 2, 3, 4  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu