MythTV on Mac OS X
For MythTV on Mac OS X on Intel machines, see Myth on Mac x86. 0.19 Binary below.
0.19 build available at The Sniderpad.com
PPC and Intel builds of 0.19-fixes (20060407), 0.19, and 0.18.1 available at collectivity.goof.com
Daily Builds and Releases I hope this isn't too redundant, but I had been automating the daily build process and posting to my site when gkruse above had created his weekly builds. Anyhow, you now have a couple of locations to get Myth builds for Mac OSX. Currently I have the 0.18 and 0.18.1 builds as well as nightly SVN builds for the last few days. I am only doing builds with the plugins, no standalone TV only builds. If there is a problem with one of the builds, please let me know from my home page. http://www.thesniderpad.com. You can access the MythTV stuff from the downloads link.
Old binaries Janne Ornstedt was the first to package up a binary. If you have a 0.16 backend, here is a usable prebuilt OS X frontend for it: http://www.ornstedt.nu/mythtv-0.16-1.dmg . Nigel Pearson can also provide a 0.15 or 0.17 binary, if you really need one.
For a working IR remote, see Keyspan Express Remote.
Update (26-08-05, by Geoff Kruse) The osx-packager.pl script has been added to svn in the contrib directory a few weeks ago. Please submit any changes as a patch to trac. The current version has been hacked to work with svn.
Update (22-05-05, by Bas Hulsken) The CVS build script is rather outdated. For those interested, I updated the script by Jeremiah Morris a bit, to build a recent cvs version, with mythvideo, mythdvd, mythweather, mythgallery and myththemes enabled. You can find it at :  (beware, slow adsl link) It should be easy to modify this script to add/remove plugins (at lines 286->300). Caveat Emptor: I'm a crappy perl-coder, I just improvise based on my C++ knowledge.. the script works, but probably breaks all perl-coding guidelines;-)
Update (12-08-05, by Bas Hulsken) Above script updated to use SVN (), since this is the new CMS of myth. Also dependencies were updated to newest versions. Exif is disabled in mythgallery, since this won't compile for me (YMMV, try to enable it at line 306). Mythnews is also built now. You can build the 0.18.1-fixes release with './osx-packager -branch release-0-18-fixes'. Just running the script without options uses trunk (current version). I only tested with the 0.18-fixes, which compiles and runs fine on 10.3. But it probably should work for all. Obviously you need svn installed for this script to work (get a package somewhere, and make sure the svn binary is in /usr/bin or /usr/local/bin)
P.S. this script also supports LIRC, so you can compile lirc in slave mode on your mac (use no driver option) and connect to your backend server (set to listen mode). The backend should have, for instance, a RF remote. I'm having great succes with an ATI remote wonder.
server side (backend.mydomain.com): run lirc with: 'lircd --listen'
client side (mac): run lirc with: 'lircd --connect=backend.mydomain.com --permission=666'
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.
Note: this is a frontend only, not a complete MythTV installation. The backend portion of MythTV does not run on Mac OS X and won't be ported any time soon. To use the OS X version, you'll need a Linux machine running a recent CVS version of MythTV to act as a backend. If you've never installed MythTV, you should start with the Linux version, and only look at the OS X version once everything's working properly there.
If you just want to watch TV on your Mac, and you aren't planning to be a developer, you're better off using a prebuilt binary. For the DarwinPorts project, Jan Ornstedt has created an OS X binary based on MythTV 0.16. This will work fine with a 0.16 backend server on another machine.
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.
1. Install Panther
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. If you want to watch HDTV, you'll have to wait for future code optimizations.
If you're starting from scratch, install Mac OS X 10.3 (Panther) 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. 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.)
After turning off those unnecessary options, 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. At the time of this writing, the latest OS version is 10.3.6. Apply this update and restart when directed by Software Update.
Not all software updates can be installed in one step, so you should run Software Update again after installing updates. On my system, the update for QuickTime 6.5.2 appeared only after upgrading to 10.3.6. QuickTime is used for MythTV video, so I recommend updating that. Install any updates and restart; keep repeating this pattern until no updates remain.
2. Install OS X Developer Tools
You've got the latest and greatest OS, but the tools for compiling software are installed separately. Visit the 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 "Xcode Tools 1.5" 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.
3. 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.From a new Terminal window, start by setting up some useful environment variables in your profile. Create a
.bash_profilein your favorite text editor:
vi .bash_profileAdd the following to the new file and save it:
export SRCDIR=$HOME/src export QTDIR=$SRCDIR/qt-mac-free-3.3.3 export DYLD_LIBRARY_PATH=/usr/local/lib:$QTDIR/lib export PATH=$PATH:/usr/local/bin:$QTDIR/binNext, load these variables into your current session, and create
SRCDIRwhere you'll be downloading and compiling.
. .bash_profile mkdir $SRCDIR cd $SRCDIROptional: 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
DYLD_LIBRARY_PATHenvironment variable for the graphical environment. (Your
.bash_profileonly affects what you do in Terminal.) To enable this, create the file
mkdir ~/.MacOSX vi ~/.MacOSX/environment.plistAdd the following to the new file:
<?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"> <plist version="1.0"> <dict> <key>DYLD_LIBRARY_PATH</key> <string>/usr/local/lib:/Users/username/src/qt-mac-free-3.3.3/lib</string> </dict> </plist>
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.
4. Free TypeFree Type is the first of several dependencies you will have to install for MythTV. First download and unpack the source code:
curl http://download.savannah.gnu.org/releases/freetype/freetype-2.1.10.tar.gz | tar -xz cd freetype-2.1.10Next, 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.
./configure --disable-static make LDFLAGS="-no-undefined -Wl,-prebind,-seg1addr,0xC0000000 -lz" sudo make install
sudo asks for a password, enter your Mac login password. You'll get used to doing this a lot over the course of this guide.
SRCDIRin preparation for the next step.
Freetype can also be installed via Fink or Portage OS X. See Fink And Portage for more information.
5. LAMEThe process here is the same as Free Type, so I won't repeat the same explanations. Just use these commands:
curl http://superb-west.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz | tar -xz cd lame-3.97 ./configure --disable-static --disable-frontend make LDFLAGS="-no-undefined -Wl,-prebind,-seg1addr,0xC1000000" sudo make install cd ..
LAME can also be installed via Fink or Portage OS X. See Fink And Portage for more information.
Note: mysql-4.1.11.tar.gz has been removed from their server. Try mysql-4.1.20.tar.gzAgain, 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.
curl http://mysql.mirrors.pair.com/Downloads/MySQL-4.1/mysql-4.1.20.tar.gz | tar -zx cd mysql-4.1.20 ./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 ..
curl http://sunsite.rediris.es/mirror/Qt/source/qt-mac-free-3.3.3.tar.gz | tar -xz cd qt-mac-free-3.3.3
Make sure you update Quicktime completely, including the Quicktime SDK, using Software Update.Next, configure the installation. Qt takes a long time to build, so we turn off everything that's not absolutely necessary. One note: 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
-no-style-blahflags and try out other styles on your system.
./configure -system-zlib -fast -qt-sql-mysql \ -no-style-cde -no-style-compact -no-style-mac \ -no-style-motif -no-style-motifplus -no-style-platinum \ -no-style-sgi -thread -no-ipv6 -qt-imgfmt-png \ -qt-imgfmt-jpeg -no-imgfmt-mng -no-tablet \ -I/usr/local/include/mysql \ -L/usr/local/lib/mysql
The configure step takes a while, but don't go get that cup of coffee right away; you will have to accept the GNU Gneral Public License before it gets going. Type
yes when it prompts you, then you can take a break.
-single-moduleflag to build correctly with our MySQL installation; the first line adds this to the compile instructions. We only build the
sub-srctarget, 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.
echo 'QMAKE_LFLAGS_SHLIB += -single_module' >> src/qt.pro make sub-srcWe're now finished with Qt, and with all of the dependencies in fact.
Alternatively to compiling Qt yourself, you can grab a precompiled package from http://naranja.umh.es/~atg/
8. Backend SetupMake sure you set your backend to listen on some other IP address than 127.0.0.1 (which is the default). Run
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.
9. MythTVFinally, we're ready for MythTV itself. Download the main MythTV source:
svn co http://svn.mythtv.org/svn/branches/release-0-19-fixes/mythtvNow 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:
cd mythtv sudo ./configure qmake mythtv.pro make sudo make install
If you're missing qmake, return to the qt-mac-free-3.3.5 directory from the previous installation and install it from there:
cd ../qt-mac-free-3.3.5 cd qmake sudo make installYou 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:
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.When you update to the latest CVS, you should do a clean rebuild to prevent problems:
make distclean cvs -z6 update -dP ./configure qmake mythtv.pro make sudo make install
10. Tips and Tricks
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.
Some of the MythTV plugins, like mythmusic, do not work in OS X. Mythvideo and mythweather are known to work at this time. To use the plugins, you have to compile and install them separately. Plugins are frontend features, installing them on the backend will not enable them on your frontend OS X box.
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
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
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, 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)
11. Installing Plugins
Here is how:
Grab the sources (cvs for official mythtv plugins, or from the website for other plugins) then run qmake (./configure first if needed)
Edit the Makefile (not the one in the main folder but the one in the subfolder with the same name) and add
-flat_namespace -undefined suppress to the LFLAGS variable
run sudo make install
12. 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 CVS; 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.
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!