Almost running MythTV backend on Bubba Two
Posted: 29 Mar 2009, 05:39
Disclaimer: I am no great Linux expert and this howto does some hacks to get around apt package conflicts. It also involves the compilation of about a million lines of code on Bubba Two. So if you break anything in the process, don't blame me.
This howto explains how I almost got the MythTV backend running on a Bubba Two. The one remaining problem I have is that mythbackend has to be configured using mythtv-setup which is a graphical program. I have not been able to get that to work. If someone has some ideas, I would be grateful to hear about it. The bottom of this post describes what I have already tried. Before installing MythTV, you may want to check out the howto on using DVB-T to get a TV signal to use with MythTV: http://forum.excito.net/viewtopic.php?t=1665. This howto does not explain how to set up MythTV in general, which can be a jungle in itself.
There are two main challenges to getting MythTV to run (apart from setting up mythtbackend). The first is apt package conflicts and the second is that the Freescale processor in Bubba Two does not have the Altivec instruction set extension. Because of these two issues, we need to compile the transcode and the mythtv packages.
You may wish to install the screen program or use nohup for the compilations so they keep running even though you log out from the Bubba Two.
Ok, let us get started. First, make a user called mythtv with the Bubba interface.
Do the following as root.
Make a group called mythtv:
Don't skip these step as the deb package needs the mythtv user and group.
When building, we will use fakeroot, so install it:
Insert these two lines in /etc/apt/sources.list:
Then run:
MythTV needs a bunch of packages, so run:
(takes about 5 minutes)
We also need the quilt package, but it conflicts with the debhelper package. So rather than using apt-get to get it, we download it:
It depends on a couple of other packages that we install:
We now force the installation of quilt:
As a non-root user (e.g. as mythtv) get the mythtv source:
We need to disable the Altivec instructions, so find this in the mythtv-0.21/debian/rules file:
Edit the last line to:
We are now ready to build. But beware that MythTV has about 870,000 lines of code including header files. So the build will take a long time. Thus, you may wish to use nohup or screen now. Run this from the mythtv-0.21 directory:
Follow the output for a while to see that everything is going well:
When the compiling starts you can just stop tail and log out.
After about 11 hours, come back and you may have a deb package ready, otherwise check the above output log.
We can now run:
Then we should be rid of conflicts again.
But we are not done yet. MythTV depends on the transcode package, but again due to conflicts and Altivec issues, we need to compile it. (Since you probably don't want to transcode on Bubba Two anyway, you may be able to remove the dependency in the MythTV debian/control file and skip the following. I have not tried that.)
This package depends on libavcodeccvs51-dev, libpostproccvs51-dev, and libavutilcvs49-dev. But they conflict with libavcodec51 and libavutil49. We will fix that.
First, we get the packages that transcode depends on and that we have not already installed when making mythtv:
As a non-root user (e.g. as mythtv) we then get the source:
The dependencies are found in the file transcode-1.0.2/debian/control. We edit that file, removing the string "cvs" (found in three places). This removes the conflicts.
We then edit the transcode-1.0.2/debian/rules file. Remove this line:
This disables Altivec intructions.
Finally, it seems that there is an error in the file transcode-1.0.2/export/aud_aux.c. These two lines:
Should be replaced with:
We are now ready to build:
The transcode package "only" has 185,000 lines of code so building takes about an hour. Again, it might be a good idea to watch the translog.txt file until compilation begins, to make sure everything is right.
When the deb packages are ready, we can now install mythtv-backend, starting with the dependencies:
You probably also want some documentation:
Now that MythTV is installed, we need to run mythtv-setup. This is where my problems really start. When I first installed MythTV, the following worked fairly well. After I made a clean install of Bubba to make this howto, it doesn't work any more. The idea is to get X access to Bubba. Find this line in /etc/ssh/sshd_config:
Change the "no" to "yes". Due to the packages we have already installed, that is all we need. Restart ssh:
You can now log in to bubba while allowing X forwarding:
To check that it works, try running xeyes.
After logging in using "ssh -X", you can start mythtv-setup on bubba. After a little while, this will show a gray user interface. After another four minutes of waiting, a large icon resembling some sort of tool will appear. Unfortunately, the menu is missing. It is actually active, but just not shown. It has these entries:
You choose by using the up/down arrows and press enter to select. Do this while not being able to see what you are doing and you will get to the different setups. On my first install, the setup menus worked fine. On my second (present) install, all text is missing from all menus.
For MythtTV to work, the time zones has to be identical. The problem is that local time is 23 seconds off on Bubba due to some leap second issue. Go to this thread: http://forum.excito.net/viewtopic.php?t=1664, and check if you have the problem. If you do, fix it as Peter suggests.
If you get MythTV setup working, you probably want to de-select any kind of transcoding on bubba. If you need transcoding, you might consider using another computer as slave backend.
I have not been able to get the png previews of recordings to work. For me that is no big loss, though.
I also had a problem setting up the DVB-T channels. I tried a few different ways with some crashes, but found that if you create a transport for the appropriate frequency and then scan using that transport, it works. If your country is available in the menu that might also be worth a try (mine is not available).
So regarding the mythtv-setup issues, I have tried the following with ssh -X:
My next idea was to use vnc to connect, but I could not figure out how to do that. If someone is familiar with vnc, a howto would be most welcome.
When I made my first install, I got through the setup and then MythTV worked apart from the time difference issue which I now know how to fix. So I believe that the only remaining issue is the setup.
I must say I don't understand why you have to use a graphical program to configure mythbackend.
Anyway, if anyone has some suggestions, please let me know.
This howto explains how I almost got the MythTV backend running on a Bubba Two. The one remaining problem I have is that mythbackend has to be configured using mythtv-setup which is a graphical program. I have not been able to get that to work. If someone has some ideas, I would be grateful to hear about it. The bottom of this post describes what I have already tried. Before installing MythTV, you may want to check out the howto on using DVB-T to get a TV signal to use with MythTV: http://forum.excito.net/viewtopic.php?t=1665. This howto does not explain how to set up MythTV in general, which can be a jungle in itself.
There are two main challenges to getting MythTV to run (apart from setting up mythtbackend). The first is apt package conflicts and the second is that the Freescale processor in Bubba Two does not have the Altivec instruction set extension. Because of these two issues, we need to compile the transcode and the mythtv packages.
You may wish to install the screen program or use nohup for the compilations so they keep running even though you log out from the Bubba Two.
Ok, let us get started. First, make a user called mythtv with the Bubba interface.
Do the following as root.
Make a group called mythtv:
Code: Select all
addgroup mythtv
When building, we will use fakeroot, so install it:
Code: Select all
apt-get install fakeroot
Code: Select all
deb http://debian.three-dimensional.net/debian-multimedia/ etch main
deb-src http://debian.three-dimensional.net/debian-multimedia/ etch main
Code: Select all
apt-get update
gpg --keyserver keyring.debian.org --recv 07DC563D1F41B907
gpg -a --export 07DC563D1F41B907 | apt-key add -
apt-get update
Code: Select all
apt-get install debhelper libqt3-mt-dev libdvb-dev liblame-dev libmysqlclient15-dev libfreetype6-dev libavc1394-dev libvorbis-dev liblircclient-dev libartsc0-dev libasound2-dev libxinerama-dev libdts-dev libiec61883-dev libxxf86vm-dev po-debconf libxvmc-dev libdvdnav-dev libimlib2-dev libxext-dev libjack0.100.0-dev texi2html ccache linux-kernel-headers libgl1-mesa-swx11-dev fftw3-dev python-support libx264-dev liba52-0.7.4-dev libxvidcore4-dev libfaad-dev libfaac-dev xserver-xorg-video-via libfribidi-dev libqt3-mt-mysql pwgen
We also need the quilt package, but it conflicts with the debhelper package. So rather than using apt-get to get it, we download it:
Code: Select all
wget http://ftp.fi.debian.org/debian/pool/main/q/quilt/quilt_0.45-6_all.deb
Code: Select all
apt-get install diffstat gawk
Code: Select all
dpkg -i --force-conflicts quilt_0.45-6_all.deb
Code: Select all
apt-get source mythtv
Code: Select all
CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" ./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 $(CONFIGURE_OPTS) \
--enable-opengl-vsync --with-bindings=perl --compile-type=profile \
--enable-libfaad --enable-libfaac --enable-libmp3lame --enable-liba52 \
--enable-libx264 --enable-libxvid --enable-libfftw3 --enable-pthreads
Code: Select all
--enable-libx264 --enable-libxvid --enable-libfftw3 --enable-pthreads --disable-altivec
Code: Select all
nohup dpkg-buildpackage -rfakeroot -uc -us -b -d &> mythlog.txt &
Code: Select all
tail -f mythlog.txt
After about 11 hours, come back and you may have a deb package ready, otherwise check the above output log.
We can now run:
Code: Select all
apt-get remove quilt
But we are not done yet. MythTV depends on the transcode package, but again due to conflicts and Altivec issues, we need to compile it. (Since you probably don't want to transcode on Bubba Two anyway, you may be able to remove the dependency in the MythTV debian/control file and skip the following. I have not tried that.)
This package depends on libavcodeccvs51-dev, libpostproccvs51-dev, and libavutilcvs49-dev. But they conflict with libavcodec51 and libavutil49. We will fix that.
First, we get the packages that transcode depends on and that we have not already installed when making mythtv:
Code: Select all
apt-get install libmjpegtools-dev libquicktime-dev libgtk1.2-dev libxml2-dev libdv4-dev libdvdread-dev pvm-dev libpopt-dev libxft-dev libxaw7-dev libmpeg2-4-dev libsdl1.2-dev libtheora-dev nasm liblzo-dev libmagick9-dev dpatch libjpeg-dev libfame-dev libxv-dev autotools-dev libavcodec-dev libpostproc-dev libavutil-dev xterm
Code: Select all
apt-get source transcode
We then edit the transcode-1.0.2/debian/rules file. Remove this line:
Code: Select all
CFLAGS += -Wa,-maltivec
Finally, it seems that there is an error in the file transcode-1.0.2/export/aud_aux.c. These two lines:
Code: Select all
register_avcodec(&ac3_encoder);
register_avcodec(&mp2_encoder);
Code: Select all
avcodec_regisiter_all();
Code: Select all
nohup dpkg-buildpackage -rfakeroot -uc -us -b -d &> translog.txt &
When the deb packages are ready, we can now install mythtv-backend, starting with the dependencies:
Code: Select all
dpkg -i transcode_1.0.2-0.12_powerpc.deb
dpkg -i libmyth-0.21_0.21-0.11etch1_powerpc.deb
dpkg -i mythtv-common_0.21-0.11etch1_all.deb
dpkg -i mythtv-backend_0.21-0.11etch1_powerpc.deb
dpkg -i mythtv-database_0.21-0.11etch1_all.deb
Code: Select all
dpkg -i transcode-doc_1.0.2-0.12_all.deb
dpkg -i mythtv-doc_0.21-0.11etch1_all.deb
Code: Select all
X11Forwarding no
Code: Select all
/etc/init.d/ssh restart
Code: Select all
ssh -X username
After logging in using "ssh -X", you can start mythtv-setup on bubba. After a little while, this will show a gray user interface. After another four minutes of waiting, a large icon resembling some sort of tool will appear. Unfortunately, the menu is missing. It is actually active, but just not shown. It has these entries:
Code: Select all
1. General
2. Capture cards
3. Video sources
4. Input connections
5. Channel editor
6. Storage directories
For MythtTV to work, the time zones has to be identical. The problem is that local time is 23 seconds off on Bubba due to some leap second issue. Go to this thread: http://forum.excito.net/viewtopic.php?t=1664, and check if you have the problem. If you do, fix it as Peter suggests.
If you get MythTV setup working, you probably want to de-select any kind of transcoding on bubba. If you need transcoding, you might consider using another computer as slave backend.
I have not been able to get the png previews of recordings to work. For me that is no big loss, though.
I also had a problem setting up the DVB-T channels. I tried a few different ways with some crashes, but found that if you create a transport for the appropriate frequency and then scan using that transport, it works. If your country is available in the menu that might also be worth a try (mine is not available).
So regarding the mythtv-setup issues, I have tried the following with ssh -X:
- Tried different themes (presumably with different fonts)
Installed msttcorefonts
removed the --enable-opengl-vsync option from the configuration
My next idea was to use vnc to connect, but I could not figure out how to do that. If someone is familiar with vnc, a howto would be most welcome.
When I made my first install, I got through the setup and then MythTV worked apart from the time difference issue which I now know how to fix. So I believe that the only remaining issue is the setup.
I must say I don't understand why you have to use a graphical program to configure mythbackend.
Anyway, if anyone has some suggestions, please let me know.