Archive

Archive for 2010

Moving to MythTV Part 2 - The Frontend

April 24th, 2010

So, in the last 3 weeks I’ve done a lot with MythTV.  Most notably, I’ve finished the frontend system that is connected to our TV.  There was a lot of trial and error, frustration and an entire system replacement, but its now up and near perfect.

So, a week and a half ago Comcast got installed.  I didn’t have any of the capture cards yet, so I did more reading and checking and it turns out the Comcast boxes include firewire ports.  Despite what the installers say, they’re active on the boxes thanks to a nice FCC ruling a few years back.  With active firewire ports, I wouldn’t need to get the PVR-350.  I connected everything, following the guides from the MythTV wiki and went pretty smoothly.  Or so I thought.  I did manage to get things recording, but not reliably.  In part 3, I’ll talk about my backend configuration since I’ll be doing more with that this afternoon and I’m not done with it.  With the current setup, I have been managing to record HD programs and SD programs via firewire.  That brought me to the shortcomings on the frontend…

So after recording my first Daily Show in HD and trying to watch it, there was a lot of stuttering and artifacts on the front end.  Turns out it was the nVidia GeForce 7300GT in the frontend I had been using.  It wasn’t quite up to the task of decoding HD content.  So, a bit more reading and I found what appeared to be the perfect video card for it.  I ordered from my favorite online store and it arrived a few days later.  The card I ended up getting was a Zotec GeForce GT220.  It seems that the GT2xx series are the first nVidia based cards to allow hardware accelerated decoding of MPEG4 as well as MPEG2 content.  Additionally, the GT2xx series cards have a high quality scaler thats also in hardware.

Unfortunately, the frontend box was an old AGP based board.  That means replacing the frontend with something a bit more modern.  I managed to scrounge up a motherboard and CPU combination that would give Jessica an upgrade on her desktop machine and took her motherboard and used it for the frontend.  I took her Athlon 64 3700 (2.2GHz) and replaced it with a dual core 3.4GHz Pentium D.  After setting up the upgraded frontend hardware and connecting it to the TV, I still had issues with slowdowns.  Xvid videos had a bar on the top 10% or so of the screen that shifted everything during scenes with motion, and MPEG2 streams from Comcast had a bit of stuttering and some blurring issues.

Turns out that I hadn’t yet optimized the frontend box for the new hardware yet.  By default, the Myth frontend uses the CPU only for decoding and displaying video content.  So, I went into the configuration under Setup -> Settings -> TV Display and made a few adjustments there.  I enabled the VPDAU “Normal” profile and also turned on a few more tuning parameters since I have the GT220 card:

I added “colorspace=0,vpdaubuffersize=32,vpdauhqscaling” to the Custom Filters section.

That may have been enough, but I also did some X optimizations while I was at it.  I disabled the  Composite extension in xorg.conf:

Section “Extensions”
Option “Composite” “Disabled”
EndSection

And turned on Triple Buffering in the Device section:

Section “Device”
Identifier     “Device0″
Driver         “nvidia”
VendorName     “NVIDIA Corporation”
BoardName      “GeForce GT 220″
Option         “TripleBuffer” “True”
EndSection

One other thing is that since I’m running an AMD CPU, I needed to adjust the automatic CPU frequency scaling as well.  By default, it will drop down to 1GHz and lower the bus speed as well, which would slow down how fast the GT220 would get data.  I added this to /etc/rc.local to tell it to only take the CPU down to 1.8Ghz:

echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

All of that may have been overkill, but let me tell you, everything is perfectly smooth now. No stutters, pauses or other glitches at all now. Fast forward and rewind are the smoothest they’ve ever been, rivaling our old TiVo’s capability.

All in all, I’m extremely pleased with the frontend configuration.  Today I will be migrating from CentOS to Ubuntu 9.10 for the backend system, and then likely migrating to Ubuntu 10.4 LTS in a few weeks.

After updating the backend, I’ll post part 3 that will cover both firewire and Hauppauge setups.  When I’m “finished” with the whole setup, I’ll post detailed specs and relevant configuration files for X, and for LIRC with the TiVo peanut remote.

marc Projects

Moving to MythTV Part 1

April 3rd, 2010

Going to preface this by stating this will be a multi-part blog post, and I have no idea how many parts there will be when I’m all finished.  Oh, and like most other things I write, it will probably be really verbose.  Sorry ’bout that, its just the way I tend to write.

So, lets begin then.

This all started a couple months ago, some time in early February, I would say.  I started looking at MythTV to possibly replace our D-Link DSM-520 MediaLounge with something a bit more capable.  I set up an older box we had been using in our entertainment room as a workstation and re-tasked it to handle MythTV.  This involved quite a bit, actually.  The video card in it was an old ATI AGP card and MythTV really only works well with nVidia cards.  As luck would have it, I had an nVidia 7200 AGP card that a friend had given me a few months ago.  Perfect.  I installed MythBuntu on it and connected it to the TV.  So far so good.  I installed MythBackend on the server that is running the uPNP server and we’re off and running.  Point it at the video directories and we’re good to play videos.

