Configuring HDTV

From MythTV Official Wiki
Revision as of 03:30, 22 September 2007 by Tanthrix (talk | contribs) (ATI)

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.

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. The digital TV data is sent as MPEG-2, so if you can get the raw data, the compression is already done for you.

HDTV comes in three flavors: Broadcast, Cable, and Satellite. The encoding for each is different, sometimes requiring different hardware.

North America

Antenna HDTV broadcast

This is called OTA (Over-The-Air) ATSC. You can get a tuner card that will extract the raw transport stream for a given channel. 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.

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.

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.

Much fuss has been made over a HDMI capture card which has recently (as of May 2007) become available. This is also a non-starter for many reasons, #1 being that there are no linux drivers for the card and even if there were, MJPEG capture of HDTV (which is all the card does) would require an enormous amount of HDD space (and by proxy, network bandwidth for remote frontends!). Then there's HDCP...

Europe

Europe uses DVB (Digital Video Broadcasting) for HDTV and digital standard definition video.

DVB-C For Cable

Cards Exist

DVB-T For Terrestrial (Antenna)

Cards Exist

DVB-S For Satellite

Cards Exist

Recording HDTV

As discussed above, OTA ATSC and Clear QAM ATSC HDTV can be recorded at this time.

Hardware

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 (there are reported reliability problems with the 3000 though, so get a 5500 if you have a choice).

Here is a listing of ATSC cards supported in Linux and their capabilities: http://linuxtv.org/wiki/index.php/ATSC_devices.

The CPU requirements are quite minimal for recording because it's simply a matter of copying the transport stream from the card to the hard drive. I believe that people have reported success with less than 1GHz processors. While Playback is a completely different story.

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 video stream to disk.

Drivers

The drivers are a bit temperamental; it can take some effort to get them to work correctly.

FIXME: Explain the different drivers, kernel versions, and such.

Playing HDTV

Hardware

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.

Video

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.

One common thread here will be fan-less. Video card fans are notoriously loud, and since they are not needed for HDTV playback, purchasing a fan-less card will help lower the overall noise level of your MythTV computer.

NVIDIA

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, so if you choose one of these solutions you will probably want to spring for 512MB or more RAM.

It should also be mentioned here that for HDTV use it is recommended to use the 9xxx series drivers with the xorg.conf "UseEvents" option,

Option     "UseEvents" "True"

and enabling Xv Vsync in the nvidia-settings application. This has proven to solve many "tearing" and other odd video issues people have experienced. This driver also seems to use a bit less CPU than the old 8xxx series.

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). Be sure to check your display (television set) manual to see what it supports and how.

ATI

The minimum recommended ATI card is the Radeon 9600, which is also fanless, found for about $60. Generally though, users are advised to avoid ATI entirely due to poor driver support compared to nvidia.

CPU

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.

The minimum CPU requirement for broadcast HDTV playback (720p or 1080i) with de-interlacing is a CPU such as an Athlon64 3200+ or Pentium 2.8 Ghz, either Pentium D 820 or Pentium 4. Since the Athlon64 line is much cheaper many people end up purchasing an Athlon.

This though, is only really the minimum for playback, and as a standalone frontend the Athlon64 3200+ is more than capable. If you look to run a combined frontend and backend, which most new users do, it is highly suggested to spring for a dual core such as an Athlon64 x2 or Intel Core 2 Duo. This will provide enough processing power for the combined duties of the backend processes (mythbackend, mysql, software raid, commercial flagging, etc) and software based playback of 1080i with deinterlacing.

Now that HD-DVD and BluRay has arrived offering 1080p content, the minimum cpu requirements have increased again. The minimum Intel CPU for displaying 1080p video (without XvMC) is ????????. The minimum AMD CPU for displaying 1080p is ?????????. (If someone knows these for sure, please update this page! I have an AMD 64 X2 3800+ and it cannot play 1080p. Considering 1080p has 2.25 more pixels than 720p, you would need an AMD X2 5600+, but this needs to be confirmed). It should also be noted that the typical codec used for ripped HD-DVD and BluRay content is x264, which cannot take advantage of XvMC in Xine, MPlayer or VLC, so you may need to rely solely on your CPU without hardware acceleration.

Caveat Emptor

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.

  • It is generally advised to go with two RAM DIMM's to allow for dual channel operation which can provide a significant boost in overall system speed.
  • It is also wise to go with a newer kernel (2.6.16 or better, a minimum of 2.6.18 for those wishing to use firewire), preferably one compiled for your specific processor, or at a minimum an i686 kernel.
  • When compiling MythTV from source it is also imperative to use the --enable-proc-opt configure option!
  • Some recent experimentation seems to indicate that the most common hardware bottleneck in P4-based frontend systems is memory bandwidth.

Software

If you have an nVidia video card, you may want to try XvMC along with nVidia's proprietary drivers. If you have an ATI card, be sure to use their proprietary "fglrx" drivers, and XvMC will not be available.

FIXME: Discuss setting up MythTV, including adjusting the minimum signal strength.

Transcoding HDTV

HDTV recordings typically consume slightly under 9GB per hour. Unless you have tons of storage, this will restrict you to a fairly small number of recordings unless you transcode.

As of 0.19 a "lossless" mpeg2 transcode has been implemented. This method is used for the default transcode. This method will allow you 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.

FIXME: I haven't figured out how to do this yet. The editor function works to set a cutlist, but there is no option to set up a transcoding profile specifically for HDTV recordings. I suspect that further development effort is required before MythTV can transcode HDTV. Several people have reported on the mailing lists methods of using external programs for transcoding.

mencoder works well for xvid encoding. I've got a script that will take any 30min or 1hr show and convert it to what "the scene" terms an HR HDTV encode. It automatically uses the correct IVTC/frame removal filters and properly sizes the output files which I can post here if there is interest. I'm also thinking of looking into a modification to the script that would convert the file using the same input Q for output encoding with the IVTC/frame removal filters which should result in a good deal of space savings while maintaining the proper HDTV quality.--Steve Adeff 17:29, 17 May 2006 (UTC)
Steve, I think that there's lots of people out here that would be interested in that script. Would you mind posting it somewhere?
It's now on my userpage.

FIXME: There should be a discussion of the alternatives for keeping the original sound stream. How much space does a full surround sound stream take per hour? If you don't have a surround sound setup, you might as well convert to stereo; is there a way to preserve the original stereo stream only?

AC3 for HDTV is usually 384Kb/s and for a 1 hour show (approx 44mins) comes out to something along the lines of 120MB. This can be cut further down in transcoding but the space savings is ill worth the time and possible quality loss.--Steve Adeff 17:29, 17 May 2006 (UTC)

See also

Optimizing Performance