Difference between revisions of "HD MythTV On A Budget"

From MythTV Official Wiki
Jump to: navigation, search
Line 37: Line 37:
 
   - Linksys PLK300 PowerLine AV - $145  
 
   - Linksys PLK300 PowerLine AV - $145  
 
   - Linksys PLE300 - $73 from amazon
 
   - Linksys PLE300 - $73 from amazon
*Note*  I tried a wireless card, SD channels showed up great, but the HD channels were horrible.  This was a WirelessG card.  Not sure how N would work.  The powerline stuff is expensive, but it is working really well.
+
  *Note*  I tried a wireless card, SD channels showed up great, but the HD channels were horrible.  This was a WirelessG card.   
 +
          Not sure how N would work.  The powerline stuff is expensive, but it is working really well.
  
 
TV:
 
TV:
Line 46: Line 47:
  
 
Total Cost:
 
Total Cost:
   $773.99 + some shipping not included above (could have probably saved a bit more by more craigslist shopping, but oh well)
+
   $773.99 + some shipping not included above  
  
 
Approx Savings from buying new hardware: (assuming $200 per frontend)
 
Approx Savings from buying new hardware: (assuming $200 per frontend)
Line 52: Line 53:
 
    
 
    
  
So there goes the budget :(  It will take about a year and a half to start making money off of the setup.   
+
So there goes the budget :(  It will take about a year and a half to start making money off of the setup.  Of course, buying used you run the risk of the hardware going bad on you sooner, so I may need to spend that 150 anyway later on when one of my machines die.
  
  
Line 59: Line 60:
  
 
Backend:
 
Backend:
After some research, I found that mythbuntu was one of the more popular options in terms of forum and documentation support.  So I installed a BE/FE configuration on my backend for testing. After looking at the eye candy and the features, I got preliminary wife support to go ahead with the project.  So I ordered the Hauppage 2250 Tuner card.  This brought up problem #1.
+
After some research, I found that mythbuntu was one of the more popular options in terms of forum and documentation support.  So I installed a BE/FE configuration on my backend for testing. After looking at the eye candy and the features, I got preliminary wife
 +
support to go ahead with the project.  So I ordered the Hauppage 2250 Tuner card.  This brought up problem #1.
  
 
   Issue: Hauappage TV Tuner Card does not work in Linux out of the box
 
   Issue: Hauappage TV Tuner Card does not work in Linux out of the box
Line 69: Line 71:
  
 
   Issue: HD recordings can take up to 6Gb/hour.  SD is about half of that.   
 
   Issue: HD recordings can take up to 6Gb/hour.  SD is about half of that.   
   Solution:  Auto-Transcode the kids shows.  Make sure to watch the adult shows quickly.  Decided not to auto-transcode the adult shows because we tend to watch them the same night.  When the shows build up, we may auto-transcode more of them.  Of course, we also ordered a 1TB HD :)  After transcoding, the kids shows take about 1G/30 minutes and adult shows about 3G/hour
+
   Solution:  Auto-Transcode the kids shows.  Make sure to watch the adult shows quickly.  Decided not to auto-transcode the adult  
 +
            shows because we tend to watch them the same night.  When the shows build up, we may auto-transcode more of them.   
 +
            Of course, we also ordered a 1TB HD :)  After transcoding, the kids shows take about 1G/30 minutes and adult shows  
 +
            about 3G/hour
  
 
So great, backend done, now for Frontend #1.  After some craigslist lurking, bought a Dell Optiplex 320.  Small, quiet, PCI-express slot, 3Ghz, perfect, right?  Only after about 20ish hours of work! :(
 
So great, backend done, now for Frontend #1.  After some craigslist lurking, bought a Dell Optiplex 320.  Small, quiet, PCI-express slot, 3Ghz, perfect, right?  Only after about 20ish hours of work! :(
  
 
   Issue: Dell Optiplex 320 Does not like booting linux.  Not sure on the details, but after some research found that it needs Grub2
 
   Issue: Dell Optiplex 320 Does not like booting linux.  Not sure on the details, but after some research found that it needs Grub2
   Solution:  Will have to link the website I found, but the jist of the solution is that you need to install Grub2.  This is not so easy with mythbuntu and requires some command line interaction.
