mythv-setup

mythtv-setup is the binary used for the initial configuration of a MythTV backend. It is QT based and needs to be launched on an X server (not necessarily on the machine that the backend is running on).

X-Forwarding mythtv-setup

If the backend machine that is being setup doesn't have an X server, mythtv-setup can be launched remotely through a ssh connection that has X forwarded over it. It can be run on windows machine running Cygwin/X, a linux/unix machine running xorg-x11, or a MacOS machine running Apple/X11.

The connection is generally forwarded by running the following command on a client machine:

  • ssh USER@MACHINE -X
    • MACHINE is the ip address or hostname of the machine that you are ssh'ing into

    • USER is the username normally used for configuring things on this machine.

Once connected to the remote machine, apps can be launched as though they are being run locally.

This guide

Note: This guide isn't all inclusive, but should help most people get through the initial mythtv-setup process. If you are looking for more details about a particular section, you will want to see the following areas: The official mythtv documentation

The official mythtv wiki

The official mythtv mailing list archive

Starting mythtv-setup

mythtv-setup must either be launched as a user that is in the mythtv group.

Next, add yourself and any other users that need MythTV acces to the mythtv group.

  • To add users to the mythtv group, use this command:

# sudo usermod -a -G mythtv USERNAME
  • Where USERNAME is the name of the user you are adding to the mythtv group.

VERY IMPORTANT: If you do not add your main user account to the mythtv group, you will get the dreaded database errors when you run mythtv-setup! For the addition to the group to take effect, a fresh login needs to occur-- so log out of your current session and then log back in right now.

Once your are in the mythtv group and have logged out/in, you will be able to launch mythtv-setup.
  • mythtv-setup

If you encounter any problems connecting to the database, see the permissions troubleshooting guide: Troubleshooting

After selecting your Language, you will be presented with the:

Initial configuration page

be_setup_1.png

The initial configuration page will present you with 5 options. It is strongly recommended you follow these in order the first time you configure a backend installation.

General

The general section is where you will set up the major information related to the master backend, job scheduling, and default locale information. It is setup in a sequential design with Back and Next buttons.

be_setup_2.png

The first screen of the General configuration deals with IP addresses of the backend system that you're running mythtv-setup on. If you are setting up only one backend/frontend installation, then the default values are fine and you can move to the next page by pressing the enter. If you need to move around the screen, use the arrow keys to move focus between settings.

The default value shown on install will be 127.0.0.1, which is the internal loopback for the local machine. If you plan on deploying multiple backends, running mythweb from another computer, or if your backend is on one system and you're running the frontend on another machine then do not use the "127.0.0.1" IP address. Set this to the ip address of this backend as recognized by other machines on your network. If you are using a router on your network that only hands out dynamic addresses, you might consider setting up this machine with a static IP address instead.

NOTE: If you modify the 127.0.0.1 address and use a "real" IP address, you must use real IP addresses in both fields, otherwise your frontend machines will generate "Unexpected response to MYTH_PROTO_VERSION" errors.

Changing any of the port settings is very strongly discouraged. (If you do accidentally change them, the defaults are 6543 for the master/backend server, and 6544 for the HTTP requests)

Once you're satisfied with the values, move the focus down to Next and hit Enter.

be_setup_3.png

The next screen details the Host-specific Backend setup. This is where you will set the specific directory path for this particular backend.

As long as you setup a separate partition for /var/lib during the initial setup, the default option here - /var/lib/mythtv will work fine. If you setup a different mount point or won't be recording with this machine, be sure to set this accordingly. (Also, if you used a non-default location, be sure and set the ownership and permissions to match /var/lib/mythtv.)

If for some reason you chose a file system other then XFS or JFS for this partition, choose to delete the files slowly. This will avoid some nasty bugs related to using ReiserFS or ext3.

be_setup_4.png

The Global Backend Setup screen will change settings that affect all backends.

Your TV standard should be determined based on your locale. US users should choose NTSC. European users should chose PAL

The VBI Format is used for closed captioning.

The channel frequency table is also based on your locale.

US and Canadian users using SchedulesDirect can skip the time offset for xmltv listings. International users will need to set this appropriately so that their data matches up at the correct time.

be_setup_5.png

The EIT scanner is used to gather data on the fly. If you have a DVB based source or a source providing this data, you will configure it here

be_setup_6.png

The Shutdown/Wakeup options are used for suspending or shutting down the backend server when it has been idle for the set limit. You can configure the master and/or secondary backend(s) to go into a sleep, suspend, or shutdown mode when not in use- depending on the capabilities of your motherboard.

There are different methods you can use to accomplish this. A tutorial on ACPI wakeup/shutdown can be found on the ACPIWake page. You should complete MythTV installation and ensure the backend is properly functioning before trying to set up this function.

If you only have one backend, the default values are fine and you can move to the next page by pressing the enter. Setting up more than one backend is beyond the scope of this guide -- see the mythtv documentation.

be_setup_7.png

WakeOnLan is another method of configuring secondary backends to wakeup.

If you only have one backend, move to the next page. Setting up multiple backends is beyond the scope of this guide -- see the mythtv documentation.

be_setup_8.png

The Host Specific Job Queue sets up the types of jobs that are allowed to run on this machine. If you have multiple backends, you can configure certain backends to only handle particular types of jobs. This is especially useful if some are much more underpowered then others.

It isn't recommended to have more then 2 simultaneous jobs running on any backend at any given time.

The default job queue frequency of 60 seconds is adequate and doesn't need to be changed typically.

