MythTV for Linux

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search

Mythtvlogo.png

MythTV is a Free Open Source software digital video recorder (DVR) project distributed under the terms of the GNU GPL. It has been under heavy development since 2002, and now contains most features one would expect from a good DVR. It is a great alternative to TiVo and can easily be deployed by a Novice on a PC or Mac. Combining MythTV, Linux (or Mac) and your favorite hardware, you can have a powerful Subscription Free Digital Video Recorder.

Just a few MythTV features :

  • Pause live TV
  • Schedule programs to record
  • Watch one program while recording another
  • Manage your digital library of music and video

(new features are being added all the time. MythTV does far more than what will be covered here.)

MythTV is not a device. MythTV is not an Operating System. MythTV is software that runs under Linux or Macintosh. Create a home theater PC (HTPC) or media center computer using the MythTV software.

You can buy a prebuilt DVR already running MythTV and use it as a TiVo like device without having any knowledge of Linux or the underlying operating system. Several companies sell MythTV based devices.

Introduction

MythTV supports operating systems other than Linux. Although similar to Linux, FreeBSD isn't a Linux distribution and MythTV runs on FreeBSD too. Macintosh OS-X is another *nix that can be used to run MythTV.

For the Microsoft community things are not as optimistic. Due to inherent Microsoft bloat and internal design dynamics porting MythTV to the Microsoft Windows platform has not happened as of this writing. There is, however, a way to run MythTV front-end on Microsoft Windows. There is no MythTV backend for Windows.

There are now some MythTV Apps for Mobile Devices. There are streaming clients, as well as IP based remote controls that will run on many smart phones. Most of these apps are developed by 3rd party developers and are not official MythTV project releases.

The primary operating system target for MythTV operation remains Linux. Although MythTV can be installed to run on a Linux system installed from one of the many available distributions, there are actually special Linux distributions built specifically for and around the purpose of using MythTV. With one of these specialized MythTV Linux distributions you can turn a PC into a DVR and multimedia center relatively easily.

Of the available Linux distributions specifically for MythTV, Mythbuntu is currently one of the best. For that reason, much of the discussion here is Mythbuntu centric, however, also applies to running MythTV installed to Ubuntu, kubuntu, and Debian independently. Furthermore, whereas package management is not concerned, or specifics to the Windows shell, the MythTV information can also apply to running MythTV on any distribution.

Related Resources:

  • MythTV Setup Series - specific aspects of MythTV configuration
  • Mythbuntu - a Ubuntu derivative focused upon MythTV (mythbuntu has been retired)

Installation on Ubuntu

to install MythTV and components use apt to download and install

sudo apt install mythtv mythtv-backend-master mythtv-database mythplugins
  • mythtv – Base MythTV packages
  • mythtv-backend-master – Main server backend
  • mythtv-database – MySQL DB for MythTV
  • mythplugins – Addons and plugins

MythTV's MySQL Database

Look for 'mythconverg' in your MySQL database. The mythconverg database is used by MythTV.

  • /var/lib/mysql/mythconverg/

Connect to MySQL from command line

mysql -p mythconverg
describe channel;
select * from channel;

and so on. Those are just some examples. Knowledge of SQL language necessary. Warning: Messing around the mythconverg database can wipe out your entire MythTV installation.

From the command line you can make a copy of the mythconverg database to be used for analysis and experimentation without the risk of impacting the live database.

cp -pr /var/lib/mysql/mythconverg/* /var/lib/mysql/mythconvergcopy/


troubleshoot

mythweb - no frontends selected

error: Mythweb finds no remote controllable frontends

The common cause of this is lack of an entry in /etc/hosts for the IP address of the mythtv BE hostname. Make one for the loopback and for the IP. Backend IP needs to be static.

scheduled recording doesn't show in Media Library / Recordings

Sometimes happens when user is watching the program even though it was scheduled to record, and specifically if the user pauses livetv during that time - also when the same tuner is being used to record as the user is watching, or on a single tuner system.

EPG off by one hour after Daylight Saving Time

The system time is correct, in that it changed by going ahead or back an hour as it should. However, now the Electronic Program Guide (EPG) is off by one hour. All of the correct programming is showing in the EPG, however, it is time shifted either ahead or back. In the fall season when DST ends, all clocks are set back 1 hour. The clock on the MythTV system is correct. The program guide shows a program that is airing at 6:00pm as scheduled for 7:00pm.

To resolve, the EPG program database needs to be cleared and then MythTV needs to be allowed to repopulate the database. Using MySQL command line interface, clear the Program table.

note: mythtv runs as root database, to open execute "sudo mysql -p" and enter the sql server password.

mysql> use mythconverg;
mysql> truncate table program;  

Now run the MythTV Backend Setup. Allow it to stop the Backend process. You won't need to make any changes in the MythTV Backend Setup interface. Exit the interface and choose "Yes" when asked if you wish to run "mythfilldatabase."

Open the MythTV Frontend and select Watch TV. Once the tuner is engaged it will start updating the EPG if you are using an OTA EPG and not a pay subscription service.

Select Country and Language screen comes up after reboot

Choose the country, language, and database configuration settings should appear once on initial front-end setup. If it persistently appears after each reboot then the the mythfrontend startup script is not being filled or is being overwritten. This can happen after an update of MythTV on some systems such as Mythbuntu.

Another reason the screen might be coming up is if the front-end is having connectivity problems. See MythTV Setup- Connecting to a backend for more details.

signal and reception

Before tweaking you need some baseline readings. Without these you won't know if the changes you're making are for the better or worse. Start with a channel scan to identify the frequency for each station you care about.

If trying to adjust antenna it may be necessary to keep a signal strength indicator visible for the desired channel frequency. When changing channels the signal strength is sometimes but not consistently and briefly displayed. To keep a signal strength indicator visible on the screen for the current channel you will activate SIGNALMON function.

The SIGNALMON function is activated by default via the key combination of

  • F7 on very old versions
  • Alt-F7 is the default for versions 0.21 and beyond
  • Alt-S
  • Ctrl-A

To configure the key combination for SIGNALMON goto Frontend SETUP -> EDIT KEYS -> TV Playback -> SIGNALMON

Your key binding for SIGNALMON may be different. You can set your own key binding of preference.

Online Resources

  • Searchable Mailing List Archive - many users have been helped installing and using MythTV though advice given on the MythTV mailing list. This is a searchable archive you can use to find answers from questions already asked and problems solved.
  • MythTV Community Forum - Although there is no official MythTV forum, this is the most widely used community in web format. Many users prefer this to the old mail list format.