+
   Solution:  Will have to link the website I found, but the jist of the solution is that you need to install Grub2.  This is not  
   Solution #2: While working on Frontend2, I found Ubuntu Minimal Install ISO.  This requires a little bit of additional technical knowledge, but allows the option to install grub2 and mythbuntu from the install menus.  More details later.
+
              so easy with mythbuntu and requires some command line interaction.
 +
   Solution #2: While working on Frontend2, I found Ubuntu Minimal Install ISO.  This requires a little bit of additional  
 +
                technical knowledge, but allows the option to install grub2 and mythbuntu from the install menus.  More details later.
  
   Issue: Dell Optiplex 320 Does not recognize USB ports until after the middle of loading the OS.  So diskless bootup went out the window since the machine would boot off the USB, but then I had to unplug it and plug it back in when the mythbuntu bar was about halfway across the screen. Painful.
+
   Issue: Dell Optiplex 320 Does not recognize USB ports until after the middle of loading the OS.  So diskless bootup went out the  
   Solution:  Hard Drive install.  Tried network booting, but could not figure out how to manage the mythbuntu network boot features. I could create the linux image, but updating it and maintaining it seemed painful.  Also, could not get network booting to work very well on the Dell.
+
          window since the machine would boot off the USB, but then I had to unplug it and plug it back in when the mythbuntu bar  
 +
          was about halfway across the screen. Painful.
 +
   Solution:  Hard Drive install.  Tried network booting, but could not figure out how to manage the mythbuntu network boot features.
 +
              I could create the linux image, but updating it and maintaining it seemed painful.  Also, could not get network booting  
 +
              to work very well on the Dell.
  
 
   Issue: Wanted to use my existing DishTV remotes with the streamzap receiver.  
 
   Issue: Wanted to use my existing DishTV remotes with the streamzap receiver.  
   Solution:  I will try to re-find and post the website that helped me with this.  The most important key that I learned is that hopefully you have the Dish remote that can learn.  So I took the streamzap and the dish and had the Dish remote learn all the streamzap codes.  That way, the streamzap receiver just though the Dish remote was the streamzap and from there, just got all the codes straightened out and mapped the way I want them.  Will include the file later.
+
   Solution:  I will try to re-find and post the website that helped me with this.  The most important key that I learned is  
   Maybe solution:  Not sure if I had to do this, but I did install the latest version of lirc.  This will also have to be recompiled after every linux image update.
+
              that hopefully you have the Dish remote that can learn.  So I took the streamzap and the dish and had the Dish remote  
 +
              learn all the streamzap codes.  That way, the streamzap receiver just though the Dish remote was the streamzap and  
 +
            from there, just got all the codes straightened out and mapped the way I want them.  Will include the file later.
 +
   Maybe solution:  Not sure if I had to do this, but I did install the latest version of lirc.  This will also have to be  
 +
                    recompiled after every linux image update.
  
   NOTE:  Turn OFF automatic updates.  As mentioned above, if it installs updated linux kernels, you will have to recompile things, which is a pain.  If you want the latest and greats of the important stuff, go tot he mythbuntu website and set up the automatic weekly builds. Just make sure to do the fixes branch.   
+
   NOTE:  Turn OFF automatic updates.  As mentioned above, if it installs updated linux kernels, you will have to recompile things,  
 +
  which is a pain.  If you want the latest and greats of the important stuff, go tot he mythbuntu website and set up the automatic  
 +
    weekly builds. Just make sure to do the fixes branch.   
  
 
So Frontend 1 is working great with the video card installed.  Able to watch LiveTV, view movies I put on the backend, record things, working great.  I learned enough about NFS to connect the movie directory ont he backend machine to the frontend machine so now all the frontends can share one video library.  YAY. Now its time to disconnect it from the router :)
 
