Installing shepherd
Greg's diary
Photo index
Greg's home page
Network link stats
Greg's other links
Copyright information
Groogle

My first attempt to install shepherd was typical of an ultimately successful installation of “Open Source” multimedia software: it took a lot of mistakes, but finally I got there. Read all about it here. On 23 December 2008 I tried again, and was more successful. Here's my HOWTO, mainly for my own reference; the official reference currently differs in a few points.

I'm using shepherd with MythTV, and since my last attempt the shepherd people have paid more attention to this way of doing thing. It still didn't work straight out of the box. Right at the start I read:

[MythTV users only] Install and configure MythTV first. In mythtv-setup -> 3. Video Sources -> (your video source) -> Listings grabber, select No grabber. Perform a channel scan: mythtv-setup -> 5. Channel Editor -> Channel Scanner.

This didn't work for me with MythTV version 0.21. I had to go to 4 (Input) and perform the scan there.

HOWTO, Groggy style

So here's my HOWTO. It's based on what I did, but to get it really right, I need to check it by doing it again. Unfortunately, I haven't been able to go through that pain again. I'm setting up two DVB-T tuners, which complicate things a little.

Install MythTV

This isn't really part of this HOWTO; see the MythTV wiki

Configure MythTV

This is relevant to shepherd, since what you do is intimately connected with shepherd. To configure, first log in as user mythtv, since a number of permissions rely on this user. Then run mythtv-setup. It may confuse the issue by giving you a screen which doesn't show the bottom (where the selection buttons are). Here's the main menu:

 
https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20081224/big/mythtv-setup-1.gif
Image title: mythtv setup 1
Dimensions: 640 x 480, 112 kB
Dimensions of original: 640 x 480, 112 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Wednesday, 24 December 2008:
thumbnails    small images    diary entry
  1. Go through 1, General as described on the MythTV web site.
  2. Select 2, ”Capture Cards”. Set Card type to “DVB DTV Capture card (v3.x) and select DVB Device Number. The image below shows the situation after both cards have already been selected, thus the warning. Note that the window is non-resizeable and cuts off the navigation links at the bottom. The first field after leaving this display is the next button, I think.

     
    https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20081224/big/mythtv-setup-4.gif
    Image title: mythtv setup 4
    Dimensions: 640 x 480, 134 kB
    Dimensions of original: 640 x 480, 134 kB
    Display this image:
    thumbnail    hidden   alone on page
    Display all images on this page as:
    thumbnails    this size
    Show for Wednesday, 24 December 2008:
    thumbnails    small images    diary entry
  3. Select 3. Video Sources -> (your video source) -> Listings grabber. Set the video source name to shepherd and the Listings grabber to No grabber. The video source name is not critical, but it helps maintain an overview:

     
    https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20081224/big/mythtv-setup-2.gif
    Image title: mythtv setup 2
    Dimensions: 640 x 480, 134 kB
    Dimensions of original: 640 x 480, 134 kB
    Display this image:
    thumbnail    hidden   alone on page
    Display all images on this page as:
    thumbnails    this size
    Show for Wednesday, 24 December 2008:
    thumbnails    small images    diary entry
  4. For each tuner, perform step 4, “Input”. Connect the source to an input as shown below. Set the display name to match the capture device (again, to make things easier to understand), set the Video source to shepherd, starting channel to 2 (it'll work without this, but if you don't set it, it'll cause strange messages when you least expect them). Select Scan for channels.

     
    https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20081224/big/mythtv-setup-3.gif
    Image title: mythtv setup 3
    Dimensions: 640 x 480, 130 kB
    Dimensions of original: 640 x 480, 130 kB
    Display this image:
    thumbnail    hidden   alone on page
    Display all images on this page as:
    thumbnails    this size
    Show for Wednesday, 24 December 2008:
    thumbnails    small images    diary entry

    Set Country to Australia and Scan Type to Full Scan:

     
    https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20081224/big/mythtv-setup-5.gif
    Image title: mythtv setup 5
    Dimensions: 640 x 480, 126 kB
    Dimensions of original: 640 x 480, 126 kB
    Display this image:
    thumbnail    hidden   alone on page
    Display all images on this page as:
    thumbnails    this size
    Show for Wednesday, 24 December 2008:
    thumbnails    small images    diary entry

    Let it do its thing, which can take a while, hiding the results with a progress screen.

  5. After this you can go into the channel editor and remove things you don't want, but you can't edit much. The whole area is such a mess that I prefer to go into MySQL and frob the tables there; but that's a separate issue. In particular, at the moment there seems to be some issue with storing the frequencies for digital TV, and the channel editor screen doesn't even show them. They're stored in the attribute frequency of the table mythconverg.dtv_multiplex. If you find one set to 0, you'll need to find the correct frequency and put it in there; otherwise you'll get these messages:

    2008-12-23 12:56:30.537 DVBChan(2:1) Warning: Your frequency setting (0) is out of range. (min/max:177000000/858000000)
    2008-12-23 12:56:30.564 DVBChan(2:1) Error: Tune(): Setting Frontend tuning parameters failed.
                            eno: Invalid argument (22)
    2008-12-23 12:56:30.588 DVBChan(2:1) Error: SetChannelByString(2): Tuning to frequency.

Install shepherd

This HOWTO was written using Ubuntu Linux release 8.10, and some of these details are not relevant to other Linux or BSD releases.

Don't even try to run shepherd until you've ensured that you have all your dependencies are installed:

# apt-get install xmltv libxml-simple-perl libjavascript-perl libalgorithm-diff-perl \
                     libgetopt-mixed-perl libcompress-zlib-perl libdata-dumper-simple-perl \
                     libdate-manip-perl liblist-compare-perl libdatetime-format-strptime-perl \
                     libhtml-parser-perl libxml-dom-perl libgd-gd2-perl libdigest-sha1-perl \
                     libarchive-zip-perl libio-string-perl libdbi-perl

Next, download shepherdas mythtv:

$ wget http://www.whuffy.com/shepherd/shepherd

Next, run perl shepherd. There are many questions to answer.

I'm not sure that statement is correct. I'll check next time I install. The script gets installed as ~/.shepherd/shepherd, so it seems more likely that you need to run that.

If you're re-running this script after installation (because of a new channel, for example), run

$ .shepherd/shepherd --configure

In this case, some of the defaults below might be correct.

  1. Step 1: Region Selection

    Select your region:
     (126) ACT: Canberra
    ...
     ( 90) VIC: Ballarat
     (266) VIC: Bendigo
     ( 98) VIC: Gippsland
    ...
    Enter region code: [67,90,63,71,102,88,264,255,82,74,259,95,75,83,108,268,184,69,254,267,266,
    263,262,78,79,107,93,106,257,126,261,85,94,253,114,258,81,98,66,73,101,256,86 (default=94)] 90

    Last time I did this, Ballarat wasn't there, and I had to select Western Victoria (98). 98 is now Gippsland.

  2. Select the channels you care about. My experience is that only Guided channel selection works.

    Step 2: Channel Selection

    Shepherd offers two methods of channel selection: Guided and Advanced.
    Guided is easier; Advanced allows manual entering of XMLTV IDs.

    Would you like Guided channel selection? [yes,no (default=yes)] Enter

    ...
    Do you have High-Definition (HDTV)? [yes,no (default=no)] yes
    ...
    Do you have PayTV? [yes,no (default=no)] Enter
  3. Next, associate the guide data sources with the MythTV channel numbers. I don't know where the channel numbers come from, and they're pretty much useless with MythTV, but they get reported in a number of places, like here. shepherd doesn't even try to associate a channel with a guide data source, even when the names are the same. You must enter a number for every channel (if there is no information available, enter 0). There are no defaults, even when shepherd has been configured:

    Your MythTV has 22 channels. Shepherd offers 13 channels of guide
    data for VIC: Ballarat (11 free-to-air, 2 HDTV, 0 Pay-TV).

    Please associate each MythTV channel with a Shepherd guide data
    channel.
    ...
    Guide data sources:
    ( 0) (no guide)                    ( 7) SBS
    ( 1) ABC HD                        ( 8) SBS HD
    ( 2) ABC1                          ( 9) SBS News
    ( 3) ABC2                          (10) SC10
    ( 4) Imparja                       (11) WIN
    ( 5) Prime                         (12) ImparjaHD
    ( 6) Prime HD                      (13) SC10HD
    MythTV channel 21: ABC1 ? 2

    At the end, it shows a list:


    Region 90. 22 MythTV channels. 10 Shepherd channels.

       #  MythTV Channel                 Shepherd Guide Data
     --------------------------------------------------------
     201  ABC DiG Jazz                   <- -
     200  ABC DiG Radio                  <- -
      20  ABC HDTV                       <- ABC HD
      21  ABC1                           <- ABC1
      22  ABC2                           <- ABC2
      23  ABC3                           <- -
       6  PRIME Ballarat                 <- Prime
      60  PRIME HD                       <- Prime HD
      61  PRIME View 1                   <- Prime
      62  PRIME View 2                   <- Prime
      63  PRIME View 3                   <- Prime
       3  SBS                            <- SBS HD
      31  SBS 2                          <- -
      30  SBS HD                         <- SBS HD
      38  SBS Radio 1                    <- -
      39  SBS Radio 2                    <- -
      33  SBS World News                 <- SBS News
      55  SC Ten                         <- SC10
       5  SC10 Ballarat                  <- SC10
      50  SC10 HD                        <- SC10HD
      80  WIN HD                         <- WIN
       8  WIN Western Vic                <- WIN

    If you proceed to the end of configuration, Shepherd will
    write these channel mappings to MythTV.
  4. Next is what shepherd calls transitioning:

    Step 3: Transitioning

    Would you like to transition seamlessly from your current grabber?

    This is a new installation, so I don't handle this one; just answer no.

  5. Next we set up the interface with MythTV:

    MythTV Integration

    If you run MythTV, Shepherd can register itself as the default grabber
    and set your system to run it regularly to ensure up-to-date guide data.
    This is generally easier than doing it yourself.

    Would you like Shepherd to auto-configure MythTV? [yes,no (default=yes)] yes

    Shepherd would like to DELETE the following file(s):

    lrwxrwxrwx 1 grog lemis 30 Dec 23 12:38 ./tv_grab_au -> applications/shepherd/shepherd

    Shepherd would like to CREATE the following symlink:

     /usr/bin/tv_grab_au -> /home/grog/.shepherd/applications/shepherd/shepherd

    Create symlink and delete 1 file(s)? [yes,no (default=yes)] Enter

    And yes, these are the original colours.

That's about the lot; there are other questions, and subsequently it needs to run mythfilldatabase to actually get the programme guide. When I tried, it took about 2½ hours, with lots of error messages; but it got most of the data.


Greg's home page Greg's diary Greg's photos Copyright

Valid XHTML 1.0!

$Id: shepherd.php,v 1.6 2013/06/07 04:49:39 grog Exp $