So what if you’d like to watch a recording from you MythTV system on your Android phone? Android phones have an onboard video decoder that will let them play h264 encoded videos (youtube) easily in whatever resolution the phone’s screen will allow. Basically you’ll need to re-encode the MythTV recordings into a suitable format The most direct option is to use ffmpeg to convert the videos for use on your phone. ffmpeg literally is the swiss army knife of multimedia in the F/OSS world. You can basically convert any video/audio file into any other format using a multitude of codecs. ffmpeg is a commandline tool that has a lot of flags that a noobie might be a little intimidated by. Here’s my ffmpeg command to re-encode videos for my Nexus One:
ffmpeg -i inputfile.mpg -aspect 16:9 -s 800x480 -vcodec libx264 -b 480k -r 13 -acodec libfaac -ab 128k -sameq -pass 1 -f rawvideo -an -y /dev/null && ffmpeg -i inputfile.mpg -aspect 16:9 -s 800x480 -vcodec libx264 -b 480k -r 13 -acodec libfaac -ab 128k -ac 2 -sameq -pass 2 outputfile.mp4
The above command will do a 2 pass encoding of the video file using the x264 encoder for video and faac for the audio. While more time consuming 2 pass encoding improves the quality of the video greatly. The videos tend to come out much smoother with little or no artifacts. I tested the above command with both hi-definition and standard definition recordings that were captured with my PVR-1212 and my HDHomerun capture devices. A one hour HD recording that was roughly 4.1 gig in size was re-encoded to a 332mb file that plays perfectly on my Nexus One in 800×480 resolution. I tried bumping up the video bitrate and frames per second rates. As a result the files were slightly larger and improvement in video quality was negligible. I also tested playing back my videos on a co-worker’s Verizon Droid phone and they all played back without issue. It should be easy to bump down the resolution to 320×480 and have the videos work on lower powered Android phones (G1, Mytouch3G, Hero, Eris, Backflip). I forwarded my settings to John Baab, the developer of MythExport. Hopefully we’ll soon have a default Android preset that will let you re-encode your MythTV recordings right from the menus in Mythbuntu. Good times.