User:Jyeh

From MythTV Official Wiki
Revision as of 20:42, 12 March 2011 by Wagnerrp (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

My current setup:

  • 30" PowerSpec LCD wall-mounted display
  • an LG ATSC OTA HD-tuner with built-in upconverting DVD player
  • a Cambridge Soundworks CD 740 which acts as my "sound system" (surprisingly good bass for a tiny system)
  • rabbit ears from an old 12" tube TV that serve as my "HD-antenna" (Note that I'm able to receive more channels and stronger signals using these versus ANY of the RCA or Terk so-called "HD" antennas that cost a lot more and are usually much bulkier; these I can just put in my coat closet.)
  • a Linksys WRT54GL wireless/wired router connecting everything together (theoretically 54Mbps wireless and 10/100Mpbs wired)

What can I say? I have a small place (no room for a bigger TV or sound system), I don't have to pay any cable or satellite company every month, and everything sounds and looks great, in crystal clear HD picture quality. The only things I'm really missing are 1) ESPN and 2) a DVR. As good as MythTV is, it can probably only help me with one of those things.

My goal:

  • use as many parts and machines as I had lying around (or could get for cheap) to setup a MythTV PVR. Ultimately, I don't care if that means having a single backend/frontend combo machine or separate machines for each.
  • high WAF; system has to be easy to use, relatively quiet and most of all not too time consuming to set up (guess I'm failing that last requirement)
  • if circumstances dictate that I have a separate frontend and backend, I would like to not have the backend running 24/7 and wasting energy (for both financial and ecological reasons) but I'd also like the backend to turn on and record by itself without having to have someone around to push the power button to turn it on.

Original plan:

  • use an existing machine (with the following specs) to serve as my OTA HDTV Mythbackend (cost=$0)
    • 1Ghz AMD Athlon Thunderbird processor
    • 512MB PC2100 DDR (1 DIMM)
    • Soyo K7VME motherboard
      • VIA KM400 Northbridge
        • S3 Graphics Unichrome 2D/3D video
        • 4x/8x AGP slot
      • VIA KT8235 Southbridge
        • On-board 10/100Mpbs Ethernet
        • AC97 audio
    • 400W PSU
    • 300Gb Maxtor ATA/IDE hard-drive
    • PcHDTV_HD-5500 capture device (the only item I was going to purchase; cost=$129)
  • use an existing HP dv2000t Laptop (with the following specs) to serve as a mobile frontend (cost=$0)
    • Intel Core Duo T2300E 1.66Ghz dual-core processor
    • 2GB DDR2 PC2-5300
    • 14.1" WXGA built-in LCD (1280x800)
    • Built-in 802.11g wireless
    • Intel GMA 950 (integrated, 128MD shared)
  • perhaps consider buying some parts to build a main frontend (with DVI output) to watch live HDTV and HD-recordings on my 30" PowerSpec LCD (cost=~$200?)
  • if possible, use an existing Unslung NSLU to serve as the "master Mythbackend" MySQL db server and to "wake-up" the "slave backend(s)" as needed (cost=$0).

Here are the things that I have done (for better or worse):

  • I think I fried my SOYO K7VME motherboard; I got a visible spark from my 4-pin secondary connector which wasn't plugged in all the way and after that, I don't get any video output from the on-board S3 video OR the AGP card I ended up buying (see below)
  • Having fried the original Mythbackend candidate, the backup Mythbackend candidate was an old PowerSpec® 7445 (cost=$0) with the following specs:
    • SuperMicro® PIIISED motherboard with on-board Intel i810 video
    • 600Mhz Pentium III CPU
    • 512 MB PC100 RAM
    • D-Link 10/100Mbps ethernet card (which has a WOL header)
    • 8GB IDE hard-drive to serve as the root ('/') partition
    • 300GB ATA/IDE hard-drive (from the fried machine) to hold all the recordings
    • Obtained a WOL cable which is crucial in getting wake-on-lan working. WOL is one way that you can set up your Mythtv installation so that Mythbackends (master or slave) can be woken up (by someone else who's awake all the time) when it's time to record or watch MythTV. This cable comes with some but not all ethernet cards; finding it by itself is tough (you can forget places like Best Buy or CompUSA or even Microcenter or RadioShack) although the retail price for it should be around $2. This cable usually isn't needed for newer machines/mobos but for this 1997 PowerSpec, it is required to get waking-on-lan to work.
    • a dumb PS/2 keyboard - this is necessary even though the machine is never going to be accessed directly through the console (no monitor) because the BIOS won't boot sans interruption (sits and waits for an 'F1' key strike) without a keyboard attached.
  • Upgraded the BIOS for my SuperMicro® PIIISED motherboard to v1.3 so that the WOL & RTC options was even available.
  • Set up the new backend with a 'poweroff kernel' (see below) in the GRUB boot menu
  • Bought an EVGA Nvidia-based FX 5500 AGP card with DVI output (cost=$50).
  • Had all kinds of problems with multiple PCCHIPS mobos (all DOA) but thank goodness for Newegg and their excellent customer service. Lesson: don't use PCChips mobos.
  • ended up buying the following (along with the above FX500 video card and the 400W PSU from the machine-that-was-to-be-my-backend-but-was-fried) to create the "main frontend" (cost=$155)
    • BIOSTAR P4M80 Micro ATX Mobo
      • VIA P4M800 Northbridge
        • S3 Graphics UniChrome Pro IGP
        • 8x AGP slot
      • VIA VT8237 Southbridge
        • AC97 audio
        • VIA VT6103 10/100Mbps Ethernet
    • 1GB DDR-400 (PC3200)
    • 2.5Ghz Celeron D (Socket 478) (no HT or EMT64 support)
  • bought an OEM Pentium 4 HT processor along with some Arctic Silver CPU/Heatsink grease when I discovered that a 2.5Ghz Celeron wouldn't be sufficient (cost = $80)

The good news:

  • Got the 600Mhz P3 backup Mythbackend candidate to work as a backend using both KnoppMyth and Ubuntu Feisty Beta. It records HDTV fine.
    • I prefer Ubuntu Feisty because I'm more familiar with Ubuntu and I can install other packages to help me debug things. In KnoppMyth, things broke after I tried "apt-get update/upgrade/install".
  • The Ubuntu MythTV Feisty installation guides (for different combos of frontends/Mythbackends) are really quite good for getting the nVidia & PcHDTV_HD-5500 cards setup. Note: if you are using Feisty, use the 'real' ones from the Ubuntu Help community (instead of the ones on the MythTV wiki): Ubuntu 7.04 (Feisty Fawn) Binary Installation - The official guide for setting up MythTV in Ubuntu 7.04 (Feisty Fawn)
  • Got the 2.5Ghz "main frontend" candidate up with Ubuntu Feisty Beta and got the MythTV and nVidia drivers installed and output to my 30" LCD without too much trouble.
  • Swapped out the 2.5 Ghz Celeron D with a 3.0 Ghz Pentium 4 (with HT) and at first it made no difference (still seemed like ALL the processing was loaded on the CPU and none of it handled by the GPU), but then I found the wonderful section of the XvMC page where it talks about adding the "UseEvents" option for nVidia cards (under the "Tips and Tricks" section). Adding the following to your xorg.conf under the "Device" section helps tremendously (CPU utilization went down from about 99% to about 50%):
Option "UseEvents"  "true"
  • Got my two-machine MythTV setup working so that the Mythbackend is truly headless & handless (no video, no keyboard, no mouse). Mythbackend can be woken up remotely. frontend boots up quickly and plays full HD content on the LCD TV well. As long as I don't too much more tinkering, WAF is high.
  • Got MySQL on my NSLU2 with Unslung 6.8.

The bad news:

  • Not to belabor the point, but I really wish I hadn't unnecessarily fried my 1Ghz Athlon mobo. While I did find a suitable replacement, running at 1Ghz would have been nice so I wouldn't be so paranoid that a 600Mhz isn't fast enough to run a full backend (HD-stream capture, MySQL, Commercial_Flagging AND transcoding). Also the 600Mhz machine was built 1999 so it's BIOS isn't Linux-ACPI compatible, so I may not be able to get the darned thing to shutdown/startup by itself.
  • 600Mhz may be fine for capturing and HD stream on the backend but I had to turn mythcommflag and mythtranscode off because they were taking FOREVER. I may turn them back on just to see how long it takes but I was having other problems so I wanted to "unload" my Mythbackend as much as possible.
  • 2.5Ghz Celeron D is NOT fast enough to act as a frontend without XvMC. To be fair, I never got XvMC working properly (see below). The video and audio stutter quite a bit and it isn't watchable. Adding the "UseEvents" option to my xorg.conf file (see above entry in the "good news" section) reduced the CPU utilization from 100% to around 60% for the Celeron D, but it still stuttered horribly. Moral of the story: unless you can get XvMC working, choose a 3.0 Ghz Pentium 4 or greater to be your frontend (can probably run both a combined frontend / Mythbackend with those specs).
  • Could never get XvMC to actually 'improve' performance. The main frontend had a decent amount of stuttering without XvMC enabled but with it enabled, things slowed down to a ridiculous pace maybe 1/4-to-1/8 speed. At first I couldn't get XvMC enabled (absolutely no difference no matter which value chosen for "Preferred MPEG2 Decoder") but then I found this: https://help.ubuntu.com/community/MythTV/Install/WhatNext/Feisty?action=show&redirect=MythTV%2FInstall%2FWhatNext%2FFesity#head-81c5ddee6432b0f30137b63a25595a9a927a7461 So now my /etc/X11/XvMCConfig looks like this:
 libXvMCNVIDIA_dynamic.so.1

After that, I could see it was trying to use XvMC (grey-OSD instead of blue) but things looked (and sounded) much worse (audio and video stutter that's worse than with the "standard" MPEG2 Decoder. I concede that I may not have set things up with XvMC, but I am using an Nvidia graphics card and the Nvidia (not nv) driver (NVIDIA splash screen shows up). I even tried setting the "NvAGP" option to "true/1" but I think it's still using the AGPGART module, which may be the problem. I tried adding "agp=off" during boot and blacklisting the agpgart module but it still looks like the AGPGART module being used.

  • Also could never get HD (with or without XvMC) to display on the "mobile frontend" laptop with its Intel 950 integrated video. The SD sub-channels look and sound OK (some stuttering but not too much) but as soon as an HD channel was chosen, the screen would turn show a 16x9 block of blue, although I would still get sound. On note is that I'm running Ubuntu Dapper on this mobile frontend laptop; perhaps upgrading it to Feisty would help.

Things I've learned:

  • Overall, if you have the right hardware and setup, KnoppMyth will probably get you up and running the fastest. However, I prefer using Ubuntu Feisty: the documentation is pretty clear and I get a better idea of how everything is put together without having to compile stuff.
  • if you have a PcHDTV_HD-5500 ATSC/DVB capture card (or any cx88-based card), don't even try with an Linux kernel less than 2.6.18. Currently, Dapper and Edgy don't meet this requirement and it could never find my HD-5500 and I didn't feel like building stuff from source. I'm assuming that's the main reason that KnoppMyth RE50 and Ubuntu Feisty worked.
  • frying a mobo is easier than I would have thought...
  • The Ubuntu community page recommended using XFS as the filesystem to store recordings (/var/lib for Ubuntu setups, /myth for KnoppMyth). Here's a page for changing the filesystem for a KnoppMyth installation: http://www.knoppmythwiki.org/index.php?page=Filesystem+switch
  • MythTV HDTV minimum CPU requirements (I haven't seen this published anywhere on the internet so hopefully this will be usefuly to someone):
    • MythTV HDTV frontend minimum CPU requirements - 3Ghz is the minimum clockspeed for HD playback of MythTV content without using XvMC. Stutters for a moment on channel change, but as smooth as butter after that.
    • MythTV HDTV backend minimum CPU requirements - this isn't necessarily a lower bound, but a 600Mhz Pentium III will work fine as an HDTV Mythbackend-only machine and unless you don't mind keeping that Mythbackend running 24/7, you should probably turn off Commercial_Flagging and transcoding if you're using a machine this slow or slower. It doesn't seem to me that an HDTV MythTV backend requires a whole lot of CPU or memory since the MPEG-2 stream comes in raw and requires no decoding; it just gets written to disk. It'd be interesting to see how low you can go (will a Pentium I work? how about an 266Mhz NSLU2 ARM?) and still get it to work.
  • To use WOL, you:
    • Must have another machine or device that is on all the time (or at least whenever you need to wake-up your recording Mythbackend) to issue the WOL command to your recording Mythbackend). In my case, either my WRT54GL w/ HyperWrt (Thibor) firmware or my NSLU2 with Unslung 6.8 or Debian/NSLU firmware can send those packets, since they will be on 24/7, consuming very lower power.
    • Must have a WOL-able motherboard and BIOS in order to enable WOL. If your board is advertised as WOL-capable but you can't find the option on your BIOS, you may need to upgrade your BIOS if such an upgrade is available.
    • Must use 'ethtool' to "reset" your motherboard to accept WOL magic-packets to wake-up. Please read this to understand how 'ethtool' and your BIOS work together to enable waking-on-lan: http://ubuntuforums.org/showthread.php?p=2365049
    • Might need a WOL cable if your motherboard has a three-pin WOL header (not every motherboard has this; if your motherboard & BIOS are WOL-capable and you do not have this WOL header, then your probably don't need the WOL cable). If you have one of these motherboards that has a WOL header then you'll also need an Ethernet card that has the same three-pin WOL header on the card (again, not every Ethernet card has this three-pin WOL header so if your motherboard requires it, shop carefully). I may be wrong but I don't think any Gigabit (1000 Mbps) ethernet cards require the cable as most Gigabit cards are PCI 2.2 comliant. Again, just to be clear: if your motherboard requires the WOL cable, you'll need to a find an Ethernet card that uses the cable which may limit your choices. If you can choose/change your motherboard, I think almost any PCI Ethernet card (whether it has the three-pin WOL header or not) can be used.
    • Might need to use the 'poweroff kernel', particularly if the motherboard/machine is a bit older (as is the case with my SuperMicro PIIISED mobo which was built circa '97-99). Symptoms of this would be that you can "wake-up" the machine (it has power) but you get it's in a "coma" (no signal to video, keyboard and no hard-drive activity). To understand how to set up the 'poweroff kernel' (basically, the "shutdown" command become a "reboot" into a special kernel that does only one thing: powers the machine off) go here: https://help.ubuntu.com/community/MythTV/Install/WhatNext/ACPIWake#head-0083e6cd1a1fd835d120a8138a783aba52952cfe BTW, I happen to this is a neat fix (some would say hack) to get around the issue elegantly, using the grub-set-default command.
  • If you don't have a small, programmable lower-power device (like an NSLU2 NAS or a WRT54GL router) that is on 24/7 and you don't want ANOTHER full-sized machine turned-on 24/7 just to wake-up your recording Mythbackend you'll probably want to use ACPI (if your motherboard supports it) to set the wake-up alarm on the BIOS to wake you up at a certain time. As it turns out the ACPI wake-on-RTC (real-time clock) works fine for my SuperMicro PIIISED mobo. Unforunately, it doesn't work with the 'poweroff kernel'. Basically what this means is that when I shut down my Mythbackend I have to decide at that time how it's going to be woken up, either by WOL (by issuing a 'reboot' and then after going through the BIOS boot cycle and defaulting to the 'power off' kernel) or by setting the RTC alarm and shutting down normally so that it will use ACPI to wake-up. Kind of annoying as I would like my Mythbackend to be able to woken up by either method (WOL when someone turns on the frontend and wants to watch TV or RTC when it's time to record but no is currently watching TV). I assume there is some way to add some grub command to set the RTC alarm time so I can always use the 'poweroff kernel' but I haven't found anything yet. Look here for a good page on ACPI-wake-ups: https://help.ubuntu.com/community/MythTV/Install/WhatNext/ACPIWake
  • I'm thinking that instead of using Unslung 6.8 firmware on my NSLU2 and trying to piece stuff together to make it a Master Backend (MBE), perhaps I should take the time to flash it with the Debian/NSLU2 OS, esp. since Debian "Etch" has just been released. It may make it easier, since I'm familiar with "apt-get" and there seeme to be some good documentation on getting MythTV on Debian working. Of course, if I switch to Debian (fully-free) I lose the full-NTFS support of my NSLU2 (using the commercial Paragon NTFS drivers), but that's probably ok since I have another Unslung NSLU2 and who needs %$#@$^!! NTFS support anyway? (OK, actually, as much as I dislike Micro$oft and even the performance of NTFS, realistically speaking, I have to use XP for work and some things still require it.) Unfortunately, the mythtv packages in debian are not built for the ARM architecture (at least not yet). What's interesting is that I don't need a 'full' mythtv backend executable since I don't have any tuners on the NSLU; I basically just want my master backend NSLU2 to be on 24/7 running the MySQL database (which is easy enough to figure out), the scheduler to wake-up slave backends when it's time to record and the MythWeb so that I can always see what's on TV and going to be scheduled and make schedule changes.
  • In case you haven't noticed, I'm very partial to Ubuntu and I really like how they separated the MythTV packages into distinct packages (mythtv-backend-master, mythtv-backend, mythtv-frontend and mythtv). This makes it usable and efficient for every type of MythTV installation (combined backend/frontend, separate single backend, separate multiple backends, etc.) unlike most of the other MythTV packages for other Linux flavors (e.g. - Fedora, Debian, Knoppix).

Things I still can't figure out:

  • still can't get a definitive answer on what are the minimum specs needed for a HD-capable frontend. For instance, 2.66Ghz Pentium Ds (dual-core) are cheaper than 3.2Ghz Pentium 4s. But I've read that 64-bits doesn't really help much (if any) over 32-bit processing. And I've read that having dual cores doesn't really help MythTV because it's not multithreaded. While I know that to display MythTV the front-end is certainly running more than one process, I'm assuming that the main process for displaying HD-content isn't multithreaded. So I guess my quesiton is, which would be better, a 2.66Ghz dual-core 64-bit Pentium D or a 3.2Ghz single-core 32-bit Pentium 4? Something tells me the answer is the latter.
  • somehow a 2.5Ghz Celeron D is just a bit too slow to display MythTV HD-content, even though it can sufficiently playback the recorded HD mpeg file using xine (with a few frames dropped here and there). So what's making the MythTV playback so choppy in comparison to playing the same mpeg file locally using xine? I wouldn't think that the 100Mpbs connections to the router would be the source of the bottleneck. Strange...
  • similarly, the 1.66Ghz Core Duo can playback an HD mpeg file in Windows, so why can't it work as the MythTV frontend? (Note I couldn't try using xine to playback that same HD mpeg file in Ubuntu Dapper because there is a known bug about that; when I upgrade this laptop to Feisty I'll try playing an HD mpeg using xine and report my results.)
  • from what I can gather (and please correct me if I'm wrong) MythTV doesn't use NFS (at least not anymore) for streaming Live TV or recordings from the backend to the frontend. Instead it uses its own "Myth Protocol". It does use NFS to allow for "diskless" front-ends (like KnoppMyth's frontend option) and for serving video and music using MythVideo and MythMusic (although I do think I remember seeing some NFS lock files in my recordings directory in KnoppMyth). I wonder if the Myth Protocol is more efficient than NFS for streaming Live TV or recordings. I don't think I can easily switch from the Myth Protocol to NFS as the streaming protocol (at least not without severe tinkering and possibly building from source).

Things still to do

  • try to get XvMC to work with my hardware, although now this is not a real high priority since I get HDTV working fine.
  • moving the MySQL database to my Unslung (v6.8) NSLU and trying to get it to issue ACPI_Wakeup commands to wake-up the slave-Mythbackend or even better yet, moving the Debian/NSLU2 and installing Debian Etch so can install MythTV packages natively.
  • figure out if there are any benefits for MythTV (either on frontend or Mythbackend) to having 64-bit processing, hyper-threading and/or multi-core processors over normal single-core 32-bit processing or if it's all just about the CPU speed (Ghz).
  • add a DVD+/-R to utilize MythArchive and save off HD content to DVDs.
  • turn transcoding and commercial flagging back on (but maybe not until the 600Mhz PIII backend gets upgraded and can handle it)