Difference between revisions of "Configuring HDTV"

From MythTV Official Wiki
Jump to: navigation, search
(Real 1080p Rips)
(Native HDMI Capture: added note on IPTV Encoder capture of HDMI)
 
(73 intermediate revisions by 15 users not shown)
Line 1: Line 1:
= HDTV Help Pages =
+
There are different HDTV formats for North America and Europe.  Parts of this information may apply to other countries that use HDTV as well.
  
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 =
+
== 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 (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 comes in three flavors:  Broadcast, Cable, and Satellite.  The encoding for each is different, sometimes requiring different hardware.
+
HDTV can be delivered via three mediums:  Broadcast (Over the Air), Cable, and Satellite.  The modulation for each is different, sometimes requiring different hardware.
  
== North America ==
+
=== 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) ===
  
=== Antenna HDTV broadcast ===
+
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.  
This is called OTA (Over-The-Air) [[ATSC]]. You can get a tuner card that will extract the raw transport stream for a given channelAntenna 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 ===  
+
In some cases, a lower bitrate file may actually be more difficult to play.  This is generally due to inexperienced transcoders using options that purport to retain higher quality at lower bitrate, as well as neglecting to utilize sliced encoding. In reality, the quality retained by processor intensive encoding options is relatively small. The larger problem for linux playback is the failure to encode in so-called "slices," which render linux systems (currently) incapable of multithreading the playbackThis means that a multiple core system cannot be used to fullest effect, and that playback must instead rely on the raw clock speed of a single core.
Its standard is called [[QAM]] ATSC. Many of the OTA Tuner cards like AirStar HD-5000 or PcHDTV work with Clear (unencrypted) QAMIt 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 ===
+
=== Multiplexing and Transport Streams ===
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 [http://www.lyngsat.com/freetv/United-States.html LyngSat Free OTA]).
 
  
=== Other Methods ===
+
Central to any discussion of digital reception is the notion of multiplexesWith 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 channelIn current versions on MythTV, it is possible to record any number of streams from a single multiplex, assuming the user is receiving television via ATSC, QAM, or DVB.  In effect, this enables the user to record multiple channels at once on a single tuner.
There are other Methods of grabbing data from the above SourcesFortunately, 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 portAt this time, this is something that a few people have experimented with, but it is not yet ready for general use.
 
  
=== Impossible Stuff ===
+
== North America ==
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 availableThis 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...
+
=== Antenna HDTV broadcast ===
 +
This is called OTA (Over-The-Air), or [[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 streamIn some areas, subchannels include encrypted pay channels.
  
== Europe ==
+
=== [[Recording_Digital_Cable|HDTV on Cable]] ===
Europe uses [[DVB]] (Digital Video Broadcasting) for HDTV and digital standard definition video.
+
The standard is called [[QAM]] or "ClearQAM." 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.
  
=== DVB-C For Cable ===
+
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.
Cards Exist
 
  
=== DVB-T For Terrestrial (Antenna) ===
+
Another option is to use a digital tuner like the [[Silicondust HDHomeRun Prime]] that can utilize [[CableCARD]].  This will allow you to record shows that are not copy protected. These "copy freely" shows may be encrypted and inaccessible to a standard QAM tuner, but will be decrypted and made available through the HDHomeRun Prime.
Cards Exist
 
  
=== DVB-S For Satellite ===
+
=== HDTV and Satellite TV ===
Cards Exist
+
All channels from Satellite sources are digital but not all of them are in HDTV Format.
 +
Most are Encrypted, but not all of them (For example [http://www.lyngsat.com/freetv/United-States.html LyngSat Free OTA]).
  
= Recording HDTV =
+
=== Firewire capture ===
 +
Some cable and satellite boxes include a firewire port from which raw MPEG-2 streams can be captured.  MythTV can record unencrypted channels from this port. 
  
As discussed above, OTA ATSC and Clear QAM ATSC HDTV can be recorded at this time.
+
=== Component Capture ===
 +
In January 2008, Hauppauge Computer Works announced the [[Hauppauge HD-PVR]], a component capture device capable of on-the-fly H.264 hardware transcoding of material up to 15 Megabits per second at 1080i.  The [[Hauppauge HD-PVR | HD-PVR]] makes it possible to record HD material from any device with a component output.  While there is a quality hit from the Digital->Analog->Digital conversion, the quality of the capture is still substantially higher than any Standard Definition source.  See the [[Hauppauge HD-PVR]] page for more information.
  
== Hardware ==
+
=== Native HDMI Capture ===
  
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).  If you get the HD-5500 card, you will need to disable the embedded cx88-alsa sound portion of the cards to make audio work properly; add cx88-alsa to /etc/modprobe.d/blacklist.
+
Several options exist in Windows to capture HDCP-free HDMI signals. No Linux drivers are available for any of these cards as they rely on DirectShow filters for compression, and the native compression is a poor, proprietary codec. Until the hurdles with the current capture cards are overcome, current methods of HDMI capture are limited for MythTV.
  
Here is a listing of ATSC cards supported in Linux and their capabilities: http://linuxtv.org/wiki/index.php/ATSC_Devices.
+
Capturing HDMI in Mythtv is possible through the use of IPTV encoders ( https://www.mythtv.org/wiki/IPTV_Encoders_as_a_Capture_Device ). There are limitations to these devices and they are not inexpensive, but they do work with the latest versions ( 0.28 + ).
  
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 driveI believe that people have reported success with less than 1GHz processors. While Playback is a completely different story.
+
=== Impossible Stuff ===
 +
There is talk of being able to use an [[RF]] output from a cable or satellite [[STB]] to capture [[HDTV]] sources originating from those sources. This '''CANNOT''' be done! Cable and satellite receivers for the home do not, and cannot re-modulate the HDTV signals to [[ATSC]]/[[QAM]]If the channels are encrypted on cable or satellite, that's how they will stay.
  
Another popular option is [[FireWire]] capture of digital streams directly from a cable boxAs 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.
+
== Europe ==
 +
Europe uses [[DVB]] (Digital Video Broadcasting) for HDTV and digital standard definition video.  The concepts of DVB transmission are identical to those of ATSC transmissionA 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.  
  
== Drivers ==
+
=== [[DVB-C]] For Cable ===
  
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.
+
=== [[DVB-T]] For Terrestrial (Antenna) ===
  
= Playing HDTV =
 
  
== Hardware ==
+
=== [[DVB-S]]/[[DVB-S2]] For Satellite ===
  
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 ===
+
== Hardware ==
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.
+
A good guide to capture hardware that will work well in MythTV is the Linux TV wiki at http://www.linuxtv.org/wiki/index.php/Main_Page.
  
==== NVIDIA ====
+
CPU requirements for HD recording at minimal because no encoding takes place. Playback of HD content is far more computationally intensive.
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.
+
== Playing HD Material ==
  
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.
+
For information on hardware used by users to play back HD content, please see (and update) [[HD Playback Reports]]. [[VDPAU]] may also be relevant to your needs, for offloading decode of difficult to play material.
  
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,
+
=== Hardware ===
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 [http://www.mythtv.org/wiki/index.php/ComponentOut 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.
+
There are two ways to go about playing back HDTV. One is to rely on an [[VDPAU]] 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).  
  
==== ATI ====
+
==== Video ====
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.
+
AGP is a minimum requirement as the PCI bus does not have the bandwidth for HDTV unless VDPAU (Video Decode and Presentation API for Unix) is used. This is a fine option for those looking to make use of an older system. However, due to the difficulty that can be experienced to get it to work well, it is not really recommended.
  
=== CPU For MPEG2 ===
+
Read the NVIDIA_Component_Out 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).
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.
+
Display (television) manuals often provide specifications for this purpose.
  
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.
+
==== CPU For MPEG2 ====
 +
The CPU requirements for playing HDTV are significant.
  
'''Caveat Emptor'''
+
'''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.   
 
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.
+
* Use 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, use the ''--enable-proc-opt'' configure option.
* 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.
 
 
 
=== CPU For x/h264 (ie BluRay and HD-DVD) ===
 
Now that HD-DVD and BluRay drives have arrived for the PC, which offer extremely high quality 1080p content, cpu "requirements" have increased again.  
 
  
==== XvMC ====
+
=== Ripped Media ===
It doesn't support x/h264 so don't ask!
 
  
 
==== Reencoded Rips ====
 
==== Reencoded Rips ====
Legality aside, many re-encoded HD rips of BluRay, HD-DVD and TV shows have appeared on the seedier side of the internets. These won't play back properly with the internal player so [[mplayer]] is required.
+
HD rips of BluRay, HD-DVD and TV shows transcoded to lower bitrates and resolutions, as well as having HD Audio formats stripped out and transcoded to AC3, are substantially easier to play on lesser hardware.
 
 
720p reencoded rips should playback fine on an AMD Athlon64 3800+ equivalent processor or faster.
 
 
 
1080p reencoded rips require quite a bit more processing power but should play fine on an AMD Athlon64 X2 4600+ equivalent or faster.
 
  
 
==== Real 1080p Rips ====
 
==== Real 1080p Rips ====
Odds are, to playback a true BluRay or HD-DVD movie you will need a Core 2 Duo 6300 or AMD Athlon64 X2 6000+.
 
 
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 35 Mbit.  The .m2ts and .EVO files contained on these discs can be played back with occasional dropped frames on a Core 2 Duo E4500 @ 2.20 Ghz, and without dropped frames on a Core 2 Quad Q6600.  This comes with multiple caveats.  If the bitrate goes higher on the lower spec machine, it could choke entirely on 1080p content.  Further, most Blu-ray and HD-DVD rips now use E-AC3, mlp, or Dolby TrueHD as their only sound format.  Older discs have both the new formats and AC3 Tracks, but this is less and less common.  Patches are now available for E-AC3 and mlp support in ffmpeg and mplayer, allowing one to convert/play these tracks.  Both patches are slated for inclusion in ffmpeg and mplayer SVN.  These patches are available on the ffmpeg development list.  They can be applied to mplayer  by removing the section patching ffmpeg.c.
 
 
==== User Reports ====
 
[[User:Steveadeff]] - I've managed to playback 1080p rips on my overclocked Athlon64 X2 4400+ in mplayer
 
 
[[User:Phlepper]] - "I don't know the *minimum*, but I am able to playback at 1080p without XvMC using an AMD 64 X2 6000+ with over 60% idle cpu for both 720p and 1080i sources"
 
 
== 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 =
+
For more information on ripping and playing Blu-ray and HD-DVD disk formats, see [[High Definition Disk Formats]].
  
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.
+
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.
  
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.
+
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.
  
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.
+
== Transcoding HDTV ==
:[[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.--[[User:Steveadeff|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?
+
HDTV recordings typically consume slightly under 9GB per hour.  
:::It's now on my [[User:Steveadeff#Encoding|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?
+
MythTV supports a "lossless" mpeg2 transcode method. 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.
: [[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.--[[User:Steveadeff|Steve Adeff]] 17:29, 17 May 2006 (UTC)
 
  
= See also =
+
== See also ==
 
[[Optimizing Performance]]
 
[[Optimizing Performance]]
  
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]
 +
[[Category:Video display cards]]

Latest revision as of 12:42, 5 October 2015

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.

In some cases, a lower bitrate file may actually be more difficult to play. This is generally due to inexperienced transcoders using options that purport to retain higher quality at lower bitrate, as well as neglecting to utilize sliced encoding. In reality, the quality retained by processor intensive encoding options is relatively small. The larger problem for linux playback is the failure to encode in so-called "slices," which render linux systems (currently) incapable of multithreading the playback. This means that a multiple core system cannot be used to fullest effect, and that playback must instead rely on the raw clock speed of a single core.

Multiplexing and Transport Streams

Central to any discussion of digital 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 current versions on MythTV, it is possible to record any number of streams from a single multiplex, assuming the user is receiving television via ATSC, QAM, 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), or 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

The standard is called QAM or "ClearQAM." 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.

Another option is to use a digital tuner like the Silicondust HDHomeRun Prime that can utilize CableCARD. This will allow you to record shows that are not copy protected. These "copy freely" shows may be encrypted and inaccessible to a standard QAM tuner, but will be decrypted and made available through the HDHomeRun Prime.

HDTV and Satellite TV

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

Firewire capture

Some cable and satellite boxes include a firewire port from which raw MPEG-2 streams can be captured. MythTV can record unencrypted channels from this port.

Component Capture

In January 2008, Hauppauge Computer Works announced the Hauppauge HD-PVR, a component capture device capable of on-the-fly H.264 hardware transcoding of material up to 15 Megabits per second at 1080i. The HD-PVR makes it possible to record HD material from any device with a component output. While there is a quality hit from the Digital->Analog->Digital conversion, the quality of the capture is still substantially higher than any Standard Definition source. See the Hauppauge HD-PVR page for more information.

Native HDMI Capture

Several options exist in Windows to capture HDCP-free HDMI signals. No Linux drivers are available for any of these cards as they rely on DirectShow filters for compression, and the native compression is a poor, proprietary codec. Until the hurdles with the current capture cards are overcome, current methods of HDMI capture are limited for MythTV.

Capturing HDMI in Mythtv is possible through the use of IPTV encoders ( https://www.mythtv.org/wiki/IPTV_Encoders_as_a_Capture_Device ). There are limitations to these devices and they are not inexpensive, but they do work with the latest versions ( 0.28 + ).

Impossible Stuff

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

Europe

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

DVB-T For Terrestrial (Antenna)

DVB-S/DVB-S2 For Satellite

Hardware

A good guide to capture hardware that will work well in MythTV is the Linux TV wiki at http://www.linuxtv.org/wiki/index.php/Main_Page.

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. VDPAU may also be relevant to your needs, for offloading decode of difficult to play material.

Hardware

There are two ways to go about playing back HDTV. One is to rely on an VDPAU 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).

Video

AGP is a minimum requirement as the PCI bus does not have the bandwidth for HDTV unless VDPAU (Video Decode and Presentation API for Unix) is used. This is a fine option for those looking to make use of an older system. However, due to the difficulty that can be experienced to get it to work well, it is not really recommended.

Read the NVIDIA_Component_Out 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.

CPU For MPEG2

The CPU requirements for playing HDTV are significant.

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

HD rips of BluRay, HD-DVD and TV shows transcoded to lower bitrates and resolutions, as well as having HD Audio formats stripped out and transcoded to AC3, 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.

Transcoding HDTV

HDTV recordings typically consume slightly under 9GB per hour.

MythTV supports a "lossless" mpeg2 transcode method. 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