So Frontend 1 is working great with the video card installed.  Able to watch LiveTV, view movies I put on the backend, record things, working great.  I learned enough about NFS to connect the movie directory ont he backend machine to the frontend machine so now all the frontends can share one video library.  YAY. Now its time to disconnect it from the router :)
Line 100: Line 117:
 
Anyway, install went smoothly, mythbuntu Frontend.  Got it all hooked up to the backend database, started the Frontend up and...
 
Anyway, install went smoothly, mythbuntu Frontend.  Got it all hooked up to the backend database, started the Frontend up and...
  
   Issue:  2.6GHz really isnt enough for HD content.  OOPS  The CPU was maxed out.  Frontend was at like 50% CPU and xorg was the other 50%
+
   Issue:  2.6GHz really isnt enough for HD content.  OOPS  The CPU was maxed out.  Frontend was at like 50% CPU and xorg was the  
 +
          other 50%
 
   Solution:  Get a decent AGP video card and hope that it can take some of the pressure off the CPU
 
   Solution:  Get a decent AGP video card and hope that it can take some of the pressure off the CPU
  
Line 117: Line 135:
 
   Hard Drive Partitioning:   
 
   Hard Drive Partitioning:   
 
     /      : 80G  (all updates take up disk space)
 
     /      : 80G  (all updates take up disk space)
 +
    /var/lib: 10G  (mythbuntu likes putting stuff here, but its mainly just going to be the database once you set everything up)
 
     /liveTV : 80G  (we are using usually 1 TV and LiveTV takes approx 40G after a night of watching.  So 2 TV might take up 80G)
 
     /liveTV : 80G  (we are using usually 1 TV and LiveTV takes approx 40G after a night of watching.  So 2 TV might take up 80G)
     /media  : the rest (make sure to keep LiveTV and media in separate partitions. If they are on the same partition, you never really know how much free space you have because LiveTV auto-expires.  So you could have 3G one day, then 30G the next)
+
     /media  : the rest (make sure to keep LiveTV and media in separate partitions. If they are on the same partition, you never  
 +
              really know how much free space you have because LiveTV auto-expires.  So you could have 3G one day, then 30G the next)
 
     NOTE:  media = recordings, movies, music, etc.  If you have lots of movies or music, you may want another partition for those
 
     NOTE:  media = recordings, movies, music, etc.  If you have lots of movies or music, you may want another partition for those

Revision as of 19:50, 4 August 2009

My Goal with this Wiki is to document the trials and tribulations of saving a few dollars on building a High Definition Capable MythTV system on a budget. This meant buying whatever I could at decent prices off of craigslist.

As part of keeping more of our paycheck (Thanks Dave Ramsey), we decided that we needed to get rid of DishTV. Out of the entire package, we felt that losing DVR functionality was unacceptable, so thus started our MythTV journey. Again, in the interest of budget, we found that building our own frontends with new hardware (intel atom boxes) would cost about 200-250. Therefore, I priced out some criagslist prices and found that I could save about 100-200 over the entire project by buying used computers. Since almost all of the MythTV documentation online talked about older hardware, it seemed like a great path.

Original Objectives:

  - Spend about 100 - 150 per frontend
  - All frontends should be able to handle HD TVs (current TVs are CRT, but you never know what Santa will bring)
  - Diskless would save some money, power and noise
  - Keep the total project at around 500, that is approx how much DishTV was costing us a year.


Backend: Total: $202

  - I had a home-built Athlon 3700 box collecting dust (yay for breaking WoW addiction)
  - Hauppauge WinTV-HVR-2250 tuner card - $112
  - 2G RAM
  - 160G HD
  - 1TB HD - 90

Frontend 1: Total: $135

  - Dell Optiplex 320 3.0GHz  - $80 from craigslist
  - ZOTAC ZT-94TEH2L-FDR-V1 GeForce 9400 GT 512MB  - $41 from newegg
  - 1G RAM - $14 from Frys
  - 80G HD


Frontend 2: Total: $113.99

  - HP 2.6GHz - $80 from craigslist
  - ZOTAC ZT-62AA250-HSS GeForce 6200 256MB (AGP)  - $33.99 from newegg
  - 1G RAM
  - 80G HD
  - streamzap remote - $30 from amazon


