Archive for the ‘MythTV’ Category:
Compile Lirc on an AOpen mp945-dr with Ubuntu
I recently traded in my Mac Mini for a AOpen mp945-dr to see if it would work any better with MythTV and Boxee. I started off with Ubuntu 8.10 installed but found some random problems with video not displaying every time the computer would start so I went back to 8.04. On problem I had with both installations was that the remote sensor did not work out of the box. I did some digging and found that Lirc does work with this machine but the latest development branch was not included in Ubuntu for stability reasons. Here are the steps I had to take to get the remote sensor working.
As a overview we are going to:
1. Download the tools needed to compile software in Ubuntu.
2. Download the latest version of Lirc using CVS
3. Compile Lirc source
4. Test it real fast to make sure it works.
1. Download the needed compiling tools.
sudo su
apt-get install libtool autoconf automake linux-headers-`uname -r`-generic cvs
This will download and install the compiling tools.
2. Download Lirc
First lets make a folder to put it in
mkdir ~/lirc
cd ~/lirc
Then we will download the newest source from sourceforge. We are using a tool called CVS to read more about it check out here.
cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login
cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc
Because we ran that command while in the ~/lirc folder everything downloaded there so we just need to run the commands to configure everything before we build it.
./autogen.sh
./setup.sh
In the graphical interface I selected Driver config > USB > mceusb2 (new)
Then continue with compiling
make
make install
modprobe lirc-mceusb2
Because Ubuntu does things slightly different we need to copy a couple files to where Lirc expects them to be.
cp /lib/modules/`uname -r`-generic/misc/lirc_dev.ko /lib/modules/`uname -r`-generic/ubuntu/media/lirc/lirc_dev
cp /lib/modules/`uname -r`-generic/misc/lirc_mceusb2.ko /lib/modules/`uname -r`-generic/ubuntu/media/lirc/lirc_mceusb2
Then we can continue with installing the new Lirc into the running kernel.
rmmod lirc_mceusb2
rmmod lirc_dev
lsmod|grep lirc
/etc/init.d/lirc restart
Everything should be compiled and in place now.
4. To test it out run
irw
and then push some buttons on the remote. You should see the commands you press displayed in the terminal. If you see that then you can just push Ctrl+C to stop irw and you should be all set to go.
I had to change this tutorial slightly from where I originally posted it in the Ubuntu forums so that it would be more universal. If you have problems please leave a comment and check out the original thread here.
I hope this helps.
Well that was stupid…easy MythTV fixes
Just a real quick tip for anyone having problems watching live TV or recording shows in MythTV. After a fairly fresh install I could not watch live TV. My screen would go black for a second and I would be kicked back to the main menu. I also was not able to record shows. The recording would show up on the schedule but nothing would happen when the time to record would actually come. So my tip is check your log files!!! They are stored in /var/log/mythtv (at least they are in ubuntu). You should have mythbackend.log*, mythwelcom.log, and mythfrontend.log* in that directory. The log files are incremented making the highest number the oldest file and the one without a number your newest file. So check the newest file first.
As for my problem I checked my frontend log first, but I didn’t see much information besides the fact that I changed skins. So I decided to check the backend. Here is what I found.
2008-11-23 10:26:22.432 TFW, Error: Opening file '/media/mythtv/recordings/1941_20081123102621.mpg'.
eno: Permission denied (13)
2008-11-23 10:26:22.436 TVRec(1) Error: RingBuffer '/media/mythtv/recordings/1941_20081123102621.mpg' not open...
2008-11-23 10:26:22.437 TVRec(1) Error: CreateLiveTVRingBuffer() failed
2008-11-23 10:26:22.438 TVRec(1) Error: Failed to create RingBuffer 1
Now this may not be too obvious to most people but take a look at “Permission denied (13)”. DOH! I forgot to give my user permissions to the directory I set up to record my shows in (as well as my live TV folder).
sudo chmod 777 /media/mythtv/*
and now I am able to watch live TV and record whatever shows I feel like.
Just thought I would save you the hassle if this happens to you.
Why the Mac Mini sucks for MythTV/PVR
I bought the mac mini for a few reasons:
1. It is very small and very quiet
2. It looks good with my AV equipment
3. There are a lot of accessories that match the looks of the mini
4. It came with good enough specs for video playback and recording
The main problem I had was dealing with the small/slow hard drive. So I wanted to upgrade that but here are some of the things I ran into.
First of all, the Mac Mini had almost everything I wanted (and some things I didn’t care about) built in. I wouldn’t need to add any features to the device unlike other small computers I was looking at. Most other small computers came with almost everything I needed except one or two thing, built in IR for a remote or firewire. These were requirements for me. I know I could have used a USB -> IR adapter but I wanted this computer to look a little less DIY than my last MythTV. And not having firewire seemed too complicated to try and add my own through expensive adapters.
My goal for the Mac Mini was to upgrade the internal hard drive and use an external 1 TB drive.
The reason for this was storage and speed. The internal hard drive in the Mac Mini is only 5400 rpm and while that works fine for web pages and word documents, when reading and writing large media files all day it just would not be fast enough for the task. One option was to install the OS on the internal hard drive and use a external hard drive just for storage over USB but the CPU overhead of USB and the read/write speeds would just not cut it (internal SATA II is over 6 times faster than USB 2.0/Firewire 400). There also is no firewire 800 port so that wouldn’t work either. I tried following a walk through that someone else already did with a mini hard drive upgrade but apparently Apple has updated their device since this was done and adding a hard drive the same way is no longer possible. If this worked for you on a post Nov 2007 Mac Mini please let me know in the comments. The problem I had was the Mac Mini would never detect any hard drive outside of the chassis. I tried with multiple cables, hard drives (2.5″ and 3.5″) but never once was able to get OSX or Ubuntu installed on the bigger hard drive.
To break it down, the reasons the Mac Mini actually sucks for building your own PVR are these.
1. Slow (low storage) hard drive
2. Expensive features that are not needed but you don’t have a option but pay for. (OSX, iLife, Apple tax, etc.)
3. Hard to upgrade processor and memory
And these are the reasons I picked the AOpen over the Mac Mini.
Mac Mini uses a older 945GM chipset with 667 Mhz vs. GM45 chipset with 1066 Mhz, it uses a more power hungry 65nm (T5600/T7200) processor vs. 45nm (T8100 or any socket p processor you want), and GMA950 GPU vs. GMA X3100. Not really big deals considering both should have the ability to play back most 1080p content. But having updated specs just make things a little easier, and the ability to upgrade helps make the PVR future proof…well almost.
For anyone interested, here are some pictures of the steps I took to make the Mac Mini NOT work with an external eSATA 1 TB hard drive.
![]() |
Sata to eSATA adapter. I was sent the wrong adapter and Microbarn would not accept the fact that this was a female SATA to male eSATA cable when I needed male to male. Even after sending them this picture. P.S. don’t order this, order this. |
![]() |
Adapter plugged into the Mac Mini SATA riser card with a male to male sata adapter I had to buy extra thanks to Microbarn. Maybe I just don’t understand male and female connectors. |
![]() |
SATA cable run inside the case. This wasn’t as hard as I thought it would be. See the picture above for what it looked like coming out of a slightly modified Kensington lock hole. |
Let me know how a Mac Mini is working out for you as a PVR or what other machine you bought as a substitute in the comments.
MythTV…another build
So I have really been missing the ability to record/rewind/pause TV. I haven’t had a full time MythTV box for over a year and a half. I sold my old MythTV computer and had been saving the money till something perfect came out to use as a fast and quiet MythTV computer and samba server. I actually bought a Mac mini about 2 months ago in an effort to get it working with a external hard drive for speed and storage. Needless to say, Apple did a good job of making the Mac mini too annoying to try and get it to work the way I wanted it to. I will post a little on my experience there later.
So I returned the mini and found the AOpen mp45-dr. It is about the same size as the mac mini (technically smaller) and it came bare bones. This is great because I could either get the same specs as the mini for cheaper or I could improve the parts I wanted to improve and not get the “features” I didn’t need (like internal wifi or internal laptop hard drive). Unfortunately, the mp45 had one thing I really needed to complete my HTPC, firewire. I looked around to see if I could get firewire out of the eSATA port or one of the two internal PCIe mini ports but I couldn’t find anything that would work the way I wanted and I needed firewire to record premium HD shows from my cable STB. So I found the mp945-dr which is just the older model of the same computer. It looks almost exactly the same but has a slightly slower video card, no eSATA port, and slower chipset (which included a slower FSB). When I really looked at it though, the parts it came with would be plenty for what I needed and so I used the money from my MythTV sale (and a few other side projects) and bought the AOpen mp965-dr.
Here is my build.
AOpen mp965-dr (from Buy.com)
Intel Core 2 Duo T8100 (from newegg)
2GB Kingston Ram (from newegg)
WinTV-HVR-950 Tuner (from newegg)
1TB ministack v3 (from other world computing)
Sata -> eSATA cable (from mwave)
I also already had a HDHomerun tuner and firewire cable for a tuner from my STB.
I am excited to get this up and running again and will post my build as time goes on. Here is a quick rundown/reference to the sections I will be writing. I will update these later with links.
Part 1: Setting up the hardware
Part 2: Choosing the software
Part 3: Setting up software
Part 4: Using the machine day to day
Buying a NAS part III
Ok, it has been quite a while since my first two articles on this (Part 1 and Part 2) and I wanted to post a little update on my situation. I haven’t worked on my linkstation hard drive because I decided to go a slightly different route. Ultimately, I want something that has some sort of RAID set up for backup purposes but at this time I don’t have the time, money, or space for such a device. Instead I decided to use my MythTV computer as my network storage device on top of its current PVR functions. Because MythTV will be a full computer it will have a lot more features and options I can use to configure and set up the NAS exactly as I want. This will also mean that I only have to have one device on at all times instead of my originally planned 2 devices which will save a bit of money in power bills. I finally have a computer that is going to work for my new MythTV setup (more on that to come) so as I get that configured I hope to post some more how-to’s on my quest for the perfect cheap NAS solution.
Just so I get some of my goals in place here are my current needs for the NAS setup.
-
1. Separate users to allow read only access to certain folders and write permissions to others.
2. At least 500 GB.
3. Upnp server to allow easy playback on my PS3, XBMC, WMP, etc.
4. Under $300. While this is still a goal it is going to be quite skewed with my budget for my MythTV computer. I will try to add all the cost up correctly though.
Two more items were on my list from my first posting so I will echo them here as well.
-
5. Be able to connect to a ethernet network without adapters. This won’t be a problem at all because my MythTV computer will be plugged into the network at all times.
6. Low power consumption. While the MythTV computer will draw more power than my original Linkstation, the ability to get rid of the Linkstation in favor for just having one device will defiantly save power over having both devices turned on at all times.
So I haven’t given up on getting my NAS up and running but my plans changed a little. For now the Linkstation still gets used every day and it is helping a lot with temporary storage. I will keep the site update with my install notes and what has worked for me.
Knoppmyth R5E50 Backend won’t start after reboot
I have been running into a problem for a little while and I could not figure it out (not that I expected to figure it out on my own but I thought I could search for it). What happens is if you force the computer to shutdown (hold the power button) of if the video has an error while displaying and you reboot, your mythtv-backend will not restart after rebooting. Well thanks to the knowledgable users of Knoppmyth there is a fix in the forums.
You need to be root and you edit the following things.
edit \etc\init.d\mythtv-backend and change
start)
to
startold)and
restart|force-reload)
to
start|restart|force-reload)You will get a little warning from it on startup because you will now be doing the restart code on startup.
That is all I have done and so far it looks like it worked. I will update this if I have something break because of this fix.
What I have tried… (part 2)
Continued from here (sorta). At least the titles are the same.
After a break from Mythtv I decided I needed to change some things. I needed to be able to watch and record HDTV. I thought this would not be very difficult at first. I soon found out I was very wrong.
Step 1: Computer
Processor
The first thing HDTV needs is a lot of processing power. Most of the Mythtv documentation says you can watch live HDTV on as low as a 2.4 Pentium 4. This depends a lot on how much you know about linux and how much you can shave the operating system down and get a good enough video card. It also helps if you run a backend and frontend on different machines. As soon as you get a 3.2 Pentium 4 or above you shouldn’t have any problems but you will also need a couple of other things if you are going to have other things going on (such as more tuners). I currently have a P4 3.0 and HD shows well as long as I am not doing anything else on the computer and there is no overlay over the picture.
RAM as much as this doesn’t seem like it matters it does. With 2 HD tuners you will probably want at least 512 Mb of ram and possibly more. I currently have 1GB of ram but I am not sure if less ram would affect the playback very much as it would the system loading/responding.
Video card From experience I would recommend a Nvidia video card. If you want a quiet system you can find FX 6200’s without fans and also half height. This is what I am using right now in one of my frontends and it only cost me about $40 (I probably could have found it a bit cheaper but I didn’t look around much). The 5600’s are a bit more supported by Nvidia drivers at this time but I wanted the best half height video card I could get. The best thing about the Nvidia cards is you will be able to offload some of the HD decoding to the video card (XvMC). At least that is what I thought at first. I know now that XvMC can’t do much with a HD frame because it is too big. This leaves all of your video encoding and decoding on the processor. Once again a it is a really good Idea to get at least a P4 3.0. I would recommend a processor with Hyperthreadding or multiple cores at this point because even a plane P4 in my machine seems to be having problems at times.
Step 2: Pick a card, not just any card.
So starting from scratch, what HD hardware encoding cards are available for Linux?
1. pchdtv - This tuner was designed for linux by linux users. The tuner has gone through quite a few changes from the first pchd2000 card but it is still a great card made specifically for linux pvr software. One downfall of this card is its price. Because the card is made by hobbyists it cannot be as cheap and as available as some of the other cards that are made by large companies. The best part about these cards is the fact that you can know you will always have support from the linux community with this card.
2. Air2pc - This is a bit of an older card from what I have found but it has been the longest supported HD card in Mythtv. I have never had the joy of using this card but I know when I first got my FusionHDTV card most people had this card instead. From what I can tell the support on this card is about the same as the Fusion card but the QAM doesn’t work as well with this card (if at all)
3. FusionHDTV - I had this card for a little while and loved it. The one I bought came with a remote and it also had Compontent inputs which was great for playing and recording Halo. The card had great QAM support and had decent OTA reception. A couple of things I did not like with this card were the fact that it seemed to take a little time to change channels but with only a handful of digital channels that isn’t always a big deal. And the fact that it took up a PCI slot was kind of a bummer if you only had 2 slots. The time this card came out there was no other option though because USB HD cards were slim to none and there was nothing else out there. Then came the HDHomerun.
4. HDHomerun - This is just a cool device in general. Take a tuner card and make it available to any computer on the network. Then make it so you can control it from any computer on the network and then make it 2 tuners. That is basically what you get with the HDHR. It is its own class of device. This is not a PCI tuner, it is not a USB tuner, it is a network attached tuner that you just plug in two coax cables, nework, and power and you are set. The tuner is not as supported as some of the other tuners but it makes up for it with updates that come out at least once a month (so far). I haven’t been able to test with this tuner as much as I would like to so far but from what I have used it is great. HD wirelessly to my laptop is just a great, great thing.
Step 3: Picture is nice, but what about sound?
I am still working on good surround sound to work in linux. I haven’t tried much but I know the Turtle beach mirco usb sound card hasn’t been working well for me. This will have to be continued at another time when I can figure out something that works well for me.
Step 4: Controls
You have many options for controls but obviously most people want a remote to do all of their bidding. I still don’t have a remote so I have just been using my wireless keyboard. I will continue this once I do get a remote but for now I will give you the keyboard controls for mythtv.
More Mythtv
Alright, I am back at it and getting closer to being satisfyed. First of all I would like to give a line to a new site I have found thanks to a comment left on one of my other posts. Mythpvr is one of my new favorites for searching, news, and setup of mythtv. They even have some cool screencasts of setting up mythtv and I am sure there is more to come. All I have to say is thanks a lot for making me read another RSS feed. WhereTF is the RSS feed? Even my crappy sites has RSS!! Oh well, still posting a link to the RSS feed in my comments. Mythpvr.com is a good resource for understanding what Mythtv is and all it can do.
Now onto what I have found in the past week. BTW If you are just starting out and going to install mythtv. Do yourself a favor and install onenote (or some other note taking software) on another computer and take notes of everything you do. I really wish I had done that in the beginning because now I have to track down all the changes I made over a year ago.
So I install knoppmyth again and this time I have a bit more sucess because NVIDIA drivers are working once again. I found the following instructions in the knoppmyth forum so feel free to follow the link to read the original.
First you will want to do this (copied from another section of the forum)
wget ftp://knoppmyth.net/R5/linux-source-2.6.18-chw-13_2.6.18-chw-13-10.00.Custom_all.deb
dpkg -i linux-source-2.6.18-chw-13_2.6.18-chw-13-10.00.Custom_all.deb
cd /usr/src
tar xjvf linux-source
Then follow the instructions from the forum
follow the directions in the above post so that you have the /usr/src/linux-source-2.6.18-chw-13 directory. Now perform the following:cd /usr/src/linux-headers-2.6.18-chw-13
cp -r . ../linux-source-2.6.18-chw-13This merges the kernel-headers with the kernel-source, since the source by itself doesn’t have the configuration files that were used.
Next, on my system at least, I had to at least partially make the kernel again, because certain kernel module scripts weren’t in a usable state until you did that. So I did the following:
cd /usr/src/linux-source-2.6.18-chw-13
make
[wait about 20 seconds and then hit ctrl-c]Now we’re ready to install the new driver. The easiest way to do this is the rename the startx script and reboot so that X is not even trying to boot up.
mv /usr/bin/startx /usr/bin/startx.save
rebootFor some reason the NVidia install script isn’t yanking out the original nvidia kernel module, so I manually pulled it out with this command:
rmmod nvidia
lsmod | grep nvidiaThe second command will let you verify that you no longer have the module loaded.
Now we’re actually ready to run the binary package from NVidia. It doesn’t quite detect everything correctly, so issue the command as such:
First you need the NVidia driver package though so run this command
wget http://us.download.nvidia.com/XFree86/Linux-x86/1.0-9746/NVIDIA-Linux-x86-1.0-9746-pkg1.run
Then carry on where we left off
sh NVIDIA-Linux-x86-1.0-9746-pkg1.run \
–kernel-source-path=/usr/src/linux-source-2.6.18-chw-13You will most likely get a message during the installation process that it had to make assumptions about the paths for X.org. The assumptions that it made are fine.
Once the installer is finished you should be able to safely start X back up, but don’t forget to rename your startx executable.
mv /usr/bin/startx.save /usr/bin/startx
As always, check the /var/log/Xorg.0.log file for hints as to what the problem may be. That’s how I figured out that the original kernel module was still loaded!
I stumbled across an easy way to get my 720p working in a flash. (once the driver is installed that is).
Mythtv documentation has a really nice Modeline Database that I just copied and pasted into my xorg.conf file. Wow, I must me a nerd because that all made sense to me.
To make it a little bit more legible…a modeline is kinda like telling the computer what resolution you want to use and the xorg.conf file is just where linux puts a lot of information (like resolution, keyboard layout, etc). You can probably find a lot better explanations on the internet but that is what I know about it.
I found documentation on how to make my QAM channels actually have information in the guide. You have to get what is called a XMLTVID from zap2it.com (if you are in the US and using zap2it as a source for your channels).
To get the ID you need I followed this forum over at Silicondust
The list of xmltvid values for lineup population. This can be found by going to zap2it.com (not labs.zap2it.com) and viewing the digital cable lineup for your area. When you click the call letters of the channel you are interested in, it is found in the URL variable stnNum. For example, the required value from my local NBC affiliate is “20358″ in this URL:
tvlistings5.zap2it.com/tvlistings/GridAction.do?method=getSingleStation&stnNum=20358&lineupId…<EDITED>
Really I promise that is all for now. At least until I find more helpful information (like how to make my HD not go crazy when the overlay is on screen
Edit: link to original in bold and checked some of the code blocks.
Samba share with Knoppmyth
I recently was poking around the Knoppmyth wiki when I found a artical about webadmin for knoppmyth. The webadmin is really useful for setting up samba shares, managing RAID, and a whole bunch of other stuff I didn’t know knoppmyth could do. There is even a quick how to on watching your recordings on your PocketPC or portable device. I am going to look around some more and see what I can figure out.
MythTv Theme installation
Now that I have Knoppmyth up and running for more than .78 days I have had a chance to mess around with some of its features. I must say I definatly underestimated it. Anyway the thing I have today is how to install a new theme in MythTv. The one I chose is ProjectGreyhem because it is the closest to my modded xbox skin that I have now.
I am taking these instructions directly from the ProjectGrehem site because this is exactly hew it worked for me. It is really nice to have things work as they should!!
It is very easy to install Project Grayhem or Project Grayhem Wide
- Download the tarball
- Copy it to /usr/share/mythtv/themes
N.B.: Check where themes are stored on your installation as themes can be stored at /usr/local/share/mythtv/themes depending on your distro.- Unpack the tarball with: tar -xvjpf Project-Grayhem-foo.bz2
- Your new MythTV Theme should now be ready to use.
- Either theme should work with MythTV 0.20
Thanks a lot to whoever maintains this skin (I couldn’t find any credits)
Just in case anyone is wondering “download the tarball” means to use the wget command (make sure you are saving it in a directory you can write to).
and the “tar -xvjpf Project-Grayhem-foo.bz2″ actually means to type in whichever version you downloaded. To make it really easy just type “tar -xvjpf Project<tab>” in the correct folder as root.
Leave a comment if you have any problems.



