New Zealand Freeview|HD running on XBMC from Myth TV

UPDATE (20-Aug-2009): The bulk of the patch has now been committed to XBMC in revision 22285. A few extra goodies added to the patch now. Might cause some conflicts once these are committed, but that might not be for a week or more.

UPDATE (18-Aug-2009): A recent update of ffmpeg in XBMC (revision 21993 on 04-Aug-2009) meant that the original patch and instructions no longer worked. The instructions below have been updated and a new patch released. Much of the original patch is now directly in XBMC Media Center due to the ffmpeg update so it is much smaller.

Well, here those instructions are. Luckily there isn’t as much voodoo magic as there used to be. There will be even less voodoo once some of my other patches make it into XBMC proper, and Paul Kendall’s patches for LATM encapsulated AAC decoding finally wiggle their way into ffmpeg.

These instructions assume:

You already have Myth TV working as expected with the digital terrestrial Freeview|HD broadcast. Getting this working isn’t covered here. Go to Myth TVNZ as a starting point or join the mythtvnz mailing list for more information.

You have seen the light and are using Linux and not Windoze

You have a level of confidence with Linux

You are happy to compile XBMC Media Center from source code (and have some concept of what compiling is)

You have a smoking fast CPU. A dual core 3.0GHz or faster CPU is needed or an nVidia video card / chipset that supports VDPAU. Decoding 1080i H264 content from TV3 is super CPU intensive or needs to be offloaded to the GPU.

Change to a directory where the XBMC source code will be downloaded to (a new directory called XBMC will be created after this step).

Download the XBMC Media Center source code from SourceForge using subversion. This will create a directory called XBMC that contains the source code for the linuxport version of XBMC. This step will take a while as all the source code downloads.$ svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC XBMC

Once finished, change to the new XBMC directory.$ cd XBMC

Install build / compile dependencies. Follow the instructions in the README.linux file to obtain all the build dependencies.

Remove pulse audio (optional) I strongly recommend removing pulse audio as ALSA audio works fine. I had nothing but problems trying to get pulse audio to work. The step below is optional but strongly recommended:$ sudo aptitude remove libpulse-dev

Install libfaad$ sudo aptitude install libfaad-dev

Download the latest Freeview|HD patch file to the XBMC directory.$ wget http://s3.teirney.net/xbmc/freeview-hd-linuxport-r22286.patchThe remaining areas from the original Freeview|HD patch have been removed pending further testing of the mpegts seek handling improvements added directly to the XBMC source tree. The updates to mpegts file handing to continue playing after seeking if there is a timestamp discontinuity within the mpegts container have also been removed pending further testing with the seeking changes directly in XBMC. The Freeview|HD patch used to bundle the patches attached to ffmpeg issues 1128 and 452. You can apply these patches from ffmpeg directly if you have any problems with playback stopping when trying to seek (let me know here if you do as well). The remaining patches in the original Freeview|HD patch have already been committed to XBMC or will be committed shortly. Below are some of the goodies. If you have any conflicts with future updates, revert the file that conflicts.

Correct frame rate detection for 1080i TV3 so the commercial breaks are automatically skipped in the correct place (if flagged correctly by mythcommflag)

Tweaks to reduce the amount of time it takes to start playing MythTV files - this will depend on your MythTV configuration, but helps immensely for me with a Nova T 500.

Another tweak to help better determine if something is a movie if using the movie length HACK, which I don’t think I’ve documented yet.

Revert any existing Freeview|HD patches. Any existing Freeview|HD patches need to be reverted prior to applying this new patch (in fact any existing patches wouldn’t have worked after the big ffmpeg update in XBMC). This step is only needed if you have installed a previous Freeview|HD patch.$ svn revert -R .$ make distclean

Install the NEW Freeview|HD patch.$ patch -p0

Configure the XBMC source tree enabling external libfaad support. This will take some time (~5 minutes). External libfaad support is needed to decode the HE-AAC content and turns on the LATM handling.$ ./configure --enable-external-libfaad

Make XBMC. This will take longer (~15 minutes).$ make

Install XBMC$ sudo make install

Hopefully that’s all gone smoothly. Now you should be able to follow the instructions on the XBMC wiki for Myth TV to get the out-of-the-box Myth TV integration in XBMC up and running.

Any problems, kudos, whatever. Leave a comment.

This entry was posted
on Monday, June 8th, 2009 at 11:44 pm and is filed under MythTV, Tips and Tricks, XBMC Media Center.
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.

It is recorded shows I’m having issues with seeking in. I haven’t tried seeking with livetv (just checked that it worked in xbmc) since we usually watch livetv with the tv’s built in freeview.
I don’t think it’s related to that ticket as I haven’t had playback stop when I try to seek, though that did used to happen to me. Now seeking seems to pause the video for half a second before resuming from the same place, no skip at all, or sometimes it will return to the start of the recording instead.