Myth Apple Trailers
From MythTV
Contents |
Description
Unofficial Add-on for MythTV to get Apple.com Movie Trailers
version: 0.4.3
Software Requirements
Requires PHP (4/5), Mplayer, w32codecs (to play quicktime)
- The new version has been updated to no longer depend on the php-xml libraries. I rewrote the rss feed grabber code to use all standard php functions. Tested and works with fedora with basic php support. I also tested it on centos with PHP 4.3.9 which works fine. submit any bug reports to : undertoe at chemlab dot org
Installation
Install php command line executable, mplayer, and windows 32bit codecs on (ubuntu). You might have to take a few extra steps, if w32codecs is not available on your system info can be found here.
sudo apt-get update && sudo apt-get install php5-cli mplayer w32codecs
Download the Myth Trailer Grabber in mythtv user dir
Note: NOTE: This guide assumes that your user is "mythtv", such as what is setup by MythDora; if you use a different user, replace the "/home/mythtv" with "/home/yourUserName"
cd /home/mythtv/
Option 1: If you want to ONLY stream the trailers from the apple website, use this script:
wget http://colt45.chemlab.org/misc_scripts/mythtrailer/0.4/mythappletrailer-0.04.3.tar tar -xvf mythappletrailer-0.04.3.tar cp mythappletrailer-0.04.3/myth_trailers_grabber ./
Option 2: If you want to be able to download the trailers every night to your local machine for faster playback, as well as have the option to stream directly, use this script:
wget http://creasonfamily.com/files/mythtv/mythappletrailer-0.04.2.tar.gz tar -zxf mythappletrailer-0.04.2.tar.gz cp mythappletrailer-0.04.2/myth_trailers_grabber ./
As mythtv user
touch /home/mythtv/appletrailer.xml
As root
sudo ln -s /home/mythtv/appletrailer.xml /usr/share/mythtv/appletrailer.xml
Add menu entry to the information section of MythTV theme xml file
sudo nano /usr/share/mythtv/info_menu.xml
the end of the file will look like this
</button> </mythmenu>
insert the following text before the </mythmenu>
<button>
<type>MOVIETIMES</type>
<text>Apple Trailers</text>
<action>MENU appletrailer.xml</action>
</button>
the end of the file result will now appear like this
</button>
<button>
<type>MOVIETIMES</type>
<text>Apple Trailers</text>
<action>MENU appletrailer.xml</action>
</button>
</mythmenu>
Add cron job as mythtv user once a night to download the new appletrailer.xml file Example: your paths may differ
crontab -e 0 2 * * * /usr/bin/php -q /home/mythtv/myth_trailers_grabber > /home/mythtv/appletrailer.xml
For the first time (before everything happens automatically) you should run the cron job to populate appletrailer.xml file by
/usr/bin/php -q /home/mythtv/myth_trailers_grabber > /home/mythtv/appletrailer.xml
Reload the frontend then go in to the Info Center > Apple Trailers. There you have it all the apple trailers.
- Note: Trailers could take a awhile to load if you're streaming them and not downloading, so after you click on the trailer in myth there maybe some delay depending on your internet connection speeds, size of trailer and amount you are pre-caching (if any).
Configuration (Optional)
nano /home/mythtv/myth_trailers_grabber
Edit options at top of file
Here is an enhanced mplayer command that drastically improved things for HD:
$player_exec_cmd= '/usr/bin/mplayer -fs -zoom -quiet -user-agent NSPlayer -cache-min 75 -cache 16384'; //mplayer command
and don't forget to rerun the cron after you change the config:
/usr/bin/php -q /home/mythtv/myth_trailers_grabber > /home/mythtv/appletrailer.xml
Screen shots
list of watchable movie trailers
Support
More support can be found here at the MythTalk.com community
MythTalk.com Apple Trailers Forum
Email undertoe at chemlab dot org with any questions or sugestions

