It's my place to write things down for you

Stream video to your iPhone or iPad – on demand

Having recently got an iPhone and an iPad (yeah lucky me), one of my desires has been to view my MythTV recordings on the device, wirelessly at home if I wanted to and when I wanted to.

The problem is that most video recordings that MythTV make are huge, and others that you may have downloaded are in various formats of AVI, mpeg and whatever.

Traditionally the method is to use Handbrake, which re-encodes a video file in a nice neat iPhone (or other) format ready to drag into iTunes and Sync (upload) onto the unit so you can watch it later. This is great if you want to put something there to watch on the train or bus or on a plane… but requires planning, preparation and time to do this.

If you want to see something that you recorded on your TV-PC decoder system (like MythTV) last night while still in bed on a Sunday morning then that’s an issue.

Now just to cover a technical point, MythTV records big mpg videos and there are more than 4 solutions I tried such as;

  • MythTV – The Web Server
    Delivers streaming content to PC’s but this uses flash which does not work on iPhones and is pretty low res.
  • MythExport supposedly re-encodes recordings and puts them into an RSS feed
    Problem: still need to sync with iTunes to view
    Problem: the re-encoding doesn’t work, at least in Lucid MythBuntu
    Problem: even if it did work I have networking/sync/iTunes issues with it
  • MythPodcaster does a similar thing above, but live
    Problem: Resides in a Tomcat (other) web server
    Problem: Doesn’t work, unable to get all components installed on Lucid Mythbuntu

Air Video Hello AirVideo, an application I recently and eventually found to do this and it works.

The product works in two parts, the viewer (residing on your iPhone or iPad) and a server, ready and running to deliver and re-encode your movies and recordings on demand.

I first got the server and put it on my work desktop machine, it runs as a service and allows you to ‘point’ it to a directory on your drive where your video files are and can watch them.

This is available in both Mac and Windows and it could not have been simpler.

Second part is the AirVideo iPhone or iPad application or Viewer.

There is a free trial version on iTunes, or the full version for $3.99 AU. (iTunes links)

So, my first try was on my work pc, I downloaded and ran the server, easy, installed the iPad app and then in this added a reference to my server, the network IP address of my desktop pc. Then over my work network it connected to the server, showed all the movies in that directory and allowed me to watch them.

This takes a bit of processing power and may slow your desktop pc down a bit when you do this but it was all just too easy. The resulting quality and speed however was great.

Now onto MythTV. This uses the linux operating system and can be quite fun and a challenge to get running. I have talked about this before.

The issue is that, if Air Viewer Server is only for Mac or Windows, how to use it on this platform?

The answer is here, a basic guide for installing this application using ‘wine’, a windows emulator for unix and have it run on your mythtv system.

Two things I would add to that are…

  1. Do this on a terminal window on the box itself. Do not just telnet to the system and try it because the install needs a GUI interface while it pretends to be a windows system.
  2. After step 2 of this guide, you also need to install Bonjour from apple.

Step 2.5:
wget http://support.apple.com/downloads/DL999/en_US/BonjourPSSetup.exe
wine ./BonjourPSSetup.exe

And it works, AirVideo server is running on my Myth box, I can stream and view any recordings or stored video files at will to my iPad.

The one last thing I am looking at is the filenames. Those created in Myth are date/channel/time/length based and not informative of the actual recording. There is a script I am going to try that is intended to produce a list of nicely titled links referring to the videos which should make finding the recordings much nicer… but for another time.

I hope you enjoy and find this helpful.

Edit/Addition

To make this all a little nicer, listing the programs by name rather than the Myth id format would be helpful and this is how I have done it.

On the myth system I now use a perl script called mythlink.pl which makes symbolic links to the recordings.

I made a new directory in my files, next to recordings called airvideo and did chown to the mythtv:mythtv user and chmod to 775
copy /usr/share/doc/mythtv-backend/contrib/user_jobs/mythlink.pl to /usr/bin
mythlink.pl –link /..(location)/mythtv/airvideo
(note, that’s a [double] dash dash link)

Set the airvideo server to the new airvideo directory location instead of recordings

To make this happen regularly I put this script in a crontab so it runs every 30 minutes keeping them updated regularly.

Airvideo can stream and convert on the fly, this works ok but I have found its hard to skip and sometimes drops out when trying this on an iPhone, on an iPad it seems to work better.

Airvideo allows you to pre-convert files allowing much better playback. This is done in the client and on my machine (a fairly nice AMD 64) a 1.1Gb recording (of 40 minutes) was converted to a 188Mb m4v in under 10 minutes.

Having the nicely named program links in a seperate airvideo directory also means the converted files are located and managed there.

Good luck :-)

  • Anon

    You ROCK! Thanks!! Just what I was looking for

  • Denis

    Have you tried Azul Media Player? While it doesn’t stream the videos – it does allow you to download them (via MythWeb) and store them on the iPad/iPhone memory, so you can watch them offline – no transcoding required. This is exactly what I wanted, so I can watch recorded shows on the iPad on the way to and from work. Very cool.

  • Five Fingers Shoes

    I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.Five Fingers Shoes

  • Daniel

    With BuzzPlayer app you can play/stream the recordings directly from the fileshare of the mythtv-box.