HTPC Basics: The Beginnings
The wonderful world of HTPC’s can be very baffling to someone who has never dabbled in the confusing realm of codecs, drivers and programs. So I decided to dedicate part 2 of the HTPC basic series to helping people understand the wide world of HTPC’s. I will briefly cover several topics including software, hardware, audio/video codecs and other.
Introduction, Software, Video
Let’s start by defining HTPC. HTPC or home theater personal computer is simply a computer hooked up to a TV to play some sort of media. A lot of people got their start in this hobby by the All In Wonder (TV Tuner + Video card combined) video cards in the late 90’s. This lead to using computers as progressive scan DVD players and here we are today.
HTPCs, also known as Media Center PCs, have several functions and in the below list are several functions that are popular.
- Personal Video Recorder
- DVD Library & Catalog
- Home Automation
- Blu-ray and DVD player
- Music Library
- Big Screen Gaming
- Netflix
- Actual computing
- Internet Radio
There are several other functions, in fact, you are only limited by what you can use a computer for. Ultimately the goal, we hope, is that the sum of all the functions you see above, is cheaper and more useful than buying individual components.
Software
If you were content with a keyboard and mouse, you could get away without adding additional software to your system. Since we are all used to a remote based TV experience, software was developed that can be used 5-10′ away. Large text and thumbnails are the name of the game here.
|
For the most part HTPC software is developed with 2 or 3 core HTPC functions as its focus. In my mind there are four major functions that can make up an HTPC software.
- Front-End – Catalogs and displays your media such as music and videos
- PVR duties – Record, timeshift TV programming
- Online services – Podcasts, streaming from content sites
- Social – Pretty new aspect but is coming down the pipe
Most software focuses at least on the top 3, however, you will find programs like Beyond TV that focus on #2 or a program like XBMC that focus on 1 and 3,
As you can see by the pics below, the UIs have evolved to be a pretty elaborate and elegant affair thanks to the legions of graphic artists in the respective software communities.
Software to check out in no particular order – * denotes PVR functionality
Codecs\File Formats\Containers
Codec is an acronym for compressing\decompressing. This technology is used to execute an algorithm to compress or decompress video or audio. (see Glossary) . An example of this is playback of your PVR recordings on your HTPC. This is decompressing or decoding of a MPEG-2 or H.264 file.
- Decoding usually refers to "playback" of a certain file.
- Encoding refers to taking a raw uncompressed signal and converting to a compressed file format (i.e recording a TV stream to MPEG-2)
- Transcoding refers to changing formats.(H.264 recording to WMV)
Lets start out with the various formats that audio & video files come in. I won’t spend a lot of detail but I will gloss over the common ones.
- mp3 – Audio format popularized by online file swapping
- MPEG-2 – Codec used by DVDs, broadcast HDTV, and most modern tuner cards and PVR software.
- H.264 – Part of the MPEG-4 standard (part 10) which offers higher quality at lower bit-rate. This codec that is used on Blu-rays, and the HD PVR by Hauppauge.
- VC-1 – Microsoft developed alternative to H.264. This codec was used by HD DVDs
- WMV – Microsoft developed codec
Containers are used to store the various file formats listed above. When you come across a file it will be named something like *.mkv or *.avi or *.mpg
- AVI – Windows developed container
- MKV – Increasingly popular open source container.
- MOV – Apple’s container
- WMV – Container for WMV compressed files
- VOB – DVD container
- MPG – Container for MPEG-2 files
- DVR-MS – Container used by Media Center to house Mpeg-2 files, metadata and DRM
- m2ts – A container that Blu-ray discs uses to house video and audio files on a Blu-ray disc.
- mp4 – Standard container for MPEG-4
Alright, now you have an idea of what is going on in the file format world. Here are a few examples of this in process. For most of these examples, I am focusing on Vista Media Center and its capabilities.
Standard PVR Function
- VMC in combination with the TV tuner encodes the TV signal to MPEG-2 and stores it in a DVR-MS file container.
- VMC comes installed with an MPEG-2 decoder with the proper DRM. As such it has native capabilities to play back MPEG-2 DVR-MS files.
DVD Playback
- A studio encodes the movie to MPEG-2 and stores it in a VOB container. Along with most media, there is DRM present on the DVD.
- Vista’s installed MPEG-2 decoder is compatible with the DRM necessary to playback DVDs.
Hauppauge HD PVR – H.264 Encoding
- SageTV and the HD PVR encodes the incoming analog component signal to H.264 and stores the video and audio in in a mp4 container.
- Vista does not have H.264 or VC-1 codecs installed natively. So we must rely on 3rd party codecs to decode or playback this file. In this case, Hauppauge ships with Arcosft’s MPEG-4 decoders.
Blu-ray
- A movie studio encodes your favorite title to H.264 (most of the time) and the audio to a lossless (DTS-HD or TrueHD) or lossly format (DTS, Dolby Digital ) and stores it in a .m2ts container. The file and associated Blu-ray disc structure is burned to Blu-Ray DVD.
- As mentioned above, Vista does not have native H.264\MPEG-4 decoders. So we need to track down codecs that work with the DRM of Blu-ray discs. WinDVD, PowerDVD, Nero & Arcsoft are all commercial software that works with Blu-ray playback.
SageTV Placeshifting
- The SageTV program takes an existing file and transcodes it to a lower bit-rate\bandwidth file for streaming over the internet.
Netowrking, Audio
Network Topology
There are several ways to connect your house. The two most common methods for HTPC deployment are a stand-alone computer connected directly to a TV or some sort of server/client setup.
A server is usually built into a tower case and is where multiple hard drives and the TV tuner cards are installed. Clients connect to the server to control the tuners and stream the media off the server. A server does not need to be a dedicated machine, even a gaming machine or office machine can be dual-purposed for server use.
A client HTPC is typically just a quiet computer with the HTPC software installed. Without having tuners and lots of hard drives installed in a case, it is easier to get away with smaller quieter builds. A thin client HTPC can be built for a few hundred dollars using an integrated chipset and budget CPU. The advantage to client PCs is that you get a full functioning computer but there is a certain amount of tinkering involved with drivers and codecs to keep things working.
An extender is more comparable to a consumer electronics device such as a DVD player rather than a PC. An extender uses an integrated chipset specifically built for media decoding capabilities and is coded to look like the PC version of the software. For the most part, extenders are used to interact with a server. Some come with a standalone mode that are able to connect to USB flash drives, UPnP servers and playback media. Below are a few examples of extenders.
- Xbox 360 – Generally considered the best extender experience for Vista Media Center. Is a touch on the loud side. All VMC extenders have limited file support. Will playback H.264 with Windows 7.
- Linksys and Netgear Extenders – These extenders are very quiet and typically cheaper but do not have the horsepower for full animations. Confirmed not to play back H.264 files with Windows 7.
- SageTV HD Theater – A great extender for the SageTV interface and supports most files out there.
Personally I have stand-alone HTPC directly connected to my TV in my home theater. This HTPC also does double duties as server for an XBox 360 extender. I have also integrated WHS into the setup to stream music, videos and ripped DVDs.
Audio
In light of the addition of Blu-ray playback to an HTPC’s repertoire the audio aspect of the equation just got a little bit more complicated. Matt has a good primer on audio codecs right here. What follows is a quick summary of audio codecs you will find on various media.
DVD Playback
The two codecs most often seen on a DVD are Dolby Digital and DTS. Typically, an HTPC is hooked up to a receiver via S/PDIF and the player passes the raw data stream (called bit streaming) to the receiver for decoding. This is why you see a DTS or DD light go on when playing back DVDs.
Blu-ray Playback
As seen in Matt’s write up linked above, DTS-HD and True-HD are the newer high bit-rate audio streams used on Blu-ray discs. The problem here is that then traditional audio link, S/PDIF does not have the bandwidth to pass these higher bitrate streams. The early solution was to have the Blu-ray application, such as PowerDVD, decode the audio and pass it via analog connections to your receiver. This is a workable method if you have a good sound card.
Analog connections aren’t really the solution most folks are looking for, but all is not lost. Recently, several products came on the market which allow for multi-channel LPCM. In this case, the media application, decompresses the audio and passes it via HDMI utilizing it’s higher bandwidth.
If you are interested in playback only, you will be concerned with Dolby Digital and DTS audio codecs.
- Dolby Digital (AC3) – Classic Dolby Digital we all know from DVDs. The difference here is that the specification’s maximum rate of 640Kbit/sec is possible. Technical limitations of how standard DVD works limits Dolby Digital to 448Kbit/sec. So even good old Dolby Digital will show improvement over the standard DVD version of the same movie soundtrack.
- DTS – We’re all familiar with DTS from DVDs. DTS has a maximum bitrate of 1.5Mbit/sec. However, DTS was typically only 768Kbit/sec on standard DVDs, so as with Dolby Digital, the next generation optical disc formats allow full breathing room for DTS.
- Dolby Digital Plus (E-AC3) – Syntax changes, improved quantization, and a few other tweaks render this incompatible with standard Dolby Digital. However a downconversion of DD+ to DD is easily done as the specifications include techniques made to lose as little as possible in the process. The typical bitrates of a DD+ soundtrack are 1.5Mbit/sec or 3Mbit/sec.
- DTS-HD High Resolution Audio – Commonly just called "DTS-HD." Essentially this is less compressed standard DTS; the bitrate of DTS-HD is typically 3Mbit/sec, it includes a 1.5Mbit/sec DTS ‘core’ for compatibility sake, with the expanded audio data around it as an extension to the core which will be recognized by a DTS-HD enabled decoder. For more on the concept of a DTS core check out DTS’s DTS-HD Audio page.
Losslessly Compressed/Uncompressed Formats
- Dolby TrueHD – Derived from MLP which was used in the DVD-Audio format. Quickly becoming the defacto standard in lossless compression for next gen formats.
- DTS-HD Master Audio – Brand new format, includes a DTS ‘core’ for compatibility sake. The lossless data is contained as an extension around the core which describes the difference between the core and the lossless data version.
Both Dolby TrueHD and DTS-HD M.A. typically hover in the 3Mbit/sec to 6Mbit/sec range, both are VBR (Variable Bitrate) so there is no constant bit rate, and spikes well past 6Mbit are common during any given second in complex audio tracks.
- Multi-channel LPCM – Linear pulse code modulation: In essence this is raw audio (like a WAV file). The bitrate on a typical 5.1 sound Blu-ray movie soundtrack is 4.6Mbit/sec. Sony’s music concert Blu-ray discs go even higher using a 6.9Mbit/sec rate.
HTPC Basics Series
Part 1 Of The HTPC Basics Series, covering the EPG, can be found here.