Configuring HDTV

From MythTV Official Wiki
Revision as of 14:55, 10 May 2008 by Linearz (talk | contribs) (Impossible Stuff)

Jump to: navigation, search

HDTV Help Pages

Setting up MythTV to fully use HDTV can be rather complicated. There are different HDTV formats for North America and Europe. Parts of this information may apply to other countries that use HDTV as well.

For information on hardware used by users to play back HD content, please see (and update) HD Playback Reports.

Understanding HDTV

HDTV (High Definition Television) is sent as stream of binary data encoded in the radio spectrum. A digital tuner works much like a modem extracting the original digital data. Unlike analog television capture, where a hardware encoder is desirable, compression of High Definition material takes place at the provider. HD material is received as a digital stream and written directly to disk. In North America, HD material is transmitted in MPEG-2 format. In Europe, Australia, and other parts of the world using the DVB standard, some streams are available as MPEG-2, and others as h.264.

HDTV can be delivered via three mediums: Broadcast (Over the Air), Cable, and Satellite. The modulation for each is different, sometimes requiring different hardware.

MPEG-2 versus H.264

When agreeing upon standards for digital television, Europe and much of the rest of the world implemented the DVB standard, which permits broadcasters to use either MPEG-2 or H.264 codecs. In the United States, ATSC permits only MPEG-2 as the codec. Each format has its advantages. MPEG-2 is a well understood, established video format. Playback is not computationally demanding, and most modern dual-core (and many recent single core) systems can easily manage playback. H.264 is a newer standard, but improves upon MPEG-2 in several ways. H.264 can achieve identical quality to MPEG-2 at 60% of the bitrate. Accordingly, a full-channel-bitrate (17.89 Megabit/s) H.264 stream compared with an identical-bitrate MPEG-2 stream will look substantially better. This comes at a much higher computational expense. Playing 720p and 1080i H.264 streams (at full bitrate) can be difficult, even on recent systems. Playing 1080p H.264 can often be nightmarish for those unfamiliar with tweaking playback options.

Bitrate (Or, if you read nothing else, read this)

Uninformed users frequently make a point of asking whether their hardware is capable of "1080p playback." Similarly uninformed users reply that a given setup is "enough" or "not enough." In reality, resolution of the material is a relatively minor part of the playback equation. Users who get their 1080p material via bittorrent or other questionable means often think that because they are able to play back the file, their system is capable of playing back all 1080p material. This is seldom the case. Most pirated HD material has been transcoded to substantially lower bitrates, often cutting the file size/bitrate more than in half. At proportionately lower bitrates, processor requirements are also proportionately lower. In reality, a full-bitrate H.264 or MPEG-2 from a Blu-ray/HD-DVD Disk may be substantially more difficult or impossible to play back for the same machine. While "true" Blu-ray and HD-DVD material may be encoded up to 40 Megabits per second, television is broadcast in bitrates up to 17.89 Megabits per second, and many "1080p rips" found on the internet are transcoded below 10 Megabits per second. In effect, processor requirements for the "real thing" may be up to four times as high as the user expects.

Multiplexing and Transport Streams

Central to any discussion of HDTV reception is the notion of multiplexes. With the advent of digital television, broadcasters and cable companies are capable of tuning the resolution, bitrate, and packaging of their channels. A 6 Mhz Channel can accommodate 17.89 Megabits per second worth of data. Television providers are now free to carve the bandwidth of a single channel up into as many Transport Streams as they like. In short, one 17.89 Mbit/s channel can be simultaneously carrying multiple Transport Streams, each of which can have multiple audio tracks. Broadcasters now commonly "multiplex," or package, many standard definition channels in the space of a single 6 Mhz channel. In MythTV .21, it is possible to record any number of streams from a single multiplex, assuming the user is receiving television via ATSC or DVB. In effect, this enables the user to record multiple channels at once on a single tuner.

North America

Antenna HDTV broadcast

