Building A Media Server
Â Â Â After the initial flurry of activity surrounding your first Home Theater PC (HTPC) project subsides and your significant other is thoroughly addicted to its convenience, it's time to think about phase 2 of the operation.Â No, I'm not talking about "Phased Redeployment", but rather about building a media server. Â This is a device which will centrally store all media and make it accessible to all client HTPCs.Â It can contain redundant hard drives to help protect against data loss.Â It can be located in a media closet or the basement keeping the noise of fans and hard drives out of earshot.Â It can even make cabling easier as all Satellite/CATV runs need only go to the media server rather than throughout the house.Â A media server can wear many hats, but today we will discuss the most common highlights of planning a media server into your existing A/V environment.
Â Â Â The capture cardâ€™s task is to convert the feed from the cable provider or satellite box into media files viewable on any HTPC.Â There are three distinct categories of capture cards; analog with software encoding, analog with hardware encoding, and digital.Â Software analog capture cards rely on the main CPU to convert the captured frames into a MPEG2 or MPEG4 data stream.Â These cards tend to be the least expensive, but they also put the greatest demands on the main CPU.Â If for any reason the CPU becomes to busy to process the next frame, it is simply dropped and video quality suffers.Â This may work fine in a system where there is only one capture card, but media servers tend to have multiple cards.Â In this scenario, the CPU will quickly find itself at 100% load.Â What is needed is a way to offload this work from the main CPU and free it to perform other essential tasks.Â This is exactly what a hardware assisted capture card accomplishes.Â An encoding engine is included on the card which handles the job of processing the video stream.Â This allows a media server to have multiple capture cards operating simultaneously with very little CPU overhead.
Â Â Â The last category of capture card is the digital card.Â These capture High-Definition (720p & 1080i) video while the analog cards only capture Standard-Definition (480i) video.Â There are several factors to consider when deciding which digital card to purchase.Â Verify you can receive over the air (OTA) in your area by visiting http://www.antennaweb.org/.Â If you are out of range or if you would rather not put up an antenna, then you will have to settle for what your local cable company provides.
Â Â Â Now that the various types of capture cards have been defined, how many of each are required?Â This turns out to be simple math.Â How many simultaneous analog feeds do you wish to record at once?Â Add to this the number of live feeds you wish to view simultaneously.Â For instance, if it is desirable to be able to record 3 shows at once while also watching live TV on 2 HTPC clients, then at least 5 analog tuners are needed.Â Bear in mind that viewing an older show that has already finished recording does not consume a tuner.Â Now repeat this process with the digital feeds and this will give the total number of capture cards for the media server.Â If the setup requires a high number of cards, consider getting a dual tuner card like the Hauppauge PVR-500 which is actually 2 analog tuners in one.
Â Â Â If space is a premium inside the case or perhaps there are no more card slots, then all is not lost.Â There are several external capture devices that connect via USB2.0 or even Ethernet like the HDHomeRun made by SiliconDust pictured below.Â Ethernet enabled capture devices have the added benefit of flexibility of placement.Â For instance, the device can be placed right where the cable feed enters the home reducing signal quality issues due to long runs of coax.Â
Â Â Â A common question to ask is, "How much storage is enough?"Â Let's run down the list of typical space used for various types of media assuming MPEG2 compression.
- HDTV = 12Mbps (5.4GB/hr) - 18Mbps (8.1GB/hr)
- SDTV =Â 4.4Mbps (2.0GB/hr) - 6.7Mbps (3.0GB/hr)
- DVD = 3.5Mbps (1.6GB/hr) - 6.0Mbps (2.7GB/hr)
- MP3 = 128kbps (57.6MB/hr) - 256kbps (115.2MB/hr)
Â Â Â Clearly, if the media server will be used to store copious amounts of HDTV material, large amounts of storage space will be required.Â At the time of this article, the largest single hard drive that is available is 750GB.Â That will hold around 100 hours of HDTV programming or 300 hours of SDTV programming.Â This may be enough for some, but once you factor in the DVD and CD libraries along with the wife's season of Grey's Anatomy and Dancing With The Stars, and what used to be ample space has dwindled to nothing.Â Clearly, multiple drives will be needed to comfortably hold everyone's media.Â The down side of this is that greater numbers of drives mean greater odds of data loss due to drive failure.Â What can be done to combat this?Â RAID to the rescue!
Â Â Â Â IT departments have wrestled with the issue of data integrity for years and their enterprise dollar expenditures back then have paved the way for more cost effective consumer level solutions now.Â Let's start this discussion off by describing the concept of RAID (Redundant Array of Independent Disks) and how a media server can benefit from its use.Â To begin with, the in depth technical theory behind RAID and its various intricacies have filled volumes and is beyond the scope of this article, so I will only go over the bits that concern a media server.Â While there are many types of RAID, most HTPC users will implement a RAID5 configuration.Â Simply put, RAID5 tries to prevent data loss due to drive failure by storing redundant data across multiple drives.Â If any one drive dies, the redundant data on the remaining drives can be used to piece together the contents of the failed drive once a replacement drive has been installed.Â The down side is this level of RAID does not protect against multiple drive failures.
Â Â Â As a general note, look for hard drives which run cooler and have been shown to run quieter during heavy use.Â Ive had good luck with Samsung and Seagate drives, but spend some time reading articles at Silent PC Review before making a purchase.
Â Â Â Â Pre-HDTV a 100Mb ethernet solution would be sufficient for all but the largest of media server solutions.Â Now, due to the prevalence HDTV, the bandwidth requirements have increased and it may become necessary to upgrade to a 1.0Gbps ethernet network.Â Compare the following typical data rates for various network types to the media data rates in the prior section.
- 802.11b = 6.5Mbps
- 802.11g =Â 25Mbps
- 100Base-TX = 100Mbps
- 1000Base-TX = 1000Mbps (1.0Gbps)
Â Â Â Â Not all systems on the network need to run as fast the media server connection.Â In the interest in saving money, the link between the media server and the network switch could be 1.0Gbps while the various clients can run at the slower 100Mbps.Â This rate provides enough bandwidth to each client to accommodate any media stream while giving the media server a large enough pipe to supply all the clients.
Â Â Â Wireless connections need special care in the planning stage to ensure a solid and stable connection.Â Marginal radio reception means video dropouts and audio disruption ruining the home theater experience.Â It is my firm belief that wireless connections should only be used as an absolute last resort due to its unpredictable and sometimes frustrating behavior.Â If a wireless connection cannot be avoided, try to stick with all 802.11g devices from the same manufacturer.Â Also, don't forget to enable WPA2 or WPA encryption or you may find your network hacked.
Â Â Â This may be one of the most important aspects of the design to consider.Â It certainly is one of the most difficult topics to research due to the sheer volume of factors to keep in mind.Â Heat transfer, noise suppression / isolation, number of bays, size, aesthetics, and ergonomics are just a few of the bullet points.Â Patience with this choice will result in a case that may well survive several internal upgrades.
Â Â Â First off, look for a case with plenty of drive bays and space for a full size ATX motherboard and power supply.Â This will provide for the greatest flexibility when it comes to choosing components.Â Also, cases which have large, slow spinning 120mm fans are preferable to smaller fans which tend to operate at a higher RPM and generate more noise.Â Hard drives mounted with built in silicon grommets help to reduce case vibration.Â Some specialized cases, like the Antec P180 pictured below, even feature isolated chambers for the power supply and hard drives.Â This forms a kind of "divide and conquer" strategy that has shown to effectively boost heat removal without contributing to system noise.
Â Â Â This is literally the life blood of the media server.Â The system can become unstable at best and convert to smoke at worst if this component does not perform its function adequately.Â Fundamentally, a PC power supply converts line voltage (120VAC in the US) to several DC voltages required to power the various components in the PC.Â This conversion process generates heat due to inefficiencies, so choosing a supply that has a high efficiency (greater than 80%) reduces its overall heat output.Â Another feature to look for is a unit with a large 120mm fan as well as a either a honey comb or wire fan guard.Â Both help prevent excess noise due to air turbulence.Â Cable management in the form of cable sleeves and wire ties not only help with internal case appearance, but they also help streamline airflow.Â The SeaSonic S12 series of power supplies (pictured below) have proven themselves to be both quiet and efficient.
CPU And Motherboard
Â Â Â Depending on your media habits, a media server can be fairly busy performing the various tasks assigned, so give it a fighting chance.Â This is an ideal application for a dual core CPU.Â Whether you go with an AMD or Intel based system is irrelevant as both (at the time of this article) are easily up to the task.Â If placeshifting or transcoding to a different encoding format are on the server's agenda, then go with a mid to high end CPU as this will help speed up these tasks.
Â Â Â Choosing a motherboard can be challenging.Â The primary concerns are; lots of expansion capability for cards and hard drives along with favorable reviews in regards to stability.Â If the required list of capture cards need 4 PCI slots and 1 PCIe slot, make sure to find a board that can provide those slots.Â How well the board can overclock, while not directly relevant, can give hints to its stability at stock speeds.Â While on the topic of overclocking, remember that this is a server.Â Overclocking belongs to gaming rigs where speed is the primary concern.Â In this application, stability, dependability, quietness, and efficiency are the goals to strive for.
Â Â Â While certainly a complex beast, a media server project can be tackled with sufficient prior planning and persistence.Â Those who have already built a HTPC are at a distinct advantage as they have endured some of this before.Â This certainly is not an exhaustive article, but it should get the mind thinking in the right direction.Â For instance, I have not covered how a media server can branch out and help with HA (Home Automation), Home Surveillance, VOIP (Voice Over IP) and more.Â The sky (and the spouse's hold on the credit card) is literally the limit here.Â Approach the topic with patience and a willingness to learn more about HTPCs (not to mention spending quality time with MissingRemote.com on a daily basis) and things should go fine.Â If you do decide to start a media server project, please consider blogging the progress of your journey in our forums.Â Other readers would love to follow your progress and you may even discover some helpful advice.