Jul 16, 2007

Separating the MythTV Frontend from the Backend

The services of MythTV are divided into two major groups; the frontend and the backend. The frontend is the GUI that one sees when you are watching the content and choosing what to watch. The frontend has themes that change the look of the interface. The frontend also renders the video that is displayed which is not insignificant when it comes to high definition content. Some MythTV plug-ins are also a part of the frontend that extend functionality such as browsing weather or playing music. On the other side the MythTV backend is the brains behind the scenes. It interfaces with the MySQL database and the capture cards to schedule and record the content. The backend sends the data that the frontend displays and provides the schedule information that it has received from the selected data services company. See Zap2it article

The frontend and the backend typically run on the same computer in most setups I have seen and used. This makes the setup straight forward. MythTV has an excellent network code that allows the very efficient communication between the frontend and backend even on separate computers. This is put to the test with high definition content with a very high bit-rate but performs admirably on wired gigabit ethernet. I know what you are thinking with wi-fi but this is too much bandwidth for A/B/G wireless LAN when it comes to HD. Standard definition does work with my wireless. There are reasons and advantages to separating the frontend from the backend. The most obvious reason is to divide and conquer the tasks. Commercial flagging and compression to Xvid on the backend will not make your HD content playback choppy if they are on different computers.

In my case I wanted to have a central server that was located in my office running the backend. This was most convenient for my cable drops in my house and it allowed me to use this computer as my main office computer as it was the most up to date computer. I wanted to watch the MythTV in my office so I also put a frontend on it but I also wanted to watch the content on my main TV in the living room. I made a frontend computer with relatively good components that were as silent as possible. I used an overclocked AMD FX-55 with an Artic Cooling CPU fan that was very quiet. I used a Nvidia 7600GS video card that was passively cooled for no noise. I used the bare minimum of hard drive capacity because nothing was recorded on this computer. I used an off brand case with large 120 mm fans to be as silent and efficient as possible. Finally I put a creative sound blaster Audigy sound card to have good sound. One other thing I did was to not plug in any of the blue LED's that would flash and turn on with the case because I did not want the distraction of these watching TV. The simple power on / off LED was all I needed to see. I could make all of these decisions based on the specialized function of the computer being a frontend only. One thing this really helped with was cable clutter. I could have a single power cord, audio cable, network cable, and video cable coming out of the frontend computer which helped make the system look very clean. No coax from the wall and splitters opon splitters to the multiple tuners etc.

Setup
The preparation for separating the frontend from the backend is making the MySQL database that MythTV uses accessible to the LAN.

sudo nano /etc/mysql/my.cnf

You need to comment out the bind-address line like so:

#bind-address = 127.0.0.1

Then you can restart your computer so that this new parameter is passed into the MySQL database as it initializes.

The frontend box is just a base install of Ubuntu 7.04 that has been fully updated. Instead of installing Mythtv from the application manager you search for mythtv-frontend. When you install this package all of the packages needed for just the frontend are installed.

2 comments:

Scott Carlson said...

This should no longer be necessary with Ubunutu 7.10. During configuration, you just specify that remote clients are used and it does the right thing.

jark said...

I noticed this when I upgraded recently. You are absolutely correct.