This is called OTA (Over-The-Air) ATSC. ATSC tuners capture the raw, compressed digital stream broadcast by the provider. Antenna Broadcasters sometimes include multiple subchannels, all of which are part of the same transport stream. In some areas, subchannels include encrypted pay channels.

HDTV on Cable

Its standard is called QAM ATSC. Many of the OTA Tuner cards like AirStar HD-5000 or PcHDTV work with Clear (unencrypted) QAM. It just takes a little bit more time and energy getting it to work. Verizon FIOS also uses QAM for its unencrypted channels.

Another popular option is FireWire capture of digital streams directly from a cable box. As with the ATSC tuners mentioned above, the CPU requirements for this capture method are minimal, as the backend machine is simply copying an MPEG-2 video stream to disk.

HDTV and Satellite TV

All channels off of Satellite are digital but not all of them are in HDTV Format. Most are Encrypted, but not all of them (For example LyngSat Free OTA).

Other Methods

There are other Methods of grabbing data from the above Sources. Fortunately, for cable and satellite some of the converter boxes include a firewire port where the raw MPEG data is sent. In theory, MythTV can record unencrypted channels from this port. At this time, this is something that a few people have experimented with, but it is not yet ready for general use.

In January 2008, Hauppauge Computer Works announced that they would be releasing a component capture device capable of on-the-fly H.264 hardware transcoding of material up to 15 Megabits per second at 1080i. When this device reaches the market and Linux drivers are available, it will become possible to record HD material from any device with a component output. While there will be a quality hit from the Digital->Analog->Digital conversion, the quality of the capture will still be substantially higher than any Standard Definition source.

Impossible Stuff

There is talk of being able to use a cable or satellite STB's RF output to capture HDTV sourced from cable or satellite. This CANNOT be done! Cable & satellite receivers for the home do not & cannot remodulate HDTV signals to ATSC/QAM. If channels are encrypted on cable/satellite - that's how they stay.


Europe uses DVB (Digital Video Broadcasting) for HDTV and digital standard definition video. The concepts of DVB transmission are identical to those of ATSC transmission. A stream is encoded and multiplexed at the television provider, and the user merely writes the stream to disk, preserving a perfect digital copy of the program.

DVB-C For Cable

Cards Exist

DVB-T For Terrestrial (Antenna)

Cards Exist

DVB-S For Satellite

Cards Exist


Several cards are now available for HD capture in Linux. The pcHDTV HD-2000, pcHDTV HD-3000, pcHDTV HD-5500, Air2PC, Technisat AirStar HD-5000, AVerTV HD A180, and ATI HDTV Wonder are just a few that have Linux drivers available. There is little reason to worry about the differences between the HD-2000, HD-3000 and HD-5500 cards, except that the HD-5500 is being sold, while the HD-2000, HD-3000 and the Air2PC have been discontinued. Each card has its own idiosyncrasies. Refer to individual card pages for further details.

A good guide to capture hardware that will work well in MythTV is the Linux TV wiki at

CPU requirements for HD recording at minimal because no encoding takes place. Playback of HD content is far more computationally intensive.

Playing HD Material

For information on hardware used by users to play back HD content, please see (and update) HD Playback Reports.


There are two ways to go about playing back HDTV. One is to rely on an XvMC capable video card with a slower CPU, the other is to use pure CPU processing (the developers are currently working on a third option, but this may not be available in the next release version). The XvMC route requires an NVIDIA graphics card and the equivalent of a around an AthlonXP 2000+ or better.

XvMC (X Video Motion Compensation) is a method of offloading some of the processing of MPEG-2 video onto the Graphics hardware. In marginal systems it can enable smooth video playback, but should be avoided when possible. XvMC does not accelerate H.264 material.


Most people use nVidia cards to play HDTV, although ATI cards are capable as well. AGP is a minimum as the PCI bus does not have the bandwidth for HDTV unless XvMC is used. Which is a fine option for those looking to make use of an older system, but due to the hassle it can be to getting it working well it is not really recommended.