Unless this backend is dedicated to only Transcoding/Commercial flagging jobs, don't change the CPU usage. Anything set higher then "Low" may jeopardize the ability to record programs due to being starved for IO/CPU usage.

be_setup_9.png

The Global Specific Job Queue sets up things affecting any and all backends on a mythtv network.

If you don't check "Run Jobs only on original recording host", each of the jobs will be evenly distributed against possible backends. This will lessen the load on each machine.

A decently powered backend with hardware encoding cards (1Ghz+) should be able to flag commercials at the same time as the recording is going. This helps if you ever plan to time shift your recording viewing by 10 or 20 minutes and want to have the commercials flagged as you watch.

Typically you won't want to run your transcode jobs before commercial flagging. The idea should be that you will flag commercials, verify they are right and manually queue them up to be transcoded and removed. If you have a particular reason to transcode first, check this box.

If you set up the backend to save the original files after transcoding, these will not be automatically deleted, but rather fill up your recordings directory with .old files. You will have to manually go in there and delete them to free up recording space as necessary.

be_setup_10.png

Thee Job Queue page provides an area to add your own scripts to perform on recordings.

Some ideas for additional things can range from scp'ing a recording somewhere, transcoding it to fit on an ipod and copying it to a directory, or running it through a denoising filter.

Capture Cards

The capture cards section will list all capture cards setup locally on this backend.

capcard_1.png

The initial capture cards page will list all cards in this backend.

Choose "New Capture Card" to begin and add your tuner(s)

If you need to reset the order of the tuners recognized, you can either delete these capture cards, or all capture cards in the mythtv network from this screen.

capcard_2.png

When choosing a capture source, it's important to choose the correct type

A very common error is when choosing the Hauppauge PVR Cards. There is an option for MPEG-2 Encoder Card (PVR-X50, PVR-500) as well as for standard V4L card. Be sure to choose the MPEG-2 encoder option here if you use a Hauppauge card.

Each of the different types of sources has several options available to it.

If you are confused about any of the options, see the mythtv documentation, mailing list, MythTV wiki, or LinuxTV wiki.

If you are configuring a firewire connection, settings can be found on the MythTV Firewire Page

Video Sources

Video sources section will list all video sources in use for the mythtv database. The video sources will be configured to connect to the listing service you are using- either Data-Direct or XMLTV

vidsrc_1.png

Video Sources is where to configure your program listing services

vidsrc_2n.png

Provide your video source with a logical name here. Its a good idea to provide detail now, because later you may end up adding more tuners, digital cable, satellite, etc :)

If you are in North America, choose North America (SchedulesDirect.org). Anywhere else will need to use XMLTV setup.

For SchedulesDirect, enter the username and password you obtained during registration. Retrieve the lineup and choose your option.

If this input has a different frequency table then the rest of your global settings, set the particular setting here.

Press Escape to go back to the main page from here.

Input Connections

input_1.png

The input connections page allows you assign any Video Sources to Inputs on your capture sources before.

Choose the particular input you will need to assign and press enter

input_2.png

Again, it's a good idea to provide a name for your Input here. Later on, if you have a tuner not working, it's easier to debug if it says "Digital Cable" in the frontend and then doesn't work.

Choose the Video source associated with the input here.

If you need to use an external channel changer script (firewire, serial, IR), you will need to enter the name of the binary/script that needs to be launched here. See MythTV_External_Channel_Changer for more information.

If you are using a static channel listing, fetch channels from your listings source. If you are using something that scans on the fly via EIT or OTA HD, scan for the initial channels.

Channel Editor

The channel editor isn't necessary for the inital setup. You can safely ignore it for now, but remember to come here if you need to modify transports, change channel numbers, or delete channels .

chaneditor.png

The listing of all channels is at the top of the screen.

Warning: the delete channels button deletes ALL channels. If you want to delete just one, choose it in the list and press the delete key.

If you need to repeat a scan for any sources already setup, you can do so here.

If your DVB trasports are messed up, you can adjust them in the Transport Editor.

When you are done making changes, exit mythtv-setup.

Troubleshooting

If it shows up blue and throws errors relating to databases, check these things:

  • Are you in the mythtv group?
    • You can check who is in the mythtv group by running
      • grep mythtv: /etc/group
    • If you aren't in the mythtv group, add yourself to the group
      • sudo usermod -a -G mythtv USERNAME
        Where USERNAME is the name of the user being added.
    • After adding yourself to the group, remove ~/.mythtv and then log out/in.

      • rm ~/.mythtv -rf
  • If you are already in the group, try to remove ~/.mythtv and then try again.
    • rm ~/.mythtv -rf
  • If you still have troubles connecting to the database, you can use these commands to reset the password:
    • mysql -u root mysql
      mysqlcheck -r -u mythtv -pmythtv mythconverg
      • UPDATE user SET Password=PASSWORD('mythtv') WHERE user='mythtv';
        FLUSH PRIVILEGES;
        quit

Another common problem is that the mysql database cannot be found. The most probable cause is that you entered the wrong mysql root password when you installing mythtv-database. Mythtv-database needs the mysql root password in order to create the table needed for mythtv. The solution is to reinstall mythtv-database from scratch making sure before that you know the right mysql root password. One way of doing this is to actually reset the password to whatever you want by using

  • sudo mysqladmin password NEWPASSWORD

When you install mythtv-database, it wiĺl prompt you for the mysql root password which is at this point NEWPASSWORD above if you reset the mysql root password.

To reinstall mythtv-database

  • sudo apt-get remove --purge mythtv-database
    sudo apt-get install mythtv-database

MythTV_mythtvsetup (last edited 2008-07-24 17:11:10 by localhost)