1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Build a HTPC

Discussion in 'Home Theater PC' started by dfeller, Feb 15, 2010.

  1. dfeller

    dfeller Member

    Joined:
    Jun 9, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    11
    This is part of a "whitepaper" I've been writing that goes through the basics of building a HTPC -

    To be clear, though, this is not intended to point to or recommend specific hardware but rather to give the first timer an overview of all the pieces and options available.

    Since this is not so much a "guide" as an overview, I thought it would be more appropriate in a thread. If there is good response I'll post the rest here as well - or the whole thing can be grabbed from my site at http://www.bocsco.com/dvr

    I'll post the first few chapters here in multiple messages - if yall want the rest I'm happy to keep posting - let me know.

    David
     
    Last edited: Feb 15, 2010
  2. dfeller

    dfeller Member

    Joined:
    Jun 9, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    11
    <h3>Chapter 1: Why would I do this?</h3>

    Good question! Some folks are motivated by the challenge – you really can build something better and more versatile than the DVR you get from your cable company or from TiVo and like any other home project, you can brag about it to your friends. It has traditionally been the exclusive domain of the high-end tinkerer but with relatively new tuner cards, software, and this guide – anyone can do it.

    So let’s compare your options: (Sorry for the formatting)

    Features............Cable-DVR....TiVo DVR....Build Your Own

    Record SD.............Yes.........Yes..........Yes
    Record HD.............Yes.........Yes..........Yes
    Take Programs Mobile..No........Kind Of........Yes
    Watch on main TV......Yes.........Yes..........Yes
    Watch Anywhere at home.No.......Kind Of........Yes
    Watch Movies..........No........Kind Of........Yes
    Listen to Music.......No........Kind Of........Yes
    Internet programs.....No..........No...........Yes
    Rent movies online...Kind Of......Yes..........Yes
    Download movies.......No..........No...........Yes
    Home Automation.......No..........No...........Yes
    Home Security.........No..........No...........Yes

    Cost per month...$12-18/mo/TV.$12/moTV1......$0 - Really!

    Notes:
    1 – Only rent movies from cable company – very limited selections
    2 – Take mobile through TiVo desktop – very slow transfer, limited playback rights
    3 – TiVo DVRs can share a recording list but you are required to have a series 2 or better TV at every TV in your home (up front cost) AND pay monthly for every TiVo just for that feature.
    4 – Movies and Music can be accessed by a TiVo through TiVo desktop but codecs are limited and access is difficult
    5 – Renting and buying movies works well through TiVo although you have to buy from one of their partners. No ability to access media from P2P

    <h3>Anyone See a pattern?</h3>

    WHOLE-HOME:
    I’d like to specifically draw attention to the whole-home part, as once people understand that piece, it is usually the motivating factor for taking on this kind of project.

    If you build your own DVR, not only can you record ANYTHING, you also now own all those files. That may sound simple, but it is huge as our media collections begin to grow. With other systems, the recordings are encrypted, and while you have temporary access, you can’t just grab a program off your TiVo or off your cable company DVR and do with it whatever you like – there are keys, encryptions, special ways to access it and other big brother stuff.

    Build your own and you get more freedom:

    Want to watch a program in your bedroom instead of the main TV? You bet
    Want to take a program to a friends house and watch it? You bet
    Want to start watching a program in the living room, get tired and finish in bed? Yep
    Want to record that movie off HBO and keep it in your collection forever? Oh Yeah
    Want to cut down your Cable AND TiVo bills? Easy
     
  3. dfeller

    dfeller Member

    Joined:
    Jun 9, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    11
    Basics of PC-DVR - CABLE TV

    Surely this isn’t really that hard, any old PC, add a tuner card, hook it up to your TV and you completely replace the need for TiVo right? With a little planning and the right pieces, absolutely; anyone can do it. Before we go through the specific things you need, you should consider exactly what you want to record.

    <b>Broadcast Overview </b>

    Analog, Digital (premium channels), SD, or HD:

    CableTV – Generally systems include analog (NTSC – same as used to be broadcast over the air) from 2-60 (ish) including local channels, must carrys like city public service channels, and what the cable company deems “basic cable” – scifi, discovery etc. Premium channels, encrypted and transmitted on the cable using Quadrature Amplitude Modulation (QAM) require a set top box of some kind to receive. Those digital channels are stacked, sometimes 10 deep, in each of the “old” analog slots. The system allows cable operators to put a lot more channels in the same bandwidth so they can better compete with satellite. Cable companies are also required to carry local HD stations and they normally do that using un-encrypted “clear QAM” so any TV with a QAM tuner can receive them.

    [​IMG]

    Some cable companies have begun to go “all digital” – in which case there are no NTSC analog channels at all and everything requires either a clear QAM receiver or a mini Set Top Box. The simplest way to see is to plug the cable right into your TV, tell your TV to tune cable stations (as opposed to air), and see if there are channels on 7, 8, 9, 10.

    One other thing to keep in mind is that set top boxes do not give you real information on what you are watching. If you are watching channel 9 through a set top box, it is most likely not tuning to NTSC channel 9 even if you do have analog basic cable in your system. Nearly all channels have a digital “version” broadcast at a much higher frequency and the set top box basically says – you didn’t really want to watch that old analog channel, did you? I’ll just give you the better digital version instead.

    Premium channels – basically anything the cable company wants you to pay extra for (sci-fi, military channel, hbo). These are all transmitted using the same QAM modulation but they are encrypted. Much like a wireless lan WPA key, the cable box they give you and their head end share a digital key and they can tell the cable box to decode some channels but not others.

    HD channels on the cable system are transmitted using the same QAM, just using more bandwidth than just a “digital channel”. The only issue is that where these channels are located is up to the cable company. That means they do tend to change from time to time and are sometimes not well documented. That can cause trouble with electronic program guides being able to interpret your desire to record CSI into a tuner command to go to a particular channel number.

    Cable Cards – Some TVs, TiVos, and even a few stand alone tuners are capable of having a cable card inserted. Recall we said that the normal “free” channels broadcast using clear QAM and the premium channels actually use the same modulation and encoding schemes but you have to have a decoder capable of sharing a digital key to receive those premium channels. A Cable Card is basically the “innerds” of a set top box and contains the engine that holds a digital key and can be addressed by the cable company. By inserting one of these cards into your device, the cable company now recognizes your device as a cable box and therefore gives you all the channels you pay for without having to have a separate cable box. This is great for TVs that hang on walls with no room near for an equipment stack. Cable cards are mandated by the government and must be provided by your cable company – usually for a small monthly fee. They are PCMCIA cards (very similar to the networking cards that you slip into your laptop) and if your device is capable it will have one of those slots. One potential drawback is that they typically do not provide electronic program guides or any kind of DVR functionality, just the ability of a TV to receive encrypted channels. Personally, I stay away from them at all costs. They tend to be hard to configure, the cable techs are usually poorly trained on them, and you lose the benefits of a cable box when you insert one.
     
  4. dfeller

    dfeller Member

    Joined:
    Jun 9, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    11
    Basics of PC-DVR - Over the Air

    Over the Air: what’s with all the .x channels?
    If you watch the news, or pretty much any TV at all, you were subjected to a barrage of warnings over the last 2 years about the conversion to digital. The government stepped in and spent literally billions of dollars to force the entire industry to convert to a new broadcast scheme. Long story short, your ability to hook an antenna up to your old TV and receive NBC on channel 4 is gone. Good news is the new system is better. Even using a converter box that knows how to tune and decode the new ATSC digital signals and transpose them so grandma’s old TV can watch them the signal is unquestionably better – even the SD stations. For that matter, coverage is also better, more people can receive the better signals and there are many more channels being broadcast. It turns out that each broadcaster can put 5-10 channels out from one transmitter instead of just one with the old system. Channel mapping wise, it is very similar to cable except the numbering is different. Huh?

    With a cable TV system (see above diagram), the cable company stacks multiple unique programs into a single traditional “channel”. For instance, they may put ESPN-HD, the military channel, and 4 others digitally in the same space of the “old” channel 65. Since the cable companies control the cable boxes, you as a consumer never really know where the channels are broadcast – nor do you care, so they end up assigning a nice unique channel number to each one that shows up on your cable box. ESPN-HD might be 645, military channel 274, etc. but as it turns out the cable box has a nice cheat sheet and knows that when you punch in 274 it needs to get the second channel at the old “65”… With over the air, there is no controlling cable box or big brother providing a cheat sheet, so the system is much more basic. The first program on old channel 9 is 9.1, the second program is 9.2 etc. Obviously, you also need some tuner that understands the new ATSC format as well.

    Why does all this matter? Because you have to choose the tuner, PC input, video card, and a few other things based on what you want to record. Obviously, the easiest answer is to record everything, but cost, effort, and what you have available to start with might define your project. In my home, I use a basic TiVo (analog channels only) for a huge majority of typical nightly shows, a TiVo connected to a set top box for premium channel recording, and a PC-DVR for high def recording. That means that an analog DVR might actually cover most of your needs, and if we can put one together for very low cost and no monthly fees that might be a good place to start.
     
  5. dfeller

    dfeller Member

    Joined:
    Jun 9, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    11
    PC Tuner Basics

    PC Tuner Basics:
    So, what tuners are available? A sample list is provided below of ones I’ve used or have seen used, but there are some very specific categories:

    Tuner Types:
    A tuner card may have a combination of these tuner types.

    Analog Tuner: Means it can tune in and receive NTSC signals. Prior to this year that was the standard for standard definition over the air (good old antenna), but it is still in use in most cable TV systems for basic cable (the first 60 or so “local” and basic cable channels)

    QAM tuner: Used alone this means it is capable of receiving “clear QAM” – those channels broadcast on a cable TV system including SD and HD channels but not premium channels (those are also QAM but are encrypted)

    ATSC tuner: The new over the air standard. In any given city you should be able to pick up between 5 and 20 or so channels many of which are HD. As a side note, these will almost always be higher resolution and better quality than what you get over cable or satellite.

    Cable Card Tuner: Only a very few of these are on the market, but the idea is that in addition to clearQAM signals, these tuners have a slot for a decoder card (PCMCIA card) provided by your cable company that allow you to also watch premium channels (whatever you subscribe to)

    FM tuner: FM radio

    Composite in: Generally used by these same tuner cards as a means by which you can hook them up to a stand alone cable (or satellite) set top box. Since these cards generally only receive NTSC, ATSC, or clear QAM they cannot, by themselves, record premium channels like HBO. Using an external set top box and feeding it to the tuner card via composite video (Standard definition), allows you to record those premium channels. In general, only composite is provided (or s-video which is roughly the same) as an input on these cards meaning you cannot record high definition through these standard cards.

    Component in: Same concept (ability to hook up an external set top box) as with composite except this allows high definition recording. I suggest caution on this however, as the few internal cards that have component in do not have their own MPEG or h.264 encoder and therefore use the host processor for compressing video and therefore only work with the provided applications. i.e. windows media center does not recognize them as tuners. The exception to this is the Hauppauge 1212 external HD capture device. When used in conjunction with third party drivers, windows media center will recognize it as a tuner. Actually, it recognizes it and the set top box it controls together as a tuner.

    Hardware vs. Software encoding: Hardware encoding means that there is a specific and dedicated piece of silicon on the tuner card that can take analog video (NTSC tuned or composite in) and encode it to MPEG2 or H.264 without having to use host CPU resources (For example Hauppauge 150/250/350 cards). This is critical if you have an older PC you are trying to transform or intend to have multiple tuners in one PC or want to watch “live-tv” (essentially two separate operations, one encode and one decode so you can pause and rewind live TV – it basically stores in real time what you are watching and plays it back right from the disk). Obviously, the host CPU can both encode and decode video. The question is how many simultaneous streams can it handle and also handle the core operating system and general I/O. A good rule of thumb (although you should consult online forums to see others experiences with your intended setup) is that it takes roughly 1GHz per encode stream for software encoding (using the host CPU) and just for safety half that for hardware encoding (likely less but that is a good safe rule for hardware encoding). For example, a PIII-1Ghz system can typically encode and decode a stream simultaneously allowing live-tv watching. A P4-2.5GHz machine can simultaneously encode two 480X480 MPEG4 files and simultaneously serve a filestream to a media center extender. Given the relatively low cost of cards with hardware encoders, I would highly recommend sticking with one of those.

    Decoding video: Since we are on the topic of encoding, you should also consider hardware and software decoding – meaning playing back video. For SD content, the requirement is roughly the same as with encode. For HD content, it typically takes a fairly powerful CPU. 720p typically begins to be trouble free with a P4 CPU at about 2.5GHz and full 1080i or p can be done with a 3GHz processor (or much less if you have an nvidia video card with decode acceleration.

    Video cards: Look for a video card that supports XVideo (or XV) extensions. That will offload some things like color conversion to your GPU and be easier on the host.

    Multiple vs. Dual Tuners: Most tuner cards that support QAM or NTSC will also support analog (NTSC and composite in) and marketers sometimes calls there dual tuners. Technically speaking this is correct as the analog tuner is normally separate from the digital tuner – and almost always have separate F-connector inputs. You should, however, read very carefully as to whether the two tuners (analog and digital) can be used at the same time and whether the DVR software you are using can recognize them independently. There are also a few truly “multiple tuner cards” meaning they have more than one analog and/or more than one digital tuner. The Hauppauge 2500 series is such an example. There are, however, still some limitations. You are generally limited to watching/recording two digital or one analog and one digital program for instance. The restriction is generally a result of how many separate encoder chips are on board.
     
  6. dfeller

    dfeller Member

    Joined:
    Jun 9, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    11
    Dissecting a tuner

    A specific example – the Hauppauge PVR-350

    [​IMG]

    So, lets take a minute and examine one particular board – the one I happen to have on hand and will be using for this guide – the Huappauge PVR-350 PCI. It is interesting and a little different for two reasons: It has a Conexant chip onboard that can simultaneously encode and decode MPEG2 video (meaning it actually has it’s own video output – very handy), and it is one of the most universal boards supported on almost all PVR software platforms.

    Digital boards also have a digital decoder – something that will tune in either QAM or ATSC or both – like this.

    [​IMG]

    The digital demodulator takes an analog waveform from a DTV transmission, and “demodulates” it to its baseband digital form. The output of the demodulator is typically MPEG2 packets.

    Generally, you connect cable TV right to this board (and can also hook up an FM antenna for radio), the board tunes in the channel you want to watch, decodes the baseband audio and video and then encodes it using MPEG2 at very high rates (the host processor has to contribute very little. Under the control of the included software or with many PVR programs, you can also watch an MPEG video (or previously recorded show) by connecting a TV right to this board – again offloading both the host CPU and your video card – sweet. There are some issues (aren’t there always) that we will go through later.
     
  7. dfeller

    dfeller Member

    Joined:
    Jun 9, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    11
    How it all Fits together - Connections

    First, let’s go through the various ways you can hook up a tuner (we will consider both analog and digital tuner cards in the below examples)…
    Keep in mind that this is a bit more complicated that the “Comcast all-in-one” DVR since you have to decide what you want to record…

    Analog Cable Only
    [​IMG]

    With this configuration (one or more analog tuner cards in a PC fed directly with cable TV), assuming your cable company carries basic cable as analog, you can record and play back the analog NTSC channels from your cable in standard definition. The TV can be connected with anything your video card can handle but the better the connection and the higher the resolution you set, the better the video and especially the menus will look. If you have more than one tuner card, just use a splitter so each one gets the same signal.
    What you can watch/record: analog channels between 2 and 125 (normally just 2-64 or so with cable TV)

    Note that before 2009, you could also just hook up an antenna where the cable comes in and get analog NTSC stations, but now that they have ceased broadcasting in analog, to get over the air you need a tuner card capable of ATSC reception. More on that in a minute.

    But, you say, I also want to be able to watch and reord premium channels (digital channels from 100 to 999 (or more) – HBO, military channel, etc.

    Digital Cable – recording premium channels
    [​IMG]

    So what’s different, not much really, except you are coming into the tuner card on the composite input (or into the tuner on channel 3) from a set top box and then the computer/tuner card controls the set top box using an IR flasher stuck to the front of it. Now when you change channels, instead of the tuner on the tuner card changing channels, the little stuck on IR flasher commands the set top box to change channels. For clarity, though, this is still all SD – even if your set top box is HD, the computer will only capture in 480i (SD) because the tuner/input cards are only capable of capturing SD video. The upside is that you can record everything – cable channels, premium channels, everything. And once recorded, you can then watch them on the local TV, or on any other TV in the home through BOCS or a media center extender (if you are using windows media center) or through a connected media player (like the HDX1000 or popcorn hour).

    What can you record? – everything available on cable – through a cable box – in SD.

    One other note – no problem mixing inputs – meaning if you have two tuner cards, one can be directly hooked to cable and the other through a cable box – most PVR software lets you tell it what each tuner is capable of receiving.
     
  8. dfeller

    dfeller Member

    Joined:
    Jun 9, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    11
    ClearQAM and ATSC over the air:
    Moving on to tuners with digital capabilities. Note that almost all of them will also tune analog (see multiple vs. dual tuners above).

    [​IMG]

    With the switch from analog to digital broadcast (from NTSC to ATSC) there are actually many more stations available for free. Turns out that now, a single transmitter can carry 5-10 channels instead of just one. So broadcasters are definitely broadcasting more, and a lot of it in HD. As a quick note, the best HD that can be had (antenna, cable, satellite) is most definitely over the air. Broadcasters are sending the best quality signal but cable and satellite both highly compress the signal as both have limited bandwidth. The only issue is that most tuner cards have a “digital” input (QAM or ATSC) and an analog input. That means you have to dedicate a tuner to either ATSC or QAM – cable. In the picture above the top tuner is dedicated to ATSC digital and the analog portion of it can also tune NTSC analog over cable. If the bottom tuner were also dual analog/digital, it could pull in the QAM signals off cable. Again, the cable companies are required to carry local stations in clearQAM – unencrypted. So with both ATSC and QAM capable tuners, you can actually record in HD quality.

    What can you record? All the analog channels as in the first example PLUS either HD QAM stations off cable OR HD ATSC signals from an antenna. Very cool.

    A couple notes – depending on the card, some make you choose either analog or digital (QAM or ATSC), and a few like the Hauppauge 2250 are true dual tuner cards – meaning you connect one cable and can record two clear QAM or two ATSC channels at the same time (or analog).


    The Ultimate – recording premium channels in HD:
    Even though these digital cards can record in HD, they cannot generally accept an external HD signal – only tuned HD. So, if you want to record HBO in HD (since it is definitely not Clear-QAM and you need a cable box to tune it in) you have three choices:

    1) An external HD-PVR capture device like the Hauppauge HD-PVR

    [​IMG]

    In this case, all the tuning is done by the set top box, the capture is done by a stand alone box that takes component video/audio in, encodes it to H.264 and sends that video over a USB cable to the computer to be saved or watched live. In this particular picture, the top tuner can record all the same things the bottom tuner can, but the bottom one is capturing in HD. Obviously, the external capture device is doing hardware encode so, again, It is relatively easy on the processor.

    I’ll go into detail later, but there are plenty of little gotchas still to get through – for instance clear QAM recording only works seamlessly if your electronic program guide supports those channels. Windows 7 or a third party EPG is recommended if you are hooking up to QAM.

    2) A tuner with cable card capabilities. Currently there is only one on the market that I’ve seen and they offer both an external and internal option – The ATI TV Wonder.


    The basic idea is that this is a digital tuner “card” except with the addition of the cable card, it can tune in your premium channels as well.

    3) While I’ve not done it myself, you can connect your cable box to your computer via firewire and get video that way. Channel changing is only supported with some set top boxes, however, and a special driver is required to interface all this into windows media center.
     
  9. RealGomer

    RealGomer Regular member

    Joined:
    May 6, 2003
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    26
    Keep Posting. I've signed with DirecTV and have beaucoup DVD, CD, and VHS.
     

Share This Page