MythTV and NZ Freeview|HD

In NZ, our freeview|HD platform is DVB-T based. We use MPEG4-AVC (commonly known as H.264) for video and our audio is contained in stream id 0×11 and which means it is LATM wrapped AAC.The main problem here is that ffmpeg, the library used for audio and video in MythTV, does not support LATM wrapped AAC.

I have also patched ffmpeg to provide a new codec which does LATM wrapped AAC and also makes changes to the mpegts and mpeg containers so that the 0×11 stream is sent to my codec.

The LATM AAC patch for ffmpeg is available as a standalone patch that can be used by other projects, such as mplayer or handbrake. ffmpeg-latm.patch (243)

MythTV comes with a revision of ffmpeg that is over 2000 revisions old, so I have ported (and keep up-to-date) the current ffmpeg trunk in my MythTV tree.

There is an Ubuntu repository of my builds of MythTV at the following locations. You can get the modified source from there too. The apt entries are shown below.

deb http://ppa.launchpad.net/paul-kcbbs/ubuntu hardy main
deb-src http://ppa.launchpad.net/paul-kcbbs/ubuntu hardy main

If you wish to build your own from my modified sources, don’t forget to apply the patches in the diff.gz file as these contain Ron Frazier’s patches and the doubled recording length patch.

For those not on Ubuntu, you can download the *.orig.tar.gz file and the *.diff.gz files from the repository using a browser (look in the pool directory).

Here is the configure line that I use

./configure --prefix=/usr --enable-lirc --enable-audio-alsa \
            --enable-audio-oss --enable-audio-jack --enable-audio-arts --enable-dvb \
            --enable-ivtv --enable-firewire --enable-joystick-menu \
            --enable-opengl-vsync --with-bindings=perl --enable-opengl-video \
            --enable-ffmpeg-pthreads \
            --compile-type=release \
            --cpu=pentium4 --enable-mmx --enable-xvmc --enable-xvmc-vld --enable-xvmc-pro \
            --enable-glx-procaddrarb \
            --enable-libfaad --enable-libfaac --enable-libmp3lame \
            --enable-libx264 --enable-libxvid --enable-libfftw3