Now, granted, this was all very, very, very (did I mention very?) simplified.  The whole process of the above actually took two or three weekends to get everything just right.

I managed to get an ATI remote control that I had working, but wasn’t happy with it at all.  Then I went with the Sony BD Remote for the Playstation 3 and that was okay for a couple weeks, until…..

Now, here’s the part where I break from simply the steps I took and divulge the real motivation behind the last few months of working with MythTV….

DirecTV took away our TiVo.

Allow me to repeat that.  DirecTV took away our TiVo. Give that a moment to sink in.  If you have a TiVo now, imagine how you would watch TV without it.  Not a happy thought is it.

After being a TiVo early adopter and being a happy TiVo user for the last 10 or so years, DirecTV decided they wanted to dissolve their relationship with TiVo.  Apparently, TiVo’s grahpics hardware can’t handle the MPEG-4 stream that DirecTV decided to use for their HD, so if we wanted to keep our HD programming, we needed to “upgrade” our equipment to DirecTV’s own DVR “solution”.  To be fair, DirecTV did this for “free”, which I suppose they pretty much had to do to prevent backlash from forcing an additional expense on customers without notification.  I guess that makes it a wash on the good/bad scale.

That did free up the TiVo “peanut” remote, which I ordered an IR receiver cable for and got working with the MythTV frontend with very few difficulties.  So, part one, we have videos (I’ve ripped most of our DVD’s now), and a good remote control on the myth box.

Back to DirecTV.  The DVR they installed is, how shall I put this…. I know.  A total piece of shit.  That about sums it up.

Its not that it doesn’t work, or that the picture isn’t great, its that the user interface looks like it was put together by programmers only, with no thought to usability.  Now, I’m a programmer, and I know how much trouble we can get into when left unsupervised.  But even I though this was a particular bit of nastiness.  Its laggy at best (2-3 seconds after pressing a button on the remote before it reacts sometimes), its overloaded with information on every screen, you have to drill down at least 3-5 menu options for even the simplest of tasks, buttons have multiple functions depending on what screen you’re on, there is no way to turn off the picture-in-picture when in your list of recorded shows, the remote isn’t ergonomic and the buttons aren’t well laid out, in fact you have to slide a lever to turn the TV off without turning off the DVR itself.  Coming from a TiVo’s very elegant menu system, and extremely comfort remote control, its a huge step down.

The installer even commented “you’ll hate it for the first two weeks, and then you’ll love it.”  Well that didn’t happen.  Its been about six weeks now and we still hate it.

MythTV to the rescue?

Well, not quite.  The problem with all TV providers these days is they’re worried about their content being pirated.  Well, they shouldn’t be.  My uninformed opinion is that 95% of their subscribers have no desire to, nor will they ever pirate a show.  So, why make it so hard for people like me (and all the other geeks out there) to build their own DVR?  I don’t have the answer to that.

The problem is getting the content from DirecTV into my file server in a format that my MythTV front end can deal with.  Easier said than done.  Lots of research later, I determined that to use DirecTV with MythTV, the best option is the Hauppauge HD PVR.  It takes a component input and does a real-time encoding to h.264 and allows it to be saved via a USB port.  Add a $35 serial to USB cable designed to control the DirecTV tuner and we’re golden.  In theory.

So, Jessica called DirecTV today to tell them that their DVR sucks and that we’re building our own and to convince them to send us an HD receiver, gratis.  In about two weeks, we would send them back their DVR and we would be happy DirecTV customers again.  Well, after two calls and nearly an hour of total time on the phone, DirecTV tells us that they will give us a receiver for free, but not without a technician installing it for $40-$60.  WTF?!?  I think that somehow we could manage to pull a DirecTV card out of the slot in one box and put it in the slot in the new box and plug in a couple cables.  Nope.  They weren’t going to budge on this.  Keep in mind, we’ve been DirecTV customers for the last 10-12 years.  We dropped Comcast after 5 years because they kept raising their rates every year and we got sick of it.  We’ve been pretty happy with DirecTV up until the last 2 months or so….

Soooo, we ordered Comcast this afternoon.  DirecTV can shove their DVR and customer loyalty up their ass.  Comcast is giving us a similar channel lineup compared to DirecTV, except we’ll be getting it at about $30/month less — regular price.

As a bonus, I now have more options for the MythTV backend.  I’ll probably be ordering a Hauppauge HVR-1250 in addition to the PVR.  That will give me two tuners, one for recording the local channels (and any other that isn’t encrypted) and one for recording the basic cable channels that are encrypted.  I’ll still be able to record two things at once and watch a third…

I’ll post again once the final hardware is in place and I start recording things with MythTV.  I’ll also try to post my configurations for the TiVo remote control and a final setup.  I should have most of the necessary hardware within the next two weeks.

Until then…

marc Projects