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

Remote Desktop on Xubuntu 9.10

November 25th, 2009

So I was planning to work from home on the Friday after thanksgiving so I wanted to be able to access my work desktop from home just in case.  Normally I just ssh and use terminals and such, but for some reason I decided I wanted a full desktop.  I use Xubuntu at home and at the office, and there is no default VNC setup like there is with Ubuntu and Kubuntu.  A couple of quick Google searches and I came across this post:

vincentkong.com » Blog Archive » Remote Desktop on Xubuntu.

It pointed me in exactly the right direction.  Just a few package differences for Xubuntu 9.10.

Here are the steps I used:

Install VNC Server and tools

$ sudo apt-get install x11vnc vnc4-common

Once the tools are installed, setup a password for the VNC server:

$ sudo vncpasswd /root/.vncpasswd

Install and configure xinetd

$ sudo apt-get install xinetd

Now, enable the vnc service via a new xinetd.conf using whatever text editor you like, I prefer vim.

$ sudo vim /etc/xinetd.d/x11vnc

service x11vnc
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg -rfbauth /root/.vncpasswd
disable = no
}

Finally, restart xinetd.conf:

$ sudo /etc/init.d/xinetd restart

You should now be able to connect with a VNC Viewer.  Under Xubuntu I prefer the vinagre package.

$ sudo apt-get install vinagre

Thats it.  Thanks much to Vincent for his initial post.  This helped me tremendously.

marc Projects ,

Absurd new 419 scam

July 23rd, 2009

I guess that now that everyone knows what a Nigerian 419 scam is, its time for the scammers to take a new approach.  I had an uncontrollable burst of laughter when I read this one, I’m sure its old news to spam-fighters, but I’d never seen it before:

From:  EFCC <faridawaziri83@rocketmail.com>
Reply-To: mrsfaridawaziri1@centrum.cz
Subject: EFCC
Date: 09-07-22 06:24 PM

Hello,

I am the boss of economic & financial crimes commission, we fight
cyber crime fraud scam money laundering in Africa. Our commission has been
in existences since 2004.

Our duties are to stop internet fraud scam. As for today we have put a lot
of fraudsters behind bars.

we have recovered over $322 million from them, reason for writing you this
letter is because your name was given to us by one of the fraudsters in the
jail.
Get back to us.

Thats just awesome in the  “What, are you kidding?” department.   Despite how absurdly funny I think it is, there are people out there that will get hooked by it, and they probably live in Florida.

marc Uncategorized

Fedora out, Xubuntu in

June 21st, 2009

The number of minor annoyances in Fedora 11 turned into a major annoyance.  Last Saturday I wiped Fedora 11 from my home machine and installed Xubntu, which is the Xfce-centric Ubuntu distribution.  I did the same on my office machine on Wednesday.

Overall, I’m quite pleased with Xubuntu and Ubuntu in general.  For the most part, everything just works.  The Synaptic package manager made the installation of most things pretty painless.  I’ve installed all of my “non-standard” apps without having to first find the right repository, then hope that there aren’t conflicts, and then fight with different versions of things because there were conflicts, etc.  Everything that I use on a normal basis is in one of the repositories that Ubuntu has included.  On Fedora I always had to fight with them.  I didn’t realize just how many extra steps there were in Fedora until I didn’t have to do them.

The extra software that I normally install (either at home or at the office) include:

  • Synergy - For letting me use a single mouse and keyboard on several computers and monitors.  This makes moving back and forth from my Windows machine a matter of moving my mouse off to the left edge of my screen.  Shared clipboard and all.  Can’t live without it.
  • Motion - For grabbing web-cam images and saving them when it only detects changes in the image.  In Fedora this was a huge pain.
  • Nvidia proprietary drivers.  An optional part of the Ubuntu install, but incredibly easy.  Just told it to search for hardware drivers from the menu, and there it was.  No muss, no fuss.
  • Logitech G15 keyboard daemon.  Ubuntu got this out of the box.
  • XCache and APC for PHP.
  • Conky
  • Mplayer codecs
  • MP3 support

I’m sure there were others, but those are just the ones I can think of off the top of my head.  There is still room for improvement, of course, but the ease of use, the sane dependency checking in Synaptic/apt-get, and the huge repositories (mutliverse/universe) meant that I didn’t spend two days downloading, compiling, and keeping my fingers crossed just to get a system I could work on.

My time from install to productivity with Xubuntu was less than a few hours.  Very impressive and well polished.

marc Reviews