Greg
MythTV installation, September 2006
Main multimedia page
Multimedia packages page
Greg's diary
Greg's photos
Greg's links
Greg's home page
Google
Status: draft
Currently this document contains a number of comments along with “instructions”. When I'm sure I'm roughly right, I'll make a new document without the (sometimes scathing) comments.


I've been trying for nearly two years to set up a computer to record TV programmes the way I want. This is the currently latest attempt. See my diary for more background.

Fixing the environment

Configuring MythTV

There are generic configuration instructions on the MythTV web site. They don't agree in all points with my observations. In particular,

  1. General menu
    • Host end backend setup

      The IP address is set to 127.0.0.1. I suppose that's OK. There seems to be no reason to change the port numbers. Note that there are two colours of highlights (and no visible cursor). Both are blue, but it's the lighter one that represents the highlighted field. This is particularly important when selecting Next and not Cancel, not helped by the fact that the cursor keys move the highlight in unexpected directions.

    • Host-specific backend setup

      Selects the directory to hold recordings (/myth/tv). There seems to be no reason to change this.

    • Global backend setup.

      Set TV format to PAL (was NTSC). To change the values, use the left and right cursor keys. Space and Enter both give you the next page.

      Set VBI format to PAL Teletext. It's not clear that this makes any difference at all for digital streams.

      Channel frequency table changed from US-cable to australia. The help says “If you have an antenna, use a "-bcast" frequency”. But for Australia there's only australia and australia-optus. Note also that the list isn't sorted, so you need to search the entire list (one entry at a time with the left and right cursor keys) to find all names that potentially could apply.

      Time offset for XMLTV listings left unchanged (None). Potentially 0030 would be right here.

      Master Backend Override. The Help text reads: "If enabled, the master backend will stream and delete files if it finds them in the video directory. Useful if you are using a central storage location, like a [sic] NFS share and your slave backend isn't running”.

      This is ticked. What does it mean? I suppose the idea is that the data remains somewhere, but it's not clear at the moment.

    • Shutdown/Wakeup options

      This isn't mentioned in the HOWTO. Since I'm not planning to shut down, I hope that the default values will be OK (they seem reasonable).

    • WakeOnLan settings is another undocumented settings page. It seems to be related to the shutdown/wakeup stuff. No change.
    • Job Queue (3 separate screens) is yet another topic not mentioned in the HOWTO. To be investigated later.
  2. Capture cards.

    As the HOWTO says, there are initially not. Select (New capture card). The default value is Analog V4L capture card. The options are not self-evident, and the HOWTO is useless here:
    Choose the appropriate settings for your particular tuner.
    Change to DVB DTV capture card (v3.x). The menu then shows, for DVB Card Number 0,
    Frontend ID: Zarlink ZL10353 DVB-T Subtype:     DVB-T
    
    This is a DVICO card, and the number doesn't make much sense either. Is this what the system recognizes? At least it says that, for the other cards, it doesn't recognize anything. Also, in the dmesg output I find:
    Linux video capture interface: v1.00
    cx2388x dvb driver version 0.0.5 loaded
    CORE cx88[0]: subsystem: 18ac:db10, board: DViCO FusionHDTV DVB-T Plus [card=21,autodetected]
    TV tuner 4 at 0x1fe, Radio tuner -1 at 0x1fe
    ACPI: PCI Interrupt 0000:05:04.2[A] -> GSI 17 (level, low) -> IRQ 22
    cx88[0]/2: found at 0000:05:04.2, rev: 5, irq: 22, latency: 64, mmio: 0xdb000000
    cx88[0]/2: cx2388x based dvb card
    DVB: registering new adapter (cx88[0]).
    DVB: registering frontend 0 (Zarlink ZL10353 DVB-T)...
    
    It's not clear that this is the same thing as ceeveear (running the previous version of KonppMyth, but without MythTV) reports the same text except for the last line.
    DVB: registering frontend 0 (Zarlink MT352 DVB-T)...
    
    Still, it's close, so I'll leave it the way it is. Potentially this card really is subtly different from the other one.

    This page also contains two buttons DiSEqC and Recording Options. Neither have help texts, and they're not in the HOWTO. I've left them as the are for the moment.

  3. Video Sources

    There's some documentation for this in the HOWTO; I'd guess that it's a higher level of abstraction than the tuners. Tried again to select a TV guide, which crashed mythtv-seutp. Tried to start it again and got:

    mythtv: could not connect to socket
    mythtv: Connection refused
    lirc_init failed for mythtv, see preceding messages
    
    Probably another of these stupid nolisten-tcp things, though display :0 should be a UNIX domain socket. Started it again on one of my other screens, which also helped by leaving the xterm visible.

    Starting again, I get:

    Grab listings for which region?
    0: ACT - Canberra
    1: NSW - Regional
    2: NSW - Sydney
    3: NT - Darwin
    4: NT - Regional
    5: Queensland - Brisbane
    6: Queensland - Regional
    7: SA - Adelaide
    8: SA - Regional
    9: Tasmania - Hobart
    10: Tasmania - Regional
    11: Victoria - Melbourne
    12: Victoria - Regional
    13: WA - Perth
    14: WA - Regional
    Select one: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14 (default=3)] 7
    Grab listings for which service?
    0: Austar Analogue
    1: Austar Digital
    2: Foxtel Analogue
    3: Foxtel Digital
    4: Free to Air
    5: Free to Air Digital
    6: Free to Air Digital (High Definition)
    7: Optus
    Select one: [0,1,2,3,4,5,6,7 (default=4)] 4
    ERROR! - no channel icon found for free.Adelaide.9!
    add channel: Network TEN? [yes,no,all,none (default=yes)] all
    adding new channel ABC SA
    adding new channel Channel Seven
    adding new channel Channel Nine
    adding new channel SBS
    All done, run with no arguments to grab listings.
    
    This leaves me wondering whether it got TEN or not.

    After this, it exits the screen and goes back to Video sources. Reentering and trying to select EIT scan tries to re-run the programme listings configuration:

    A nonempty configuration file /root/.mythtv/TV.xmltv
    already exists.  There is currently no support for altering an
    existing configuration: you have to reconfigure from scratch.
    
    Do you wish to overwrite the old configuration? [yes,no (default=no)] no
    Exiting since you don't want to overwrite the old configuration.
    
    Once again I'm “finished”, though I haven't selected a channel frequency table. What I get offered is the same as in the general settings; there still seems to be no way to specify the settings for the local channels (dvb-t/au-Adelaide). Maybe that will come with the Channel Editor.

    Second time through:

    Set Vide source name to TV.

    Listings grabber Australia. Find a way back to the xterm where this thing was started: Alt-Tab.

  4. Input connections

    This is completely confusing. The top-level page shows:

    Input connections
    [DVB:0] (DVBInput) -> (None)
    
    What does that mean? It suggests that we have an input and nowhere to send it. The answer is: move the highlight to the field Video source (which it conveniently doesn't highlight), then use left/right arrows to select the source set up in the previous step (TV in my case). After that the upper level page shows:
    Input connections
    [DVB:0] (DVBInput) -> TV
    
Moved to new position with antenna, started again. Couldn't run mythtv-setup or dvbscan because mythbackend was running.

Run mythfilldatabase, thousands of error messages:

        tv_grab_au - (version 0.6.2 - release 2005-05-31)

ERROR! - no channel icon found for free.Adelaide.9!
Use of uninitialized value in numeric lt (<) at /usr/share/perl5/Date/Manip.pm line 3151.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Date/Manip.pm line 3152.
...
Use of uninitialized value in multiplication (*) at /usr/share/perl5/Date/Manip.pm line 3154.
Use of uninitialized value in multiplication (*) at /usr/share/perl5/Date/Manip.pm line 3154.

ERROR: can't find DataSet for SBS - 2006-09-15

ERROR: can't find DataSet for ABC SA - 2006-09-09

ERROR: can't find DataSet for ABC SA - 2006-09-10

Table mythconverg.channel has 5 entries, the normal free-to-air channels.

Saturday, 9 September 2006

Kill mythbackend and confirm with dvbscan and tzap that the tuner is working. Start mythtv-setup again and run the channel editor. This time it shows the five channels in mythconverg.channel. Running the scan function finds the rest, along with a plethora of messages:

Timeout Scanning -- no signal
Timeout Scanning offset 1 -- no signal
No idea of the frequency, which makes the messages singularly useless. The resulting table contains 27 entries and looks surprisingly like the output of dvbscan.

Restart mythbackend as described in the HOWTO:

2006-09-09 11:12:55.349 Using runtime prefix = /usr
2006-09-09 11:12:55.359 New DB connection, total: 1
2006-09-09 11:12:55.360 Connected to database 'mythconverg' at host: localhost
2006-09-09 11:12:55.363 Current Schema Version: 1123
Starting up as the master server.
2006-09-09 11:12:55.369 New DB connection, total: 2
2006-09-09 11:12:55.369 Connected to database 'mythconverg' at host: localhost
2006-09-09 11:12:55.371 TVRec(1) Error: Start channel from DB is empty, setting to '' inst
ead.
2006-09-09 11:12:55.372 TVRec(1) Error: Start channel invalid, setting to '' on input DVBI
nput instead.
2006-09-09 11:12:55.372 TVRec(1) Error: Problem finding starting channel, setting to defau
lt of '3'.
2006-09-09 11:12:55.373 DVB#0 Using DVB card 0, with frontend 'Zarlink ZL10353 DVB-T'.
2006-09-09 11:12:55.374 New DB connection, total: 3
2006-09-09 11:12:55.375 Connected to database 'mythconverg' at host: localhost
2006-09-09 11:12:55.425 New DB scheduler connection
2006-09-09 11:12:55.425 Connected to database 'mythconverg' at host: localhost
 is defined, but isn't attached to a cardinput.
2006-09-09 11:12:55.430 mythbackend version: 0.19.20060121-2 www.mythtv.org
2006-09-09 11:12:55.430 Enabled verbose msgs:  important general
2006-09-09 11:12:55.431 AutoExpire: Found 1 recorders w/max rate of 138 MiB/min
2006-09-09 11:12:55.431 AutoExpire: Required Free Space: 3.0 GB w/freq: 10 min
2006-09-09 11:12:57.431 Reschedule requested for id -1.
2006-09-09 11:12:57.455 Scheduled 0 items in 0.0 = 0.02 match + 0.01 place
2006-09-09 11:12:57.457 Seem to be woken up by USER
Not knowing whether that's right or not, continued and ran mythtv. Many messages, scrolling off the screen, something different every time, but in every case some kind of crash, frequently a segmentation fault (too lame to dump core).
2006-09-09 11:26:10.056 NVP: Disabling Audio, params(0,-1,-1)
2006-09-09 11:26:59.256 TVRec(1): Changing from WatchingLiveTV to None
Segmentation fault
It seems that I shouldn't be running mythtv, but mythfrontend. Did that and experienced many wondrous things, including an automatically started recording of Greek news from SBS. When I tried to view it (TV -> Watch Recordings), mythfrontend crashed with a segmentation fault. Spent some time analysing the copious log messages; it's difficult to tell whether these repetitive messages represent a real problem or just terrible programming; certainly a segmentation fault not based on hardware failure indicates terrible programming, but it seems to be normal in this area.

Further investigation showed this to be related to the display on which I tried to output the picture (echunga:0.1). It didn't happen locally. That doesn't make the software any better: it should at least have reported a compatibility failure and failed gracefully.

While looking for the problem, followed up another potential cause. I had seen earlier messages that channel icons couldn't be found; there's a section on it at the end of the HOWTO, which tells me:

If you have XMLTV software installed, there is a perl script in MythTV's contrib/ directory which will generate this file for you. Run the command:
$ perl mkiconmap.pl
You will be asked for your zip code and the service that you use. If there are no errors, the iconmap.xml file that you need for the next step will be created.

mkiconmap.pl is in /usr/bin. I tried that and got:

=== root@tv2 (/dev/pts/4) /myth/tv 2 -> mkiconmap.pl
Calling tv_grab_na_icons...

Postal Code: 5153
5153                  look at that echo!

Lineup?
0: 4DTV ( USA )
...
9: Time Warner Cable - Digital ( Schenectady )
Select one: [0,1,2,3,4,5,6,7,8,9 (default=8)] press Enter for default.
nothing happens

8
8                echo again
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
<input> outside <form> at /usr/share/perl5/WWW/Mechanize.pm line 1389
Stored       AETV in  /tmp/icons/AETV.url
Stored        AMC in   /tmp/icons/AMC.url
...
The <input> outside <form> messages suggest yet another bug in the script, as does the suggestion that there's a default when there isn't, and the echo of the input line. But the real problem is that it's just for the USA, and it doesn't even notice that the post code is the wrong length. In any case, it didn't make any difference to the crashing.

Remote control

KnoppMyth doesn't seem to do anything about remote controls, but I've already installed the correct configuration for my remote control on ceeveear.lemis.com; on that occasion I just couldn't test it the way I wanted because it kept crashing lircd. Today tried irw instead, and things worked perfectly. On thing that works, anyway. Now I have to revisit how to start it automatically.


Greg's diary Greg's photos Greg's links Greg's home page
Valid XHTML 1.0! $Id: mythsetup-sep-2006.html,v 1.2 2006/09/10 02:11:15 grog Exp $