The minimum recommended NVIDIA card is the FX 5200. Depending on the manufacturer/model, many have exhibited some odd display issues when playing video at 1920x1080(i or p) via DVI even when not using XvMC. Interestingly, underscanning by 3% in the horizontal direction within MythTV solves the FX 5200s problems.

Recently the market has shifted to the point where the GeForce 6xxx series has entered the sub $50US range. The GeForce 6200 does not exhibit these problems. The 6200TC is used by quite a few list members with excellent results.

NVIDIA has also recently released a line of integrated video GPU's numbered the 6100 and 6150. These are designed to be integrated as onboard video for motherboards such as the Asus M2N-MX, Asus M2NPV-VM, Asus A8N-VM CSM, Abit NF-M2 and DFI C51PV-M2/G. These chipsets use integrated RAM, much like the Turbo-Cache models which means they require system memory.

For HDTV use it is recommended to use the most recent drivers and enable the xorg.conf "UseEvents" option in the "Device" section:

Option     "UseEvents" "True"

After adding UseEvents, Xv Vsync needs to be enabled in the nvidia-settings application. This has proven to solve many "tearing" and other odd video issues people have experienced.

Additionally, it is worth noting that nVidia has made some changes to their driver to eliminate the need for customized Modelines for the popular formats (480i, 480p, 720p, 1080i, 1080p). Check out the ComponentOut wiki entry for more information. The settings listed on that page are no longer specific to Component Output, as they can be applied to HDMI interfaces as well (for those using DVI to HDMI connections). Display (television) manuals often provide specifications for this purpose.


The CPU requirements for playing HDTV are significant. While XvMC support (NVIDIA only) offloads some of the work to the video card, it is not recommended to design a new system around using XvMC since it can be a hassle to get working well.

Tip and Tricks

The actual minimum requirements are hard to pin down, as people have reported conflicting results. Relevant factors may include the bus speed, memory speed, CPU speed, kernel version, Linux distribution, and compiler version and optimizations.

  • Use two RAM DIMM's to allow for dual channel operation which can provide a significant boost in overall system speed.
  • When compiling MythTV from source, use the --enable-proc-opt configure option.

Ripped Media

Reencoded Rips

Legality aside, many re-encoded HD rips of BluRay, HD-DVD and TV shows have appeared on the internet. They are frequently transcoded to lower bitrates and resolutions, as well as having HD Audio formats stripped out and transcoded to AC3. These files are substantially easier to play on lesser hardware.

Real 1080p Rips

For more information on ripping and playing Blu-ray and HD-DVD disk formats, see High Definition Disk Formats.

Many users who believe their machine capable of HD-DVD or Blu-ray playback have only attempted to play transcoded rips which, as discussed above, often have their bitrates reduced by 50 to 75 percent.

Blu-ray and HD-DVD rips are, for feature only, generally between 17 GB and 35 GB, and up to 50 GB for the entire disc. The bitrate generally varies between approximately 20 Mbit and 40 Mbit. Most Blu-ray and HD-DVD discs now use E-AC3, mlp, or Dolby TrueHD as their only sound format. A few older discs have both the new formats and AC3 Tracks, but this is less and less common. Ffmpeg SVN was recently updated to support TrueHD/mlp. Support should appear soon in mplayer. E-AC3 patches are in line for inclusion in ffmpeg, and are available on the ffmpeg development list. The only way to play back the audio on new Blu-ray and HD-DVD rips currently is to patch mplayer.

Transcoding HDTV

HDTV recordings typically consume slightly under 9GB per hour.

As of 0.19 a "lossless" mpeg2 transcode has been implemented. This method is used for the default transcode. This method will allow the user to cut commercials without losing any of the HDTV quality as only the frames necesary to be reencoded to maintain proper playback will be encoded. For commercial cutting these frames are usually all black, with a possible station logo, and so no quality loss should be seen at all. This transcode also has the added benefit of audio sync correction similar to what ProjectX does, as well as converting the MPEG2 TS stream to a PS stream with up to a possible 20% savings in file size on top of any cuts made.

See also

Optimizing Performance