Networking: Total: $218

  - Linksys Router - already owned
  - Linksys PLK300 PowerLine AV - $145 
  - Linksys PLE300 - $73 from amazon
  *Note*  I tried a wireless card, SD channels showed up great, but the HD channels were horrible.  This was a WirelessG card.  
          Not sure how N would work.  The powerline stuff is expensive, but it is working really well.

TV:

 - Terk Technology HDTVi antenna - $45 from Frys

Remotes:

- 2 Streamzap PC Remotes from Amazon - $60

Total Cost:

 $773.99 + some shipping not included above 

Approx Savings from buying new hardware: (assuming $200 per frontend)

 $151.01
 

So there goes the budget :( It will take about a year and a half to start making money off of the setup. Of course, buying used you run the risk of the hardware going bad on you sooner, so I may need to spend that 150 anyway later on when one of my machines die.


Now, for the part you probably came here for, Getting Mythtv Working.


Backend: After some research, I found that mythbuntu was one of the more popular options in terms of forum and documentation support. So I installed a BE/FE configuration on my backend for testing. After looking at the eye candy and the features, I got preliminary wife support to go ahead with the project. So I ordered the Hauppage 2250 Tuner card. This brought up problem #1.

 Issue: Hauappage TV Tuner Card does not work in Linux out of the box
 Solution:  God liked me and gave Steven Toth the great wisdom to make drivers for it.
   http://www.steventoth.net/blog/products/hvr-2250/ 
 NOTE:  Whenever you update the kernel image, you WILL have to re-compile this

After getting it to work, I got LiveTV! Everything was working great on my backend. Then I noticed something.

 Issue: HD recordings can take up to 6Gb/hour.  SD is about half of that.  
 Solution:  Auto-Transcode the kids shows.  Make sure to watch the adult shows quickly.  Decided not to auto-transcode the adult 
            shows because we tend to watch them the same night.  When the shows build up, we may auto-transcode more of them.  
            Of course, we also ordered a 1TB HD :)   After transcoding, the kids shows take about 1G/30 minutes and adult shows 
            about 3G/hour

So great, backend done, now for Frontend #1. After some craigslist lurking, bought a Dell Optiplex 320. Small, quiet, PCI-express slot, 3Ghz, perfect, right? Only after about 20ish hours of work! :(

  Issue: Dell Optiplex 320 Does not like booting linux.  Not sure on the details, but after some research found that it needs Grub2
  Solution:  Will have to link the website I found, but the jist of the solution is that you need to install Grub2.  This is not 
             so easy with mythbuntu and requires some command line interaction.
  Solution #2: While working on Frontend2, I found Ubuntu Minimal Install ISO.  This requires a little bit of additional 
               technical knowledge, but allows the option to install grub2 and mythbuntu from the install menus.  More details later.
  Issue: Dell Optiplex 320 Does not recognize USB ports until after the middle of loading the OS.  So diskless bootup went out the 
         window since the machine would boot off the USB, but then I had to unplug it and plug it back in when the mythbuntu bar 
         was about halfway across the screen. Painful.
  Solution:  Hard Drive install.  Tried network booting, but could not figure out how to manage the mythbuntu network boot features.
             I could create the linux image, but updating it and maintaining it seemed painful.  Also, could not get network booting 
             to work very well on the Dell.
  Issue: Wanted to use my existing DishTV remotes with the streamzap receiver. 
  Solution:  I will try to re-find and post the website that helped me with this.  The most important key that I learned is 
             that hopefully you have the Dish remote that can learn.  So I took the streamzap and the dish and had the Dish remote 
             learn all the streamzap codes.  That way, the streamzap receiver just though the Dish remote was the streamzap and 
            from there, just got all the codes straightened out and mapped the way I want them.  Will include the file later.
  Maybe solution:  Not sure if I had to do this, but I did install the latest version of lirc.  This will also have to be 
                   recompiled after every linux image update.
  NOTE:  Turn OFF automatic updates.  As mentioned above, if it installs updated linux kernels, you will have to recompile things, 
  which is a pain.  If you want the latest and greats of the important stuff, go tot he mythbuntu website and set up the automatic 
   weekly builds. Just make sure to do the fixes branch.  

