Difference between revisions of "MythTV on Mac OS X"

From MythTV Official Wiki
Jump to: navigation, search
m (Automatic Backend Startup: launchctl commands)
 
(320 intermediate revisions by 38 users not shown)
Line 1: Line 1:
 
New users: before attempting to install MythTV for the first time, please familiarize yourself with the distinction between
 
New users: before attempting to install MythTV for the first time, please familiarize yourself with the distinction between
[[frontend]] and [[backend]].
+
[[Mythfrontend|frontend]] and [[Mythbackend|backend]].
  
 +
MythTV works just fine on OSX (but see the backend gotchas below).
  
 +
= Hardware Requirements =
  
= Installing pre-built MythFrontend binaries =
+
=== Frontend ===
 +
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.
  
== Pre-built Downloads ==  
+
=== Backend ===
 +
 
 +
The backend takes very little CPU power, except when marking commercials.  Any Mac capable of running OSX 10.5 Leopard or later will work fine.
 +
 
 +
= Pre-built Downloads =  
 
{| border="1" cellspacing="0" cellpadding="5" style="border-collapse:collapse; border-color:#8eabd0; background:#e7edf5"
 
{| border="1" cellspacing="0" cellpadding="5" style="border-collapse:collapse; border-color:#8eabd0; background:#e7edf5"
 
|- style="background: lightsteelblue"
 
|- style="background: lightsteelblue"
!Version !! Download
+
!Version !! Status !!
 
|-
 
|-
| 0.22-fixes
+
| Master/32
 +
| Developmental - Frontend Only
 
|
 
|
* [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42 The Sniderpad.com] ( [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42&func=select&id=7 Frontend] and [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42&func=select&id=8 Backend] Weekly Universal Builds)
+
*[https://sourceforge.net/projects/mythtvformacosx/files/v32/ Built on High Sierra (intel), Catalina (intel), and Big Sur (intel and arm64)]
 
|-
 
|-
| 0.21-fixes
+
| 31-fixes
 +
| Production - Frontend Only
 
|
 
|
* [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42 The Sniderpad.com] ( [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42&func=select&id=7 Frontend] and [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42&func=select&id=8 Backend] Weekly Universal Builds, please look for files older than 10/2009 as 0.22-fixes have replaced the weekly 0.21-fixes)
+
*[https://sourceforge.net/projects/mythtvformacosx/files/v31 Built on High Sierra (intel), Catalina (intel), and Big Sur (intel and arm64)]
* [http://macvana.com/mythtv/FIXES/ macvana.com] (intel)
+
*[https://www.mythtv.org/wiki/Building_MythFrontend_on_Mac_OS_X Ansible based compile instructions]
 
|-
 
|-
| 0.21
+
| 0.30
 +
| Testing
 
|
 
|
* [http://macvana.com/mythtv/RELEASES/ macvana.com] (intel/universal frontend and intel full packages)
+
*[https://www.dropbox.com/s/wuyd3r0ux6b7jmk/mythfrontend.zip download]
* [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42 The Sniderpad.com] (Universal [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42&func=fileinfo&id=749 Frontend] and [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42&func=fileinfo&id=754 Backend])
+
*[https://forum.mythtv.org/viewtopic.php?t=3166#p16856 Posted on forum]
 
|-
 
|-
| 0.20.2
+
| 0.29-fixes
 +
| Testing
 
|
 
|
* [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42 The Sniderpad.com] (Universal, [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42&func=fileinfo&id=537 frontend] and [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42&func=fileinfo&id=543 backend])
+
*[https://dl.bintray.com/warpme/macOS-MythTV-frontend.app/MythFrontend-OSX-29-fixes.zip Occasional builds by WarpMe! ]
* [http://vanvalkinburgh.org/2007/09/24/mythtfrontend-0202/ Vanvalkinburgh] (Universal frontend)
 
* [http://macvana.com/mythtv/RELEASES/ macvana.com] (intel)
 
 
 
 
|-
 
|-
| 0.20-fixes
+
| 0.28 (recommended)
 +
| Production
 
|
 
|
* [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42 The Sniderpad.com] (ppc)
+
*[http://sourceforge.net/projects/mythtvformacosx/files/ MythTV frontend and backend for Mac OSX on Sourceforge]
* [http://collectivity.goof.com/articles/2006/10/01/mythfrontend-0-20-fixes-for-os-x-universal collectivity.goof.com]
 
* [http://padilla.net/mythtv-osx padilla.net] (intel)
 
* [http://macvana.com/mythtv/FIXES/ macvana.com] (intel)
 
 
|-
 
|-
| 0.20
+
| v0.28-pre-3649-gae35a28 (beta)
|  
+
| Testing
* [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42 The Sniderpad.com] (ppc)
+
|
* [http://collectivity.goof.com/articles/2006/09/27/mythfrontend-0-20-for-all-mac-os-x-variants/ collectivity.goof.com] (universal)
+
*[http://www.avenard.org/files/mythtv/mac/MythFrontend-v0.28-pre-3649-gae35a28.zip MythTV 0.28 beta] complete frontend (requires OS X >= 10.9 and 64 bits host)
* [http://macvana.com/mythtv/RELEASES/ macvana.com] (intel)
 
 
|-
 
|-
| 0.19-fixes
+
| 0.27.4
|  
+
| Production
* [http://collectivity.goof.com/articles/2006/04/08/mythfrontend-for-mac-os-x-ppc-intel collectivity.goof.com] (ppc & intel)
+
|
 +
*[https://sourceforge.net/projects/macportsmythtvinstaller/ MythTV 0.27.4] complete frontend/backend systeml including MariaDB and MythWeb - (MacPorts-built installer). Includes fix for impending SchedulesDirect disruption.
 
|-
 
|-
| 0.19
+
| 0.27.3
|  
+
| Production
* [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42 The Sniderpad.com]
+
|
* [http://collectivity.goof.com/articles/2006/04/08/mythfrontend-for-mac-os-x-ppc-intel collectivity.goof.com]
+
*[http://www.avenard.org/files/mythtv/mac/ MythTV 0.27.3 compiled on an irregular basis (universal build runs on 10.6+)]|
 
|-
 
|-
| 0.18.1-fixes
+
| 0.27
|  
+
| Production
* [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42 The Sniderpad.com]
+
|
 +
*[http://sourceforge.net/projects/mythtvformacosx/files/ MythTV frontend and backend for Mac OSX on Sourceforge]
 +
*[http://www.avenard.org/files/mythtv/mac/ MythTV 0.27.3 compiled on an irregular basis (universal build)]
 +
*[https://sourceforge.net/projects/macportsmythtvinstaller/ MythTV 0.27.0] (MacPorts-built installer) - complete frontend/backend systeml including MySQL and MythWeb.
 
|-
 
|-
| 0.18.1
+
| 0.26
|  
+
| Production
* [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42 The Sniderpad.com]
+
|
* [http://collectivity.goof.com/articles/2006/04/08/mythfrontend-for-mac-os-x-ppc-intel collectivity.goof.com]
+
*[http://www.avenard.org/files/mythtv/mac/ MythTV 0.26 compiled on an irregular basis (intel only, universal 32/64 bits, runs on 10.6+)]
 +
*[http://sourceforge.net/projects/mythtvformacosx/files/ MythTV frontend and backend for Mac OSX on Sourceforge]
 +
*[[MacPorts]] mythtv-core.26 - full install including bindings but not plugins. Firewire support possible.
 
|-
 
|-
| 0.18
+
| 0.25
|  
+
| Unsupported
* [http://www.thesniderpad.com/index.php?option=com_remository&Itemid=42 The Sniderpad.com]
+
|
|-
+
*[http://www.avenard.org/files/mythtv/mac/ MythTV master compiled on an irregular basis (intel only, universal 32/64 bits)]
| 0.16
+
*[http://sourceforge.net/projects/mythtvformacosx/files/ MythTV frontend and backend for Mac OSX on Sourceforge]
|
+
*[[MacPorts]] mythtv-core.25 - full install including bindings, PPC and Intel architectures, firewire support possible
* [http://www.ornstedt.nu/mythtv-0.16-1.dmg Ornstedt.nu]
 
 
|-
 
|-
| older
+
| 0.15 through 0.24
 +
| Old
 
|
 
|
[[Nigel Pearson]] can also provide a 0.15 or 0.17 binary, if you really need one.
+
* Please see [[Older_OSX_Builds]]
|-
 
| svn (nightly builds)
 
|
 
* [http://www.thesniderpad.com//index.php?option=com_remository&Itemid=36&func=select&id=3 The Sniderpad.com] (Nightly Universal Builds)
 
* [http://www.macvana.com/mythtv/TRUNK/ macvana.com] (intel)
 
 
|}
 
|}
 +
Want to contribute builds? Read more at the [[Mac OSX Release Build Contributors Page]].
  
 +
= Using MythFrontend =
  
You're now ready to run mythfrontend! Find the MythFrontend.app icon and double click it to start mythfrontend. If it doesn't start, open a console window to see the mythfrontend output which may give you some clues as to what's wrong.
+
'''MythFrontend''' is a normal OSX app that has no special dependencies to run. Version 0.27 is officially supported on 10.8 and 10.9.  Version 0.25 through 0.26 are compatible with 10.5 to 10.7. Older versions are compatible with versions of OSX from 10.3.x (Panther) through 10.6.x (Snow Leopard).
  
= Installing MythTV Backend on Mac OS X using prebuilt binaries =
+
{{Warning}} 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.
  
{{Warning}} '''The prebuilt MythBackend.app binaries from 0.21-fixes do not work on Snow Leopard as of 20090921 SVN Revision 21625The status of 0.22 is unknown. It's recommended you wait to upgrade to Snow Leopard if you rely on MythBackend.app'''
+
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 optionsFor v0.25 the frontend must be configured to use OpenGL. See [[ForcingOpenGL|here]] for instructions.
  
 +
See the [http://www.mythtv.org/wiki/User_Manual:Detailed_configuration_Frontend User Manual] for more information on configuring the frontend.
 +
  
== Install Wget ==
 
The MythFillDatabase program (fetches schedule info) depends on ''wget'' which is not included in the default install of Mac OSX. It can be installed [http://www.statusq.org/archives/2008/07/30/1954/ directly], via Fink or MacPorts, or by [http://www.gnu.org/software/wget/ downloading] and building it. <code>MythTV-Setup.app</code> also uses ''wget'' when trying to obtain the channel list so one must install ''wget'' before trying to use the backend.
 
  
== Set Up MySQL ==  
+
==== Accessing MythWeb ====
  
The MythTV backend relies on having a MySQL database available for storing information about upcoming and past recordings, channel setup, and the like.
+
To watch streamed video on [[MythWeb]] servers from OSX, you may have to [[MythWeb_client_on_Mac_OS_X|alter the treatment of streaming files]].
  
==== Download and Install ====
+
= Installing MythTV Backend =
  
Grab and install MySQL 5.0 for Mac OS X from the [http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg Mysql site].
+
The MythTV backend and its MySQL database run smoothly on OSX.
 +
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.
  
==== Server Startup ====
+
The main additional complexities of installing the backend on OSX are
After installation, the mysql server needs to be started.  The MySQL distribution includes a Preference Pane for this, which is the easiest way to make MySQL start automatically.  A more system-wide way would be to use <code>launchd</code> by setting up a plist in <code>/System/Library/LaunchDaemons/</code>.  To start MySQL manually you can use <code>/usr/local/bin/mysql/bin/mysqld</code>.  This may prompt an error message for lack of access to the directory.  If it does type <code>chmod oug+rwX directory</code> to enable it, then start the database server again.
+
* Installing MySQL
 +
* Setting initial MySQL database and permissions
  
==== Initial Database Setup ====
 
  
Open <code>Terminal</code>.  Type in the following and press enter:
 
<pre>
 
cd /usr/local/mysql/bin/
 
</pre>
 
  
Delete the anonymous mysql accounts by entering the following commands:
+
== Set Up MySQL ==
<pre>
 
shell> ./mysql -u root
 
mysql> DROP USER '';
 
</pre>
 
  
If you don't know your machine's hostname, look it up in the table produced by entering
+
The MythTV backend relies on having a MySQL database available for storing information about upcoming and past recordings, channel setup, and the like.
<pre>
 
mysql> SELECT Host, User FROM mysql.user;
 
</pre>
 
  
Then, set passwords for root account by entering the below commands and substituting your desired password for ''newpwd'' and your backend machine's hostname for ''host_name''.
+
==== Download and Install ====
<pre>
 
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
 
mysql> SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd');
 
</pre>
 
  
 +
Grab and install MySQL 5.1 for Mac OS X from the [http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg Mysql site].  Either the 32-bit or 64-bit version is fine, except for Australian users running OSX 10.7 who will need 64-bit libraries to run [http://svn.whuffy.com/ shepherd] for TV guide data.
  
Finally, create the ''mythtv'' user and database in MySQL, substituting your desired password for that user where it says "mythtv-password":
+
For controlling the MySQL database server, you can choose one of the following options:
  
<pre>CREATE DATABASE if not exists mythconverg;
+
# Set up the database server without locking it to a user account by installing '''MySQLStartupItem.pkg'''.  More information for the curious is [[MySQL_For_Myth_on_Mac_OS_X|here]].
GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv-password";
+
# Choose a user account responsible for running the database server, then install '''MySQL.prefPane''' for that account. You will almost certainly want to use ''System Preferences -> Accounts'' to make that account automatically login.
FLUSH PRIVILEGES;
 
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv-password";
 
FLUSH PRIVILEGES;
 
ALTER DATABASE mythconverg DEFAULT CHARACTER SET latin1;
 
</pre>
 
  
The above commands are equivalent to the setup script that runs automatically when you install MythTV on other *nix distributions.
+
==== Server Startup ====
 +
After installation, the MySQL server needs to be started.
  
Now download the backend (from one of the servers above).
+
* Reboot and the server will start automatically if you used the Startup Item.
 +
* If you have installed '''MySQL.prefPane''' preference pane instead
 +
** Go into System Preferences and select '''MySQL''' in the ''Others'' category
 +
** Check ''Automatically Start MySQL on Startup''
 +
** Click on the '''Start MySQL''' button.
  
Launch <code>MythTV-Setup.app</code> and go through the configuration steps.  Follow the instructions (it will tell you to run <code>MythFillDatabase.app</code> once you've setup your capture card).
+
==== Initial Database Setup ====
 
 
You're done!  Watch and record TV using <code>MythFrontend.app</code>.
 
  
 +
Open '''Terminal'''.  Type in the following and press enter:
  
== Automatic Backend Startup ==
+
''shell> ''cd /usr/local/mysql/bin/
  
One way to start the backend is to make it a Login Item for the DVR user using the Accounts section of the control panel.  However, 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 <code>launchd</code>.  Placing the following property list in <code>~/Library/LaunchAgents/MythBackend.plist</code> of the relevant user account will cause MythBackend to be started whenever that user logs in, and restarted if killed or crashed.
+
Here, the <code>''shell> ''</code> characters indicate the shell prompt, not something you need to type.
<pre>
 
<?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>
 
</pre>
 
  
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 <code>kill</code> it.  Instead use
+
===== Configuring Default Database Users =====
launchctl unload -w ~/Library/LaunchAgents/MythBackend.plist
 
and once you are ready to start it again type
 
launchctl load -w ~/Library/LaunchAgents/MythBackend.plist
 
  
== Gotchas and Warnings ==
+
Enter the specialized MySQL shell
  
==== Limited Tuners ====
+
  ''shell> ''./mysql -u root
As of v0.21, the Mac OS X backend does not support the majority of tuners listed as being supported by the (Linux) version of MythTV. The following tuners are known to work using the Mac version of Myth backend: HDHomeRun. Recording via firewire from set top boxes such as the Motorola 6412 or Motorola DCT 6200 is also known to work. Plans (if any) for additional support are unknown.
 
  
 +
which should start and prompt you for input with the <code>mysql></code> prompt.
  
==== Dolby AC3 Sound ====
+
Delete the anonymous MySQL accounts by entering the following command:
(As of mythtv 22-fixes-20091115) You cannot yet use AC3 passthrough of Dolby digital audio, due to the bug discussed in {{Ticket|5552}}.  Do not turn on this option in your setup.
 
  
==== Channel Scan ====
 
(As of mythtv 21-fixes-20090215)  Multicore machines are likely to run afoul of bug {{Ticket|5832}}, crashing setup while trying to perform a scan for channels.  While on some operating systems one can use the <code>taskset</code> command to restrict to a single core, OSX lacks any equivalent.  The problem is claimed to be fixed in the "mythtv-channel-scan" branch of SVN, but as of this writing no prebuilt backend binaries are available for this branch.  The best workaround is presently to set up a temporary backend on Linux, scan channels, and then copy the <code>channel</code> and <code>dtv-multiplex</code> tables back to the Mac using <code>mysqldump</code>. (Not everyone runs into this problem)
 
  
==== Firewire Recording ====
+
<pre>mysql> DROP USER ''@'localhost';</pre>
  
(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 [http://www.gossamer-threads.com/lists/mythtv/users/352434#352434 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.
+
If you don't know your machine's hostname, look it up in the table produced by entering
  
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.
+
''mysql> ''SELECT Host, User FROM mysql.user;
  
= Building MythFrontend yourself =
 
  
== Building Automatically ==
+
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''.
  
The easiest way to build MythTV from source is to download the packager script. Either http://svn.mythtv.org/svn/branches/release-0-22-fixes/mythtv/contrib/OSX/osx-packager.pl or http://svn.mythtv.org/svn/trunk/packaging/OSX/build/osx-packager.pl. This script just needs XCode and an internet connection - it downloads and builds all the dependencies, and if you are lucky gives you several double-clickable applications.
+
''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');
  
== Building Manually ==
+
This root password is not one you will generally have to share, but you should [http://www.howtoforge.com/reset-forgotten-mysql-root-password definitely] make a record of it.
  
Sadly, the packager script doesn't always work. Maybe one of the downloadable dependencies has been outdated, and someone needs to try building against a  newer one. Maybe the MythTV source code has changed and broken Mac builds. Look on the [[Myth_on_Mac_-_Build_status]] page for hints about this.
+
===== Database Privileges and Character Set =====
  
To get current information about what the build process should look like, you can always [http://svn.mythtv.org/trac/browser/trunk/packaging/OSX/build/osx-packager.pl inspect the  packaging script].  Obviously if the script is failing then there will be at least one part of it that needs a tweak, but the remainder of the script should save you a lot of time.
+
Finally, create the ''mythtv'' user and <code>mythconverg</code> database in MySQL, substituting your desired password for that user where it says ''mythtv-password'':
  
The rest of this guide is meant for those who would like to try out the latest MythTV code on Mac OS X, but are having trouble setting up the development environment. Many folks have had trouble figuring out which dependencies and versions are necessary, so this will help you get to a known working configuration. If you like to copy-and-paste commands, you'll love this guide.
 
  
 +
''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;
  
  
{{Note box| To use a handbuilt OS X version, it may be easier to start with a Linux machine running a recent SVN version of MythTV to act as a backend. If you've never installed MythTV, you can first set up Linux version such as MythBuntu, and only look at the OS X version once everything's working properly there. That said, don't be discouraged; many people use a OS X with FireWire STBs, IPTV, and the HD Home Run.}}
+
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''.
  
If you just want to watch TV on your Mac, and you aren't planning to do development, you're better off using a prebuilt binary.
+
The above commands are equivalent to the [https://github.com/MythTV/mythtv/blob/master/mythtv/database/mc.sql setup script] that runs automatically when you install MythTV on Linux distributions.
  
These instructions also assume that you're doing a completely clean reinstallation on your machine. If you don't start from scratch, some of the instructions may not be correct for your setup. If you're really having problems, back up your data and try these instructions again, doing a clean re-install of OS X as directed below.
+
If you will be watching TV on other computers using this backend, you will need to [http://stackoverflow.com/questions/6401218/granting-mysql-access-rights-to-all-machines-on-subnet create database permissions] for them as well. One common invocation is
  
=== Install OS X ===
+
''mysql> ''GRANT ALL PRIVILEGES ON mythconverg.* TO 'mythtv'@'192.168.1.0/255.255.255.0' IDENTIFIED BY "mythtv-password";;
 +
''mysql> ''GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO 'mythtv'@'192.168.1.0/255.255.255.0' IDENTIFIED BY "mythtv-password";
 +
''mysql> ''FLUSH PRIVILEGES;
  
The first step is to get a computer running Mac OS X. 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 2008 onwards will suffice.
+
See the [http://dev.mysql.com/doc/refman/5.1/en/account-names.html MySQL manual] if you need more information on permissions.
  
If you're starting from scratch, install Mac OS X 10.3 (Panther) or later on your future Myth box. Do a clean installation, not an upgrade -- I recommend the "Erase and Install" option to be sure you won't have problems from earlier data on your drive. For underpowered systems, when you're offered the chance to Customize the installation, turn off all the options except "BSD Subsystem". (The option "Essential System Software" cannot be turned off, so you will have two checked items total.)
+
=== Finishing Backend Setup ===
  
Continue with the installation and restart. Go through the setup and registration screens as normal. Once you reach the Finder, run Software Update and get any OS updates. Apply the updates and restart when directed by Software Update.
+
Now download the backend (from one of the servers above).
  
Not all software updates can be installed in one step, so you should run Software Update again after installing updates. QuickTime is used for MythVideo, so it is recommended to update that. Install any updates and restart; keep repeating this pattern until no updates remain.
+
Launch '''MythTV-Setup.app''' and go through the configuration steps.
 +
* Specific instructions for the common case of an [[Backend_Mac_OS_X_USA_HDHR_Setup|HDHomeRun in the USA]]
 +
* Detailed explanations for other variations can be found in the [http://www.mythtv.org/wiki/User_Manual:Detailed_configuration_Backend User Manual].
  
Underpowered systems may also wish to [http://www.macosxhints.com/comment.php?mode=view&cid=56590 disable Spotlight indexing] to avoid intermittent performance drops.
+
You're done!  Watch and record TV using '''MythFrontend.app'''.
  
=== Install OS X Developer Tools ===
+
== Automatic Backend Startup ==
 
 
You've got the latest and greatest OS, but the tools for compiling software are installed separately. Visit the [http://connect.apple.com/ Apple Developer Connection] website and log in. If you don't have an ADC account, you can create a free one. This gives you access to Apple developer tools, prerelease software, and other useful items.
 
 
 
Once you've logged in, click on "Download Software" and then "Developer Tools". Download the latest "Xcode Tools" software. Install the software by opening "Xcode Tools.mpkg" from the "Xcode Tools" disk image. You can do an Easy Install, the defaults are fine for building MythTV.
 
 
 
To checkout MythTV from Subversion source tree the Subversion Binary [http://downloads.open.collab.net/binaries.html  Subversion Client and Server for Mac OS X] is required. Download and install the application. Subversion will be installed in /usr/local/bin.
 
 
 
=== Set up your environment ===
 
  
That's it for the graphical Mac stuff. From here on out, we'll be working in Terminal. If you're a Unix geek, things should look a lot more familiar. If you aren't comfortable with Terminal, this probably isn't the best place to start; I suggest you learn a bit more about Unix before attempting to go further.
+
=== Method 1: Login Item ===
 +
Make '''MythBackend''' a Login Item for the DVR user, using the Accounts section of System Preferences.
  
From a new Terminal window, start by setting up some useful environment variables in your profile. Create a ''.bash_profile'' in your favorite text editor:
+
=== Method 2: Launchd ===
# vi .bash_profile
+
'''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 <code>launchd</code>.  Placing the following property list in <code>~/Library/LaunchAgents/MythBackend.plist</code> of the relevant user account will cause '''MythBackend''' to be started whenever that user logs in, and restarted if killed or crashed.
Add the following to the new file and save it:
 
{{Code box|.bash_profile|
 
<pre>
 
export SRCDIR=$HOME/src
 
export QTDIR=$SRCDIR/qt-mac-free-3.3.8
 
export DYLD_LIBRARY_PATH=/usr/local/lib:$QTDIR/lib
 
export PATH=$PATH:/usr/local/bin:$QTDIR/bin
 
</pre>
 
}}
 
Next, load these variables into your current session, and create ''SRCDIR'' where you'll be downloading and compiling.  
 
<pre>
 
. .bash_profile
 
mkdir $SRCDIR
 
cd $SRCDIR
 
</pre>
 
'''Optional:''' if you'd like to be able to run mythfrontend by double-clicking its icon from the Dock or the Finder, you'll have to set the <code>DYLD_LIBRARY_PATH</code> environment variable for the graphical environment. (Your <code>.bash_profile</nowiki></code> only affects what you do in Terminal.) To enable this, create the file {{Code box|~/.MacOSX/environment.plist|
 
 
<pre>
 
<pre>
mkdir ~/.MacOSX
 
vi ~/.MacOSX/environment.plist
 
</pre>
 
}}
 
Add the following to the new file: <pre>
 
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/[[Property List]]-1.0.dtd">
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 
<plist version="1.0">
 
<plist version="1.0">
 
<dict>
 
<dict>
        <key>DYLD_LIBRARY_PATH</key>
+
<key>KeepAlive</key>
        <string>/usr/local/lib:/Users/username/src/qt-mac-free-3.3.8/lib</string>
+
<true/>
 +
<key>Label</key>
 +
<string>MythBackend</string>
 +
<key>ProgramArguments</key>
 +
<array>
 +
<string>/Applications/MythBackend/MythBackend.app/Contents/MacOS/MythBackend</string>
 +
<string>--logpath</string>
 +
<string>/var/log/MythBackend</string>
 +
</array>
 
</dict>
 
</dict>
 
</plist>
 
</plist>
 
</pre>
 
</pre>
Replace ''username'' above with your user name. Note that we set the same directories as in the ''.bash_profile'', except that the other environment variables have been expanded into full paths.
+
where we have assumed that '''MythBackend.app''' resides in a <code>MythBackend</code> subfolder of <code>/Applications</code>.
  
=== Free Type ===
+
To have MythBackend run as a specific user, insert the following under <code></array></code>, substituting '''mythtv''' with the username of your choice.
 +
<key>UserName</key>
 +
<string>mythtv</string>
 +
Also, don't forget to create and set the correct permissions for the log file
 +
sudo touch /var/log/MythBackend
 +
sudo chown mythtv /var/log/MythBackend
 +
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 <code>kill</code> 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.
  
[[Free Type]] is the first of several dependencies you will have to install for MythTV. First download and unpack the source code: <pre><nowiki>
+
= Setting up MythWeb =
curl http://download.savannah.gnu.org/releases/freetype/freetype-2.1.10.tar.gz | tar -xz
 
cd freetype-2.1.10
 
</nowiki></pre>
 
Next, configure and make the source. These instructions use shared libraries for building MythTV, and include flags to turn on prebinding (a run-time optimization that launches programs faster), so they differ from the generic defaults provided by the project's install instructions. If you follow the commands here exactly, you should be OK. <pre><nowiki>
 
./configure --disable-static
 
make LDFLAGS="-no-undefined -Wl,-prebind,-seg1addr,0xC0000000 -lz"
 
sudo make install
 
</nowiki></pre>
 
When <code><nowiki>sudo</nowiki></code> asks for a password, enter your Mac login password. You'll get used to doing this a lot over the course of this guide.
 
  
[[Free Type]] is installed, so we return to <code><nowiki>SRCDIR</nowiki></code> in preparation for the next step. <pre><nowiki>
+
'''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|the OSX-specific instructions]].
cd ..
 
</nowiki></pre>
 
  
Freetype can also be installed via Fink or Portage OS X. See [[Fink And Portage]] for more information.
+
= Gotchas and Warnings =
  
=== LAME ===
 
  
The process here is the same as [[Free Type]], so I won't repeat the same explanations. Just use these commands: <pre><nowiki>
+
==== Limited Tuners ====
curl http://superb-west.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz | tar -xz
+
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.
cd lame-3.97
 
./configure --disable-static --disable-frontend
 
make LDFLAGS="-no-undefined -Wl,-prebind,-seg1addr,0xC1000000"
 
sudo make install
 
cd ..
 
</nowiki></pre>
 
  
LAME can also be installed via Fink or Portage OS X. See [[Fink And Portage]] for more information.
+
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.
  
=== MySQL ===
+
[[HDPVRCapture on Mac]] describes how to use HDPVRCaputre to record on Mac OS X with a Hauppauge HDPVR.
  
{{Note box|MySQL removes older versions of their software from their servers after a while. If mysql-5.0.87.tar.gz disappears, go to the server  [http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg here] and find the latest mysql-5.0.XX.tar.gz. Change the version number in the instructions below and mysql should build fine.}}
+
==== Firewire Recording ====
  
 +
If you build MythBackend yourself using MacPorts, [https://www.mythtv.org/wiki/Building_Myth_for_Mac_with_MacPorts Building Myth for Mac with MacPorts] it is possible to enable firewire recording during compilation. This is known to work with mythtv.28-0.28.1-Fixes running on an Intel Mac Mini (late 2012) under Mac OS High Sierra (10.13.1) on a Motorola DCX 3400 M cable box.
  
Again, there's nothing too complicated. You only need the client library from MySQL, so these commands turn off a lot of the parts that the installation offers. <pre>
 
curl http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/mysql-5.0.87.tar.gz | tar -zx
 
cd mysql-5.0.87
 
./configure --disable-static --without-debug \
 
  --without-server --without-geometry \
 
  --without-extra-tools --without-docs \
 
  --without-man --without-bench
 
make LDFLAGS="-no-undefined -Wl,-prebind,-seg1addr,0xC2000000"
 
sudo make install
 
cd ..
 
</pre>
 
  
=== Qt ===
 
  
(Qt is an application framework from [http://www.trolltech.com Trolltech] while QuickTime is a media suite from [http://www.apple.com/quicktime Apple])
+
If you are running an older pre-compiled version of MythBackend (as of mythtv 0.21-fixes-20090316) and cannot get a [[Channel tuning|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 [http://www.gossamer-threads.com/lists/mythtv/users/352434#352434 this post] for information.
  
Installing Qt is a bit more complicated, so we'll take this one more slowly. First get the source code: <pre>
+
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.  
curl ftp://ftp.trolltech.no/qt/source/qt-mac-opensource-src-4.4.3.tar.gz | tar -xz
 
cd qt-mac-free-4.4.3
 
</pre>
 
  
 +
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.
  
Make sure you update Quicktime completely, including the Quicktime SDK, using Software Update.
+
= Troubleshooting and Monitoring =
  
 +
=== Process View and CPU Usage ===
  
 +
To see if you have processes running, you can use the <code>ps</code> command in a terminal, or even better, you can use the '''Activity Monitor''' supplied by Apple (usually found in <code>/Applications/Utilities/</code>).  Sort by process name.  You should see MySQL as <code>mysqld</code> and '''MythBackend''' as <code>MythBackend</code>.
  
Next, configure the installation. Qt takes a long time to build, so we turn off everything that's not absolutely necessary.
+
=== Log Files ===
  
{{Note box|the command below turns off all window styles except "Windows"; this style looks best with MythTV, in my opinion, so I don't build the others. You may want to remove some of the <code><nowiki>-no-style-blah</nowiki></code> flags and try out other styles on your system.}}
+
By default, '''MythBackend''' and '''MythFrontend''' log to standard output (often <code>/var/log/system.log</code>).
  
 +
It is convenient to separate the backend log from the general system log.  If you launch the backend with the <code>-l ''logfilename''</code> directive then it will log to ''logfilename'' instead.  You can view the logs with <code>tail</code> in a command-line window, or more conveniently using '''Console.app''', also in <code>/Applications/Utilities/</code>.
  
<pre>
+
'''MythFillDatabase''' sends messages both to the standard output and the standard error.  You may like to similarly redirect that output.
./configure -release -fast -qt-sql-mysql \
 
    -no-exceptions -no-accessibility -no-stl \
 
    -no-sql-sqlite -no-sql-odbc -system-zlib -no-libtiff \
 
    -no-libmng -nomake examples -nomake demos \
 
    -no-nis -no-cups -no-qdbus -no-framework' \
 
  -I/usr/local/include/mysql \
 
  -L/usr/local/lib/mysql
 
</pre>
 
  
The configure step takes a while, but don't go get that cup of coffee right away; you will have to accept the GNU General Public License before it gets going. Type <code>yes</code> when it prompts you, then you can take a break.
+
=== MythTV_Setup.app Exit code 153 / Setup Timezone tables ===
  
The make process requires a bit of explanation. Qt needs the <code>-single-module<</code> flag to build correctly with our MySQL installation; the first line adds this to the compile instructions. We only build the <code>sub-src</code> target, as we only need the Qt library; this skips the documentation, examples, and a hundred other things that aren't necessary for working with MythTV. <pre>
+
If the MythTV_Setup.app from MythTV Backend goes through the connection to the MySQL server and then just aborts, verify you have the timezone information loaded into you MySQL installation. Follow the steps described in [[MySQL Time Zone Tables]] and it might help to get it working for you.
echo 'QMAKE_LFLAGS_SHLIB += -single_module' >> src/qt.pro
 
make sub-src
 
</pre>
 
We're now finished with Qt, and with all of the dependencies in fact.
 
cd ..
 
  
 +
= Tips and Tricks =
  
'''Alternatively to compiling Qt yourself''', you can grab a precompiled package from http://naranja.umh.es/~atg/
+
==== Remote Control ====
 +
===== Apple Remote =====
 +
The Apple Remote can be used to control the most common MythTV functions:
 +
* Directional keys: arrow keys
 +
* Play/Pause:  Enter
 +
* Menu:  Escape
  
=== Backend Setup ===
+
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
  
Make sure you set your backend to listen on some other IP address than 127.0.0.1 (which is the default). Run <pre><nowiki> mythtvsetup
+
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.
</nowiki></pre>
 
on your backend mythtv installation and put your not-127.0.0.1 IP adress in the database parameters; 192.168.1.x perhaps, whatever your network interface runs on and more importantly what IP address you set mysql to listen on.
 
  
You'll also need to allow connections to the mySQL server on your backend machine over your network.
+
===== Other Infrared Remotes =====
<pre><nowiki> mysql> grant all on mythconverg.* to mythtv@"10.0.1.%" identified by "mythtv";
+
See [[Keyspan Express Remote]].
</nowiki></pre>
 
  
=== MythTV ===
+
===== iPhone/iTouch Control =====
'''NOTE: If you decide to run ./configure and not use the osx-packager.pl, you MUST use the --disable-distcc flag or else your configure step will fail with some endianness check message.'''
+
Web-based remotes such as [http://mymote.wikispot.org/ MyMote] and others found [http://www.mythtv.co.nz/mythtv/remote/index.html here] or [http://legatissimo.info/node/355 here] should in principle work fine with an iPhone and OSX setups.  Some features of MyMote may require [http://www.lirc.org/software.html LIRC].
  
Finally, we're ready for MythTV itself. Download the main MythTV source: <pre><nowiki>
+
===== Android Control =====
svn co http://svn.mythtv.org/svn/branches/release-0-20-fixes/mythtv
+
The android app Mythmote can be used to control your mythtv frontend. Enable the Network control under Setup -> General -> Network Control.
</nowiki></pre>
 
Now we configure and make MythTV itself. Assuming that nothing is broken in the SVN tree (which happens sometimes for the Mac build), the defaults should work fine: <pre><nowiki>
 
cd mythtv
 
sudo ./configure --disable-distcc
 
make
 
sudo make install
 
</nowiki></pre>
 
  
If you look at your <code>config.err</code> file and see that the endian test failed, just use the osx-packager.pl script in the <code>contrib</code> directory to build MythTV.
+
===== Computer To Computer Network Control =====
Presuming you're in the <code>mythtv</code> directory already, simply type: <pre><nowiki>
+
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  
cd contrib
+
http://web.mac.com/grhowes/iWeb/Generally%20Helpful%20Software/Remote%20Remote%20GH.html
perl osx-packager.pl
 
</nowiki></pre>
 
It may still fail using GCC 4.x but should work if you change your GCC modules to 3.3.3-7. It will take a while to complete. Basically, it re-installs everything you have installed to this point.<br><i>source: mythtv-user list</i>
 
  
 +
Another Mac OS X network remote control is available at http://ignasiak.googlepages.com/mythremote
  
If you're missing qmake, return to the qt-mac-free-3.3.8 directory from the previous installation and install it from there:
+
==== Surround Sound in 7.1 Channels ====
<pre><nowiki>
+
To activate 7.1 audio (using either HDMI or DisplayPort); make sure to first launch the Audio MIDI Setup in <code>/Application/Utilities</code> and configure HDMI audio as 8 channels-24 bits (the default is just stereo). It is recommended to disable DTS and AC3 passthrough as it would reset the hdmi audio in two channels mode, which would break future multi-channels playback.
cd ../qt-mac-free-3.3.8
+
Note that for the time being, E-AC3, TrueHD and DTS-HD MA bitstreaming do NOT work under MacOS. That's until Apple provide the required 192kHz digital sampling rate (the hardware supports it!).
cd qmake
 
sudo make install
 
</nowiki></pre>
 
  
You must launch the frontend from the command line, as launching it through the Finder will not work properly (unless you completed the Optional section of step 3). Run the frontend with this command: <pre><nowiki>
+
==== GPU Acceleration ====
/usr/local/bin/mythfrontend.app/Contents/MacOS/mythfrontend
+
The frontend can accelerate H.264 video using the [[VDA|Video Decode Acceleration]] (VDA) GPU library, if available.
</nowiki></pre>
 
  
You'll be prompted for the MySQL connection parameters when it starts up. Enter the hostname for your Linux backend, and change any of the other parameters as appropriate. (This part is not Mac-specific and depends on your backend setup.) You should see the main menu for the frontend after it successfully connects to the MySQL server.
+
==== 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
  
When you update to the latest CVS, you should do a clean rebuild to prevent problems: <pre><nowiki>
+
''shell> ''defaults write NSGlobalDomain AppleDisplayScaleFactor 1.25
make distclean
 
cvs -z6 update -dP
 
./configure
 
qmake mythtv.pro
 
make
 
sudo make install
 
</nowiki></pre>
 
  
= Tips and Tricks =
+
(To reset the scale just run the above commands both with a scale of 1.0.)
  
==== Playback Settings ====
+
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
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.
 
 
 
==== Remote Control ====
 
===== Apple Remote =====
 
The standard keys work as expected:  Directional keys generate arrow keys, Play/Pause: Enter, Menu: Escape.  Holding down keys will generate alternate inputs:  Hold Play/Pause: P (play/pause playback), Hold Menu: M (Menu in playback), Hold Left/Right: Home/End.  The Apple Remote will not work properly on versions of Snow Leopard prior to 10.6.2 ({{Ticket|7112}}).
 
  
===== Other Infrared Remotes =====
+
''shell> ''defaults write net.psychosis.MythFrontend AppleDisplayScaleFactor 1.0
See [[Keyspan Express Remote]].
 
  
===== Bluetooth Control =====
 
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
 
  
===== 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
+
==== Playback Settings ====
 +
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.
  
 
==== MythGrowl Notifications ====
 
==== MythGrowl Notifications ====
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/
+
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 Tweaks for Underpowered Systems ====
To improve playback performance try new 'Use libmpeg2' setting (on the first page of Setup, Settings, TV Settings, Playback. Running TV playback in a smaller window can also improve performance,
+
Performance with interlaced 1080i video is significantly affected by the choice of deinterlacer. Builds preceding v0.24 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.
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)
 
  
 +
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.)
  
 +
==== Shutdown/Reboot ====
 +
Under General, enter the following to properly shutdown under OSX.  You might also have to "sudo chmod +s /sbin/halt /sbin/reboot" to be able to execute the command as a non-super user.
 +
* To Shutdown: /sbin/halt
 +
* To Reboot: /sbin/reboot
 +
Then add shutdown/Reboot to mythfrontend exit menu.
  
 +
==== Disable Bluetooth Keyboard setup ====
 +
When a keyboard and/or mouse isn't plugged in the Bluetooth setup wizard will be displayed.  To shut this off under OSX, go to settings->bluetooth->advanced, uncheck the keyboard wizard.
  
 +
==== Disable Mouse Cursor ====
 +
Hide mouse cursor option.  Select this to hide your mouse cursor.  Useful for headless (mouseless and keyboardless) setups.  If you don't enable this, your cursor will disappear only after moving the mouse. settings->appearance->Hide Mouse Cursor in Mythtv.
 +
 +
==== Auto Startup ====
 +
Start the mythfrontend app automatically upon login.  settings->users->login items
 +
 +
==== VNC Server ====
 +
Install an alternative VNC server if your VNC clients have trouble connecting to the built in one.  I use VineVNC server.
  
 
= For more information =
 
= For more information =
  
 
==== Mailing Lists ====
 
==== Mailing Lists ====
If you have problems with this guide, the [http://www.mythtv.org/mailman/listinfo/mythtv-users/ mythtv-users mailing list] is the best place to start. Check the [http://gossamer-threads.com/lists/mythtv/users/ searchable archive] to see if your problem has already been discussed. Also, you can check the [http://gossamer-threads.com/lists/mythtv/dev/ mythtv-dev list] to see if it's a problem with CVS; if you can't compile MythTV, you may just have to wait a few days and try again.
+
If you have problems with this guide, the [http://www.mythtv.org/mailman/listinfo/mythtv-users/ mythtv-users mailing list] is the best place to start. Check the [http://gossamer-threads.com/lists/mythtv/users/ searchable archive] to see if your problem has already been discussed. Also, you can check the [http://gossamer-threads.com/lists/mythtv/dev/ 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.
 
 
When posting to the -users list, mention this guide and put "OS X" in the subject line. If you don't do those two steps, your humble guide author ([[Jeremiah Morris]]) may miss or ignore your message.
 
  
 
==== External Links ====
 
==== External Links ====
[http://public.boonstra.org/MacMiniHTPCSetup.html Mac Mini frontend and backend]
+
*[http://public.boonstra.org/MacMiniHTPCSetup.html Mac Mini frontend and backend] Hardware and software setup guide
 
+
*[http://blog.myhdbox.com/2009/03/mythtv-on-mac-mini.html Mini usage report] Success report
[http://blog.myhdbox.com/2009/03/mythtv-on-mac-mini.html Mini usage report]
 
  
 
==== Wiki ====
 
==== Wiki ====
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.)
+
* 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 =  
 
= 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!
 
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!
  
 +
 +
[[Category:Distribution_Specific_Install_Guides]]
 
[[Category:MacOS]]
 
[[Category:MacOS]]
[[Category:Distribution_Specific_Install_Guides]]
 

Latest revision as of 00:50, 1 March 2021

New users: before attempting to install MythTV for the first time, please familiarize yourself with the distinction between frontend and backend.

MythTV works just fine on OSX (but see the backend gotchas below).

Hardware Requirements

Frontend

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.

Backend

The backend takes very little CPU power, except when marking commercials. Any Mac capable of running OSX 10.5 Leopard or later will work fine.

Pre-built Downloads

Version Status
Master/32 Developmental - Frontend Only
31-fixes Production - Frontend Only
0.30 Testing
0.29-fixes Testing
0.28 (recommended) Production
v0.28-pre-3649-gae35a28 (beta) Testing
0.27.4 Production
  • MythTV 0.27.4 complete frontend/backend systeml including MariaDB and MythWeb - (MacPorts-built installer). Includes fix for impending SchedulesDirect disruption.
0.27.3 Production
0.27 Production
0.26 Production
0.25 Unsupported
0.15 through 0.24 Old

Want to contribute builds? Read more at the Mac OSX Release Build Contributors Page.

Using MythFrontend

MythFrontend is a normal OSX app that has no special dependencies to run. Version 0.27 is officially supported on 10.8 and 10.9. Version 0.25 through 0.26 are compatible with 10.5 to 10.7. Older versions are compatible with versions of OSX from 10.3.x (Panther) through 10.6.x (Snow Leopard).

Warning.png
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. For v0.25 the frontend must be configured to use OpenGL. See here for instructions.

See the User Manual for more information on configuring the frontend.


Accessing MythWeb

To watch streamed video on MythWeb servers from OSX, you may have to alter the treatment of streaming files.

Installing MythTV Backend

The MythTV backend and its MySQL database run smoothly on OSX. 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 MySQL
  • Setting initial MySQL database and permissions


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. Either the 32-bit or 64-bit version is fine, except for Australian users running OSX 10.7 who will need 64-bit libraries to run shepherd for TV guide data.

For controlling the MySQL database server, you can choose one of the following options:

  1. Set up the database server without locking it to a user account by installing MySQLStartupItem.pkg. More information for the curious is here.
  2. Choose a user account responsible for running the database server, then install MySQL.prefPane for that account. You will almost certainly want to use System Preferences -> Accounts to make that account automatically login.

Server Startup

After installation, the MySQL server needs to be started.

  • Reboot and the server will start automatically if you used the Startup Item.
  • If you have installed MySQL.prefPane preference pane instead
    • Go into System Preferences and select MySQL in the Others category
    • Check Automatically Start MySQL on Startup
    • Click on the Start MySQL button.

Initial Database Setup

Open Terminal. Type in the following and press enter:

shell> cd /usr/local/mysql/bin/

Here, the 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 mysql> prompt.

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. One common invocation is

mysql> GRANT ALL PRIVILEGES ON mythconverg.* TO 'mythtv'@'192.168.1.0/255.255.255.0' IDENTIFIED BY "mythtv-password";;
mysql> GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO 'mythtv'@'192.168.1.0/255.255.255.0' IDENTIFIED BY "mythtv-password";
mysql> FLUSH PRIVILEGES;

See the MySQL manual if you need more information on permissions.

Finishing Backend Setup

Now download the backend (from one of the servers above).

Launch MythTV-Setup.app and go through the configuration steps.

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>--logpath</string>
		<string>/var/log/MythBackend</string>
	</array>
</dict>
</plist>

where we have assumed that MythBackend.app resides in a MythBackend subfolder of /Applications.

To have MythBackend run as a specific user, insert the following under </array>, substituting mythtv with the username of your choice.

<key>UserName</key>
<string>mythtv</string>

Also, don't forget to create and set the correct permissions for the log file

sudo touch /var/log/MythBackend
sudo chown mythtv /var/log/MythBackend

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.

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 the OSX-specific instructions.

Gotchas and Warnings

Limited Tuners

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.

HDPVRCapture on Mac describes how to use HDPVRCaputre to record on Mac OS X with a Hauppauge HDPVR.

Firewire Recording

If you build MythBackend yourself using MacPorts, Building Myth for Mac with MacPorts it is possible to enable firewire recording during compilation. This is known to work with mythtv.28-0.28.1-Fixes running on an Intel Mac Mini (late 2012) under Mac OS High Sierra (10.13.1) on a Motorola DCX 3400 M cable box.


If you are running an older pre-compiled version of MythBackend (as of mythtv 0.21-fixes-20090316) and 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.

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 MythBackend.

Log Files

By default, MythBackend and MythFrontend log to standard output (often /var/log/system.log).

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 /Applications/Utilities/.

MythFillDatabase sends messages both to the standard output and the standard error. You may like to similarly redirect that output.

MythTV_Setup.app Exit code 153 / Setup Timezone tables

If the MythTV_Setup.app from MythTV Backend goes through the connection to the MySQL server and then just aborts, verify you have the timezone information loaded into you MySQL installation. Follow the steps described in MySQL Time Zone Tables and it might help to get it working for you.

Tips and Tricks

Remote Control

Apple Remote

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.

Other Infrared Remotes

See Keyspan Express Remote.

iPhone/iTouch Control

Web-based remotes such as MyMote and others found here or here should in principle work fine with an iPhone and OSX setups. Some features of MyMote may require LIRC.

Android Control

The android app Mythmote can be used to control your mythtv frontend. Enable the Network control under Setup -> General -> Network Control.

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

Surround Sound in 7.1 Channels

To activate 7.1 audio (using either HDMI or DisplayPort); make sure to first launch the Audio MIDI Setup in /Application/Utilities and configure HDMI audio as 8 channels-24 bits (the default is just stereo). It is recommended to disable DTS and AC3 passthrough as it would reset the hdmi audio in two channels mode, which would break future multi-channels playback. Note that for the time being, E-AC3, TrueHD and DTS-HD MA bitstreaming do NOT work under MacOS. That's until Apple provide the required 192kHz digital sampling rate (the hardware supports it!).

GPU Acceleration

The frontend can accelerate H.264 video using the Video Decode Acceleration (VDA) GPU library, if available.

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


Playback Settings

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.

MythGrowl Notifications

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. Builds preceding v0.24 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.)

Shutdown/Reboot

Under General, enter the following to properly shutdown under OSX. You might also have to "sudo chmod +s /sbin/halt /sbin/reboot" to be able to execute the command as a non-super user.

  • To Shutdown: /sbin/halt
  • To Reboot: /sbin/reboot

Then add shutdown/Reboot to mythfrontend exit menu.

Disable Bluetooth Keyboard setup

When a keyboard and/or mouse isn't plugged in the Bluetooth setup wizard will be displayed. To shut this off under OSX, go to settings->bluetooth->advanced, uncheck the keyboard wizard.

Disable Mouse Cursor

Hide mouse cursor option. Select this to hide your mouse cursor. Useful for headless (mouseless and keyboardless) setups. If you don't enable this, your cursor will disappear only after moving the mouse. settings->appearance->Hide Mouse Cursor in Mythtv.

Auto Startup

Start the mythfrontend app automatically upon login. settings->users->login items

VNC Server

Install an alternative VNC server if your VNC clients have trouble connecting to the built in one. I use VineVNC server.

For more information

Mailing Lists

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.

External Links

Wiki

  • 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!