MythTV on Mac OS X
MythTV works just fine on OSX (but see the backend gotchas below).
- 1 Hardware Requirements
- 2 Pre-built Downloads
- 3 Using MythFrontend
- 4 Installing MythTV Backend
- 4.1 Install Wget
- 4.2 Set Up MySQL
- 4.3 Automatic Backend Startup
- 4.4 Gotchas and Warnings
- 5 Setting up MythWeb
- 6 Troubleshooting and Monitoring
- 7 Building MythTV Yourself
- 8 Tips and Tricks
- 8.1 Remote Control
- 8.2 Playback Settings
- 8.3 MythGrowl Notifications
- 8.4 Performance Tweaks for Underpowered Systems
- 9 For more information
- 10 Help Improve This Page
To watch TV at acceptable speeds, you'll want at least an 800 MHz G4 or better. For HDTV nearly any Intel-based Mac released from 2006 onwards will suffice, though newer machines will allow the use of better deinterlacers for 1080i content. MythTV will not use GPU acceleration on OSX until #2381 or an equivalent has been finished.
The backend takes very little CPU power, except when marking commercials. An 800 MHz G4 PPC or CoreDuo Intel Mac is fine.
Can you help? We looking for users who can help create release builds. Interested? Read more Mac OSX Release Build Contributors Page
|0.15 through 0.23-fixes||Old||
Nigel Pearson can provide a 0.15 or 0.17 binary, if you really need one.
MythFrontend is a normal OSX app that has no special dependencies to run. It is compatible with versions of OSX from 10.3.x (Panther) through 10.6.x (Snow Leopard).
Note: in order for the MythTV Frontend to do anything useful you must first have a MythTV backend installed and configured. Additionally the frontend and backend generally need to be the same major version to work together.
The first time you run MythFrontend, it will enter a setup mode where you must configure the details of its access to the backend, and its display options. See the User Manual for more information on configuring the frontend.
Installing MythTV Backend
The MythTV backend and its dependencies run smoothly on OSX, though you should be sure to install a version at least as recent as 0.22-fixes (as of Jan 15, 2010), particularly if you are using Snow Leopard 10.6.x.
Setting up the backend is somewhat more complicated than when using prebuilt Linux distributions such as MythBuntu. Inexperienced users who run into trouble may wish to gain experience with MythTV on Linux as training for setting it up on OSX.
The main additional complexities of installing the backend on OSX are
- Installing wget
- Installing MySQL
- Setting initial MySQL database and permissions
The MythFillDatabase program (fetches schedule info) depends on
wget which is not included in the default install of Mac OSX. You can install
wget directly, or via Fink or MacPorts, or by downloading and building it.
MythTV-Setup also uses
wget when trying to obtain the channel list, so one must install
wget before trying to take the backend through its initial setup steps.
Set Up MySQL
The MythTV backend relies on having a MySQL database available for storing information about upcoming and past recordings, channel setup, and the like.
Download and Install
Grab and install MySQL 5.1 for Mac OS X from the Mysql site. The 32-bit version is fine.
After installation, the MySQL server needs to be started. Rebooting is the simplest way.
MySQL Server Startup Details
The MySQL distribution can set itself to start automatically on boot by creating a startup item
/Library/StartupItems/MySQLCOM and setting a value in
/etc/hostconfig. You enable it if you install the MySQLStartupItem.pkg included in the MySQL distribution's disk image. After that the easiest way to start the mysqld daemon is simply to reboot. To start MySQL manually you can call
MySQL Server Data Directory
If you get an error message such as Permission denied to the data directory, use this command:
sudo chmod -R oug+rwX directory
(where directory is typically
/usr/local/mysql/data), then attempt to start the database server again.
Initial Database Setup
Open Terminal. Type in the following and press enter:
shell> cd /usr/local/mysql/bin/
shell> characters indicate the shell prompt, not something you need to type.
Configuring Default Database Users
Enter the specialized MySQL shell
shell> ./mysql -u root
which should start and prompt you for input with the
Delete the anonymous MySQL accounts by entering the following command:
mysql> DROP USER ''@'localhost';
If you don't know your machine's hostname, look it up in the table produced by entering
mysql> SELECT Host, User FROM mysql.user;
Then, set passwords for the root account by entering the below commands and substituting your desired password for newpwd and your backend machine's hostname for host_name.
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd'); mysql> SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('newpwd'); mysql> SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd'); mysql> SET PASSWORD FOR 'root'@'host_name.local' = PASSWORD('newpwd');
This root password is not one you will generally have to share, but you should definitely make a record of it.
Database Privileges and Character Set
Finally, create the mythtv user and
mythconverg database in MySQL, substituting your desired password for that user where it says mythtv-password:
mysql> CREATE DATABASE IF NOT EXISTS mythconverg; mysql> GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv-password"; mysql> FLUSH PRIVILEGES; mysql> GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv-password"; mysql> FLUSH PRIVILEGES; mysql> ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
This MythTV password will be given to any frontend you use, and is therefore going to be kept relatively insecure, so don't choose a password that is important to you. The customary choice for this password is mythtv.
The above commands are equivalent to the setup script that runs automatically when you install MythTV on Linux distributions.
If you will be watching TV on other computers using this backend, you will need to create database permissions for them as well. See the MySQL manual for more information.
Finishing Backend Setup
Now download the backend (from one of the servers above).
Launch MythTV-Setup.app and go through the configuration steps (detailed explanations can be found in the User Manual). Follow the instructions (it will tell you to run MythFillDatabase.app once you've setup your capture card).
You're done! Watch and record TV using MythFrontend.app.
Automatic Backend Startup
Method 1: Login Item
Make MythBackend a Login Item for the DVR user, using the Accounts section of System Preferences.
Method 2: Launchd
MythBackend is really a daemon, and it is nice to control it as such. The approved way to automatically start processes in OSX is to use
launchd. Placing the following property list in
~/Library/LaunchAgents/MythBackend.plist of the relevant user account will cause MythBackend to be started whenever that user logs in, and restarted if killed or crashed.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <true/> <key>Label</key> <string>MythBackend</string> <key>ProgramArguments</key> <array> <string>/Applications/MythBackend/MythBackend.app/Contents/MacOS/MythBackend</string> <string>-l</string> <string>/var/log/MythBackend</string> </array> </dict> </plist>
Note that the path to the MythBackend application binary should be set to where you happen to keep it. If you need to stop the process, you cannot just
kill it. Instead use
launchctl unload -w ~/Library/LaunchAgents/MythBackend.plist
and once you are ready to start it again type
launchctl load -w ~/Library/LaunchAgents/MythBackend.plist
in a Terminal window.
Gotchas and Warnings
Most PCI video capture cards lack OSX drivers, so the Mac OS X backend does not support the majority of tuners listed as being supported by (the Linux version of) MythTV.
The HDHomeRun network tuner is well known to work using the Mac version of Myth backend. Recording via firewire from set top boxes such as the Motorola 6412 or Motorola DCT 6200 is also known to work. There are no current plans for additional hardware support.
Dolby AC3 Sound
(As of mythtv 22-fixes-20091115) AC3 passthrough of digital audio will occasionally malfunction, due to the bug discussed in #5552. You may not want to enable this option in your frontend setup.
(As of mythtv 0.21-fixes-20090316) There is one important note if trying to record via FireWire on an Intel Mac. The MythBackend cannot get a LAM lock signal when recording TV via FireWire. The solution is to check the "Open with Rosetta" checkbox on the Get Info panel of MythBackend.app. See this post for information.
Because of this, it's important to open MythBackend.app from the Finder and not from a Terminal window because it won't open with Rosetta. There must be some PPC-specific FireWire code in there.
This method had successfully been used to record HD over FireWire on a Intel Mac Mini (Macmini3,1) on a Motorola DCT 6200 cable box.
Setting up MythWeb
MythWeb is a convenient collection of website code that lets you set up recordings, browse the schedule, and review existing recordings without having to start the complete frontend. Since Macs have a built-in webserver, it's pretty simple to get MythWeb going as well. For complete setup instructions, please see MythWeb_on_Mac_OS_X_Backend.
Troubleshooting and Monitoring
Process View and CPU Usage
To see if you have processes running, you can use the
ps command in a terminal, or even better, you can use the Activity Monitor supplied by Apple (usually found in
/Applications/Utilities/). Sort by process name. You should see MySQL as
mysqld and MythBackend as
By default, MythBackend and MythFrontend log to standard output (often
It is convenient to separate the backend log from the general system log. If you launch the backend with the
-l logfilename directive then it will log to logfilename instead. You can view the logs with
tail in a command-line window, or more conveniently using Console.app, also in
MythFillDatabase sends messages both to the standard output and the standard error. You may like to similarly redirect that output.
Building MythTV Yourself
Refer to the MythTV on Mac OSX build page
UNDER CONSTRUCTION (stuarta)
In order to run the build you will need the following:
- Xcode for your OS X release
- MythTV packager
- Firewire SDK (optionally)
- internet connection
Obtaining Xcode and Firewire SDK
Xcode is available on your OSX installation DVD. Insert your installation DVD and browse to it.
- Snow Leopard: Under the Optional Installs Directory is the Xcode installer.
- Leopard: <info needed>
- Tiger: There's an Xcode Tools Directory on Disc 1 and a pdf describing what
to do with it.
Firewire SDK is available from the apple developer site.
You will need to register as an apple developer.
There are installable git packages available from git-osx-installer
Install this package. It installs the binaries into /usr/local/git/bin so you'll either need to update your path, or restart your terminal window, or logout and back in again (via ssh).
Obtaining the packager
The easiest way to build MythTV from source is to download the packager script. The packager scripts downloads the source and builds the release.
You need to obtain the correct packager for your release.
Stable release (recommended) git clone -b fixes/0.24 git://github.com/MythTV/packaging.git
Development release git clone git://github.com/MythTV/packaging.git
Tips and Tricks
The Apple Remote can be used to control the most common MythTV functions:
- Directional keys: arrow keys
- Play/Pause: Enter
- Menu: Escape
Holding down buttons will generate alternate inputs:
- Hold Play/Pause: P (play/pause playback)
- Hold Menu: M (Menu in playback)
- Hold Left/Right: Home/End
See the Keybindings page for what these key equivalents will do in any given situation. Keybindings can be altered in the settings menu using MythWeb. For example you may wish to try changing the "Pause" setting for TV Playback from P to P,Enter to support the play/pause button on the Apple Remote.
The Apple Remote will not work properly on versions of Snow Leopard prior to 10.6.2 (#7112).
Other Infrared Remotes
Experimental GPU Acceleration
Versions of the frontend greater than 0.24 (strictly speaking, since the enhancements of #7112) can accelerate H.264 video using Apple's Video Decode Acceleration GPU library. This does not include accelerating the MPEG2 streams used by cable and over-the-air broadcasters in the United States.
Display Scale Hacks
Menus, titlebars and other text may be cut off on high-resolution televisions driven by your Mac, or be too small to see from a distance, which interferes with the ability to use your it as a standard computer. You can change the display scale to make applications appear better. To do this, modify the global scale factor
shell> defaults write NSGlobalDomain AppleDisplayScaleFactor 1.25
(To reset the scale just run the above commands both with a scale of 1.0.)
The scale factor (1.25) increases the OSX system fonts by 25%. Myth won't like this (and doesn't need it) so you need to force the scale factor for Myth back to the default 1.0. For MythTV and any other app you wish to render on the with normal fonts, you can modify the app-specific scale factor like this
shell> defaults write net.psychosis.MythFrontend AppleDisplayScaleFactor 1.0
If you want to try controlling MythTV via Bluetooth, Brad came up with a 'Salling Clicker' action http://members.shaw.ca/dignon/MythTV%20Remote%20Suite%20v1_1.cgz [404 Not Found]
Computer To Computer Network Control
If you want to try controlling MythTV from another Mac (perhaps by a PowerBook from the couch), Generally Helpful Software has released an early beta of a remote control application, Remote Remote GH for MythTV http://web.mac.com/grhowes/iWeb/Generally%20Helpful%20Software/Remote%20Remote%20GH.html
Another Mac OS X network remote control is available at http://ignasiak.googlepages.com/mythremote
In the setup screens, explore the "TV Settings" -> "Playback" options. You'll find two pages of Mac-specific settings there. If your machine isn't fast enough, you can choose to drop frames here. If you have cycles to spare, you'll find fun settings like video in the Dock, on the Desktop, or in a floating (and optionally translucent) window.
There is an application for Mac OS X called MythGrowl that generates Growl notifications when your MythTV backend starts or finishes a recording. Not part of Mythfrontend but worth a mention. It can be downloaded at http://mythgrowl.sourceforge.net/
Performance Tweaks for Underpowered Systems
Performance with interlaced 1080i video is significantly affected by the choice of deinterlacer. The current builds (0.21-fixes, 0.22-fixes, 0.23-fixes) do not properly support the "2x" deinterlacers for 1080i60 (but they do for 480i), so if you are using one of those, try the "normal" version. Underpowered systems may do best with the Kernel deinterlacer, or Linear Blend if that's still taxing your CPU. Newer systems should be able to run Yadif or Greedy HIghMotion, which provide significantly better deinterlacing than the previous options.
Running TV playback in a smaller window can also improve performance, as can customising your backend recording settings. (E.g. Smaller capture from analog cards, 44.1KHz audio is a better match to some Macs than 48KHz.)
For more information
If you have problems with this guide, the mythtv-users mailing list is the best place to start. Check the searchable archive to see if your problem has already been discussed. Also, you can check the mythtv-dev list to see if it's a problem with SVN; if you can't compile MythTV, you may just have to wait a few days and try again.
- The user manual at User_Manual:Index has a lot of material, though it is Linux-oriented
- For MythTV on Mac OS X on Intel machines, there is also also Myth on Mac x86. (However, that page is very out of date in many respects.)
- Some suggested technical innovations for Myth on OSX are at Technical_Directions_On_OSX
Help Improve This Page
Finally, remember that this is a Wiki. If you find an inaccuracy, or have advice that may be helpful to others, improve this guide by adding your information!