So Frontend 1 is working great with the video card installed. Able to watch LiveTV, view movies I put on the backend, record things, working great. I learned enough about NFS to connect the movie directory ont he backend machine to the frontend machine so now all the frontends can share one video library. YAY. Now its time to disconnect it from the router :)

Purchased a wirelessG card. SD channels work great, but most of the channels now transmit HD over the air. So only like 2 channels worked. All of the other ones would play for a minute, stop, play another minute, stop, etc. All the stuff online said it worked, but that was written a long time ago and probably didnt cover HD. Let me tell you right now, even in the same room 10 feet away, WirelessG will NOT work for HD channels.

More research and advice from my c-worker (thanks Erik), I came across Ethernet over Powerline. While scary sounding (don't be messing with my power) and expensive, I was too far into the project to quit now. Sure enough, it worked great! From all the power outlets that I cared about, the bandwidth was plenty.

So Frontend 1 Was now live in a room across the house. After some testing and more diddling (thats the thing with MythTV, theres always room to tweak). I will try to cover some of the more important tweaks a little later.


Frontend 2: The bad part about craigslist is that you either have uber patience to find the price/item you want, or grab what you can take. So I bought a HP 2.6GHz. Again, from reading online, 2.6GHz was marginal, but should work. Mythbuntu stated recommended for HD was 3GHz, but I waited a week or so and couldnt find another Dell Optiplex 320 for a decent price.

Anyway, install went smoothly, mythbuntu Frontend. Got it all hooked up to the backend database, started the Frontend up and...

  Issue:  2.6GHz really isnt enough for HD content.  OOPS  The CPU was maxed out.  Frontend was at like 50% CPU and xorg was the 
          other 50%
  Solution:  Get a decent AGP video card and hope that it can take some of the pressure off the CPU

So I got the AGP video card and crossed my fingers. No luck. Nothing was better. So more research. Found the playback settings and changed the playback profile to slim. Great improvement, but not there yet. Tried Xvmc. Better still, but still maxing out the CPU and causing visual issues.

So research all available optimizations of mythtv Frontends. Came across a site that suggested that you trash all the extras and install minimal Ubuntu. First, I tried not even installing gnome, only a basic window manager. Tried to get that working, but decided my technical knowledge was not enough for that (it decided for me, but thats besides the point). So exploring the menus found that it lets you install mythbuntu right from there. By this point, I was pretty tired of all this, so I went straight to installing the mythbuntu frontend option. Installed the latest drivers, kept everything else as minimal as possible.

By some miracle, the minimal mythbuntu Frontend install actually performs better than the mythbuntu install! xorg only takes up about 10% CPU now and mythFrontEnd takes from 70-80% So its barely working, but its working!

A major contributing factor may have been that I replaced the TV antenna also. We found that bad reception was very bad for the computer CPU usage :) So bought a better TV antenna and with the minimal install, its working great. Probably wasted a bunch of time with that, but I learned about the minimal install ISO and how it lets you install grub2 from there, so thats good.

Last thing on order is a 1TB Hard drive. The kids shows alone are taking about 40+G transcoded, so when the TV season starts, the adult shows are going to stretch our 80G limit.

Technical Stuff:

 Hard Drive Partitioning:   
    /       : 80G  (all updates take up disk space)
    /var/lib: 10G  (mythbuntu likes putting stuff here, but its mainly just going to be the database once you set everything up)
    /liveTV : 80G  (we are using usually 1 TV and LiveTV takes approx 40G after a night of watching.  So 2 TV might take up 80G)
    /media  : the rest (make sure to keep LiveTV and media in separate partitions. If they are on the same partition, you never 
              really know how much free space you have because LiveTV auto-expires.  So you could have 3G one day, then 30G the next)
    NOTE:  media = recordings, movies, music, etc.  If you have lots of movies or music, you may want another partition for those