Monthly Archives: January 2010

MythTV Install and Export to iPhone

My MythTV backend is now working the way I’d like it to.  I bought a HDHomerun off newegg for the 2 tuners that both handle ATSC and QAM and I like that it’s on the network.  I have an Ubuntu machine running Karmic that I wanted to put the Myth backend on.

The most awesome thing is that there is a MythTV package in apt.  So the install was simple.  Since I couldn’t remember the mysql root password (because how often do you add databases/tables?) I had to override password and set it to something I knew and clear and reinstall the MythTV database package.  With that done, setup was pretty straight forward:  finding the tuners, scanning channels, adding a schedulesdirect.com account ($20 per year for listings since zap2it won’t do that for free anymore).

The next part was exporting commercialless recordings into iPhone format.  There is a package (again through apt) called mythexport that claims to do this.  It handles jobs started from the Myth frontend pretty well, but required a lot of tweaking.  Using a web browser, go to localhost/mythexport and set up some initial settings for what you’re trying to do.  Any jobs created probably fail now and you’ll have to make some changes.  First add the medibuntu repository to apt and update the codecs to regain AAC audio if you’re running Karmic (apparently not a problem before).  The command to reencode the video is in /etc/mythtv/mythexport/mythexport_settings.cfg.  It’s the long line, you can’t miss it.  So change the mp3 library to libfaac.  Try exporting something, /var/log/mythtv/mythexport.log will not show you the exact errors, but will give you the command to run to try again if it did fail (it’s the command starting with “nice”).  Copy it out and try running it yourself with different arguments until it works.

My settings are currently (the  “-ac 2 -ar 48000” was important and I had to add it):

ffmpegArgs=-y -acodec libfaac -ab 128kb -vcodec mpeg4 -b 600kb -mbd 2
-flags +4mv+aic -trellis 2 -cmp 2 -subcmp 2 -s 480x320 -aspect 16:9
-ac 2 -ar 48000

And now it works!

Also note that mythexport adds an Apache2 directory to your configuration.  I had the Apache I got from apt configured as a public facing webserver so I had to lock down those directories with .htaccess files (iTunes will ask for the password when downloading videos in the podcast/rss feed so it’s really not too limiting to do BasicAuth).