From MythTV Book
Published version: Introduction
This chapter is a published version, which means it can only be changed by editors. If you find an error, or want to expand this chapter, then please do that by editing IntroductionBeta. If you have questions, please contact the editors.
This book is about an open source personal video recorder (PVR) software suite called MythTV. This book presents you with a set of projects we implemented in our own living rooms with MythTV, the theory behind those projects, and the steps needed to make those projects happen. The hope is that this will provide a firm basis for your own MythTV projects, while still being practical enough to be an interesting read.
This book started life as a traditional paper book, which is still available on Amazon.com. However, since the publication of that book a new version of MythTV has been released, and it is time to update the book. Instead of a traditional publication, we have instead decided to put the book online in wiki form as an experiment.
This book does not aim to be a complete reference to MythTV or a guide for how to develop plug-in modules for MythTV. Although we include a brief overview of the major features of MythTV, we explore only those parts of MythTV that are relevant to the projects in this book, which will include all the parts of MythTV that an average user will be interested in. It will also give you an excellent grounding for further projects with MythTV as well. This book is intended as a hobbyist’s project guide, providing suggestions about what sort of projects you could take on and how we went about implementing our own versions of those projects.
Instead of including exhaustive coverage of features that few people use, we’ll provide pointers to how to find out about those features, and we’ll cover the 80 percent of MythTV’s functionality that everyone will find useful. That way, this book will be genuinely useful to people setting up MythTV, instead of being a boring reference manual.
We discuss the projects we undertook using the components we selected. Where appropriate, we explain the alternatives available at the time of writing, why we chose the paths we did, whether we think that in hindsight these were the right decisions to make, and how to complete the projects using the same decisions we made. You are free to choose different components for your MythTV system, but it is impractical for us to document every possible combination of every possible component. We do provide as many pointers as possible to further information as we discuss particular points, and it is our intention to add future information to the book’s website when appropriate.
Defining What Personal Video Recorders Are
This book discusses a PVR suite called MythTV. A PVR -- also sometimes referred to as a digital video recorder (DVR) -- is a computer system that allows you to easily specify which TV shows you want recorded and then makes sure the recording occurs without further human intervention. These computer systems are often referred to as home-theater PCs, although there doesn’t need to be any inherent difference between a regular personal computer and one of these systems, as you will see in later chapters when we show how to build one from scratch. The underlying concept is, of course, that you never need to worry about recording the shows you like to watch -- you can just come home from a hard day at the office or at school, and the computer will have a bunch of shows ready for you to watch.
|Methods of Installing MythTV|
We cover two methods of installing MythTV in this book. First off we show you how to install MythTV using MythBuntu in The Easy Way: Installing MythBuntu. MythBuntu is a specialized form of the popular Ubuntu Linux distribution designed to make running MythTV as easy as possible. We also show you how to build your own MythTV installation "from scratch" using a standard install of Ubuntu in The Hard Way: Installing MythTV From Source.Building your own MythTV software is a lot more work than using MythBuntu, but in return you get a lot more control over the software installed. The instructions for installing for Ubuntu should also map to other Linux distributions if you don't want to use an Ubuntu derivative. Finally, if you intend to do development on MythTV itself, you will eventually have to build your own MythTV installation from scratch.
The concept of a living room computer pre-recording television for your later viewing is often referred to as time shifting because you’re shifting the time at which you watch the shows. A good PVR suite quickly becomes more than just that, though. Once you have a system to record all the shows you want recorded, then why not use that system to ensure that your favorite podcasts are available when you want them? Or to provide access to your music collection, online photo albums, and so forth? A PVR project can quickly become a hub for all the entertainment in your home, and although you might not expect that outcome when you start your own MythTV implementation, ending up with a full-convergence system isn’t bad.
The projects in this book will cover how to construct a PVR using MythTV and then explore some of the other cool projects you can implement to turn that MythTV PVR into the hub of your living-room entertainment. Many other projects are possible as well, but the ones in this book will give you a good grounding.
MythTV isn’t the only way to get a PVR into your living room, although it is one of the most flexible alternatives. We discuss other options in the “What PVR Systems Are Available?” section later in this Chapter. It should be fairly obvious from this short definition why people want PVR technology -- it takes a bunch of the manual steps out of your entertainment lifestyle and therefore leaves you with more time for other activities. It also reduces the odds that you’ll miss some TV that you just must see.
Understanding the Components of a PVR System
Now that we’ve convinced you that you want a PVR system, we’ll describe the components of such a system. These components are standard between the various vendors for PVR solutions, although the exact implementation will vary. Figure 1 shows these elements.
You can see from Figure 1 that a PVR system has a number of independent functional units that all interact to produce the final result. On the TV-capture side of the equation, a guide data system downloads the list of which networks are showing which shows and at which time from somewhere on the Internet (sometimes supplemented by a guide broadcast over the air). This system then populates the program database, which the scheduler uses to decide which shows to record and at which time. The backend then instructs the tuner card to tune to the right station to receive a given show and then saves the video and audio data from the tuner into a file on disk. Also, the backend maintains database entries so it knows what shows you like, when to record them, and what shows it has already recorded.
One advantage of having a centrally scheduled system is that the scheduler can determine the best order for shows to be recorded. For example, if you have only one tuner and there are two shows that should be recorded at the same time, then it can look at its guide data for the future, determine whether one of those shows is repeated later, and therefore resolve the conflict by scheduling that show to be recorded on its repeat airing. The scheduler also knows which shows form a series, and it is trivial from the PVR user interface to ask for an entire series to be recorded. Finally, if you have more than one tuner, then the scheduler can take full advantage of that to capture more than one show at once and therefore have more shows available for you to watch at any given time. A good PVR backend will also ensure that shows you’ve already seen aren’t rerecorded unless you want them to be.
The other half of a PVR system is the frontend. This provides the user interface, including helping you look through program guides to determine what to record, displaying videos to you once they have been recorded, accepting infrared (IR) commands from the remote control to control that playback, and so forth. Many MythTV users utilize the computer monitor as a playback device, which is a perfectly acceptable solution in many cases, especially with many LCD and plasma TVs now having VGA or DVI inputs. Chapter 2 will show how to use the TV card to send the playback to a standard TV instead if that suits your needs better. Some PVR systems’ frontends also do additional processing, such as changing the aspect ratio of the video being played back, pausing live TV as well as recorded TV, and automatically skipping through advertising. All of these features are available in MythTV, and we will discuss them as we come upon them.
What PVR Systems Are Available?
A PVR system needs several hardware components to be practical. You need a reasonably fast CPU (or embedded video hardware, although that is an approach more common on commercial “appliance” PVRs), plenty of storage, and video input and output hardware. All of these components were outside the price range acceptable to most home users until the 1990s. When the hardware became available to build PVR systems, the number of PVR systems available exploded as hobbyists around the world saw the possibilities available to them.
We don’t intend the following sections to be an exhaustive coverage of all these systems, but we will give you a brief overview of the most popular competitors in this space so you can make an informed decision. It might be that for some reason MythTV isn’t the right solution for you and you’re better off with an alternative.
Some of first entrants into the PVR space were hobbyists who wanted to be able to record shows when they weren’t home and wanted to be able to easily fast-forward through the advertising that is so common on TV these days. These “home-grown” PVRs are built on top of standard PC hardware, although all of them are available in prebuilt forms as well.
MythTV is the PVR system that is the focus of this book; all of the projects described are directly applicable to MythTV, and although other PVR systems might have equivalent functionality, the instructions in this book won’t apply to them. MythTV is open source, released under the GNU General Public License, which means the source code that the programmers wrote to implement MythTV is freely available and that you as a user have the right to modify that code to suit your own needs (although you are asked to release your changes to the community and are actually required to release those changes if you distribute your modified version).
The big advantage of open source software for projects like the ones in this book is that extensibility is the killer application for your living room—having a system that is tightly integrated into your various digital entertainment systems and that is customized for your own use is very attractive to a large number of people. The ability to build your own system is also appealing to hobbyists, because it matches their own intentions.
We won’t say anymore about MythTV here because we cover it much more extensively throughout the book.
SageTV is one of several applications that you can run on your existing Windows or Linux PC to turn it into a PVR. SageTV is commercial software that, at the time of this writing, costs just less than $100. One advantage of packaged systems such as SageTV is that you get an application that is ready to go as soon as you install it. In fact, SageTV also sells hardware that is certified to work with its system. On the other hand, prepackaged systems are less extensible than open solutions and are quite expensive compared to some of the dedicated hardware or free PVR options.
Windows Media Center
Microsoft is a relatively late entrant into the PVR market with its “Media Center Editions” of Windows XP and Windows Vista. If you want a solution that is based on Windows, then you might want to consider a Windows Media Center installation. This used to be sold as a separate product called "Windows Media Center Edition", although the functionality is also included in the newer "Windows Vista".
One advantage of a Microsoft Windows–based solution if you’re already using Microsoft Windows is that you can continue to run the other Windows software that you are used to using. However, it’s probably unlikely you’ll want to use the computer in your living room as a desktop machine, because it’s going to be plugged into a TV, and that means other people won’t be able to use your living room for entertainment. Then again, if you’re building your PVR for another room such as a bedroom or you are space, power, or cash-constrained, then this might be an attractive alternative.
Additionally, at the time of this writing, Microsoft doesn’t sell the Media Center version of Windows directly to the public; you have to buy a new machine with it pre-installed. If it’s not pre-installed, this means you can’t use an existing computer for your PVR project. Additionally, the hardware you can buy pre-installed with Windows Media Center Edition is generally more expensive than regular PC hardware, and you don’t have as many options. An example is the popular Mini-ITX system that many people use because the system’s near silence makes it a perfect choice for the living room—many retailers don’t stock these systems pre-installed with Windows Media Center.
Yahoo! Go (formerly Meedio)
Yahoo! acquired the Meedio PVR product in April 2006 and has released it as a free PVR application for Windows computers called Yahoo Go! Confusingly, since then Go! has become a suite of mobile services, which still happens to include a PVR suite. You can find out more information about Yahoo Go! TV at Yahoo!'s site. Although we haven’t used Yahoo! Go, we suspect this is a better option if you’re after a simple-to-implement PVR system and were otherwise considering SageTV or Microsoft Windows Media Center Edition. This is especially true because Yahoo! Go is free, so if you do want to upgrade to something else later, it’s not as painful. Remember, though, that Yahoo! Go is closed source, so you won’t be able to extend it in the ways we demonstrate in this book.
|Yahoo Go! Download Restrictions|
Yahoo restricts Yahoo Go! TV to US customers, and the software only works on Microsoft Windows. This might mean that it's not the right choice for you.
It’s possible that building your own PVR system isn’t attractive to you for some reason. A number of commercial PVR systems are now available for purchase. These systems are generally not as configurable or as extensible as the hobbyist systems, but they are simple to implement and often initially cheaper than building your own system (especially if you consider the amount of time it takes to set up your own PVR system).
TiVo was the first manufacturer of a commercial PVR system. TiVo looks similar to a DVD player, and in fact some models have a DVD writer built in (see Figure 2). Because it is a commercial system, as long as you do what TiVo expects you to do with the device, then it will "just work". Specifically, the following requirements apply to TiVos:
- You have to be using your TiVo box in the United States to get full TiVo functionality. TiVo by default can download TV guide information only from the TiVo site, which supports only the United States at this time. TiVo has attempted to break into the U.K. and Japanese markets but no longer sells devices in those places. TiVo has recently announced a product for the Australian market however. If you’re outside of the United States, you can use your TiVo box if you have NTSC video available, but you’ll have to set everything up as manual recordings.
- For the longest time your video input had to be either SVideo or U.S. analog cable. Digital cable tuners were not available, and if you live in a PAL or SECAM country, then you’re out of luck. TiVo finally released a digital cable–capable TiVo Series3 in mid-2006. See the "NTSC, PAL, and SECAM" sidebar for more information about NTSC, PAL, and SECAM.
- You have to be happy with the size of the hard disk on the device. TiVo does not provide hard disk upgrade options, although you can buy a whole new TiVo with a bigger disk. It is possible to perform after-market upgrades, but they will void your TiVo warranty.
- You have to pay for an ongoing service contract to get guide data, and TiVo will upgrade your device to the latest version of the operating system remotely. There have been examples of upgrades that have arguably reduced the amount of functionality available on the device and upset users. For example, TiVo has recently been working on displaying advertising on TiVo machines and limiting the length of time you can keep a recording.
If you’re willing to modify your TiVo box, then these requirements aren’t as much of a problem. One of us, for example, was quite happily using TiVo in Australia for quite some time. This TiVo needed a specially tweaked operating system installation to be able to download Australian guide data, a different TV tuner installed (which involved soldering, and so forth), and didn’t receive support from TiVo because of the modifications needed. For more information about getting TiVo working in Australia, check out Australian TiVo community site.
|NTSC, PAL, AND SECAM|
The pictures displayed by your analog TV are encoded when transmitted on the cabling used by your various entertainment devices. These encodings are also often used to distinguish the actual media such as video cassettes and DVDs as well, although this is not a strictly accurate description of what is occurring. Refer to the “PAL” Wikipedia page listed in this sidebar for more information about this. Unfortunately, three competing encodings exist, which makes it much harder to use audiovisual equipment and media from other countries. The three competing standards are as follows:
Your cable or direct broadcast satellite (DBS) satellite company probably also provides a PVR option. It’s hard to comment on these generically, because they vary a lot. We have found with the several we have used that they are very expensive, have limited storage, or delete shows after a short period of time, even if you haven’t watched the show. Your shows will also become inaccessible if you cancel (or fail to pay the bill for) your cable service, and it’s usually impossible to get the programs off the unit except by hooking it up to a VCR. Be careful of these factors if you are considering using a PVR provided by your cable company. If you already own one of these and want a MythTV machine as well, then you’ll need to look into Apple FireWire access for your model of set-top box or look into some combination of video cabling and IR blasting.
Why Use MythTV?
This book discusses MythTV, mainly because it’s an open source package that is therefore extensible and well suited to the projects covered in this book. It’s also free, which makes it attractive, although you should always factor in the cost of the hardware and your time to implement the system when comparing it as an option to a commercial solution.
MythTV also integrates with the DVD player in both your living-room PC and your Microsoft Xbox, if you have one. It plays your MP3 collection and videos from sources other than TV (for example, AVI files and videos from personal video cameras), displays photos from your photo collection, gives you access to weather updates for your ZIP code, and displays news updates using RSS syndication technology. MythTV will even help you manage your movie queue with Netflix.
MythTV also has a versatile plug-in system, which makes it easy for developers to implement their own functionality, and has a relatively simple XML-based system for defining themes if you want a custom user interface. Then again, the default theme is pretty nice. Figure 3 shows what the front screen of a custom MythTV installation looks like.
MythTV runs on standard PC hardware. The only piece of slightly nonstandard hardware you need is a TV capture card, and these are quite common now. Chapter 2 discusses how to select the hardware for your MythTV installation and walks you through the process of setting up the system.
About Open Source version numbers
Throughout this book the version numbers for software products might appear very low if you’ve come from a Microsoft Windows–based world. For example, MythTV is only at version 0.21 at the time of this writing. However, this is because the number style for many open source applications starts at zero. For example, 0.21 commonly means that this is the 21th public release of an open source application, which means it’s quite mature.
Generally, the first number will be incremented when a major change affects compatibility or, if from 0 to 1, when the author thinks the program is both feature complete and sufficiently well tested to be considered a 1.0 release—some prominent and useful open source programs have never reached version 1.0 (and some, like the MAME game emulator, explicitly never will).
This chapter introduced the concept of a PVR, gave an overview of how a PVR system works, and then discussed some of the PVR options available today. Next we discussed why this book focuses on MythTV. You’re now ready to move on and build a MythTV system. In the next chapter, we'll discuss Selecting Hardware for your MythTV system.