Wrestling MythTV into submission

mythtv

As the All Your Base video meme said, “main screen turn on!”

I got my MythTV frontend working with my HDTV again after a ridiculously tough set of issues to resolve. First, the PC in question is my old Thinkpad laptop and is barely functional to begin with. If you touch it ever so lightly, for instance, the display and keyboard will cease to function. I had to carefully position it through trial and error before I got it to keep its video alive.

Once that was done I was happy to see mplayer doing something on my big screen, only it wasn’t showing any video. GNOME would dutifully draw a border around where my video was supposed to be showing but all there was was an empty box. Instead, the ATI Radeon video driver was showing my video on the laptop screen – the booby-trapped one, remember? No good. No good at all.
Continue reading

MythTV fully in tune with digital TV

mythtv

A few months ago I bought a used motherboard with the goal of upgrading my MythTV backend. The upgrade went smoothly from a hardware and operating system point of view but Myth was never the same for some reason. Adding to the confusion was that I could tune and watch channels using the command-line tool mplayer but Myth would never properly scan channels.

After a little tinkering (and Googling) yesterday, I decided to try increasing the scanning timeouts using MythTV-setup. Where the previous 3 second timeout was once adequate, I bumped both the tuning and signal timeouts to 10 seconds. By feeding the channels.conf file I created using atscscan, I avoided having Myth tune through all 83 channels. That mitigated the pain of the longer timeouts. Presto! I successfully added the channels back into Myth.

And boy, do they look good. The previous HDTV signals were good, but they were also spotty. Now that the digital antennas have claimed the top spots on the stations’ transmission towers, the digital signals are coming in rock solid.

Myth should save our sanity a bit at home, as the kids can now watch something other than the DVD shows they’ve seen 1,000 times already!

Myth and speed

Ever since I upgraded to an HD capture card in my MythTV backend, I’ve noticed a wide variation in the playback speeds of the recordings it makes. Some play back at normal speed while others play back far too slowly or quickly. It’s frustrating.

I was going to blame MythTV for this craziness until I remembered the dvb-utils application azap. This little app tunes the HD card and dumps the output to a pipe, thus it provides a way of testing the card (and driver) outside of Myth. I’ve never used it before but it seems to be the perfect test tool. It turns out the streams produced by the driver and card exhibit the same synchronization issues I’ve seen in Myth itself. That means Myth isn’t to blame.

But what is? My card or its driver? I suppose the next step is to somehow get Windows running on my server long enough to test the card using the Windows driver. If that works, I know Linux or the Linux driver is to blame.

The investigation continues…

Satellite Myth

Last night I took another hack at getting MythTV working with my DVB card. This time I was much more successful! The key was configuring Myth to use the LNB, which was hidden in the mythtv-setup under “capture cards-DiSEqC options. An LNB is not a DiSEqC, so I would’ve never thought to look there, but there it was.
Continue reading

Signals from space

Yesterday’s space shuttle launch finally motivated me to dust off my DVB-S card and set up satellite reception in our new home. I’d put it off for almost a year, thinking the tree cover in our back yard was too extensive to find a good shot at the sky. It turns out I discovered a very nice spot right on our back deck, so Travis and I spent a little time building a temporary stand for a dish, aiming it, and threading the cable back into our network closet. After a few duh moments where I shook off the cobwebs covering my knowledge of DVB-S, I got reception of the NASA channel – only three hours after the shuttle launched! Better late than never.

Even so, I wasn’t able to get Myth to pull down video for some reason. The dvb-utils applications can tune (and capture) the streams just fine, but Myth just shows a blank screen – even though it can tune the channel and see a signal from the transponder. I don’t know what else I can tinker with to get Myth working with it but I’ll keep hacking at it.

Myth success

After finally mucking with it enough I managed to get MythTV behaving. I found my antenna lead was loose, which may have caused random static in the picture. I also moved the antenna a few degrees away from the direction it was pointing. The combination of the two may have been enough, though I’d like to find out which one made the difference.

I also reinstalled the Myth database the other night, deciding to wipe it clean and start over. I don’t think this could’ve made a huge difference but it was a good exercise anyway. I had to do something with it because when I consolidated my Maestro server with my MythTV server the name of my Myth box changed. When this happens, Myth gets Very Unhappy, requiring some manual database trickery to get it going again. I think my trickery may have left me with an unstable database, thus the need for a reinstall.

Now to add in all the shows I had once set to record.

Power surge

I picked up a donated motherboard/CPU from a fellow TriLUGer and popped it into my Myth box last night to see if it would fire up. Fire might be an apt word, as the motherboard did exactly nothing while I had it powered.

After I checked connections and powered it up again, I gave up on it and put the power supply back on my existing motherboard. When I plugged it back in, I got a huge power surge that nearly tripped my UPS. My power supply clearly didn’t like being tethered to that questionable motherboard.

The good news is my power supply is still okay. After its surge, it booted my Myth box fine. Now I need to find a new donated motherboard/CPU for my project. Hey, it was worth a try!

A penguin roosts in the Mac Mini

For over a year I’ve had my Mac Mini’s tiny 40 GB drive partitioned to dual-boot Linux one day. Yesterday was that day. While this may be nothing to those Intel Mac Mini users, to get my PowerPC running the latest Ubuntu was a bit of a challenge. There is no official Ubuntu release for the PowerPC: instead its a port. Also, each time I tried installing Ubuntu on this machine using our HDTV as a monitor, the HDTV would refuse to display anything from the Mini. Apparently, the video modes the Mini pushes while in Linux’s framebuffer mode were out of the range of my Toshiba flat-screen. So, a few days ago I tracked down the port of Ubuntu 8.10 for the PowerPC and borrowed my desktop’s monitor to see what was going on.

I also ran into a bug where the Mini’s ATAPI cdrom drive – the most common CDROM drive in the PC world – was not recognized. The solution is to switch to another virtual console (CTRL-F2, for instance) during the install and run modprobe ide-scsi.
Continue reading

Mythbusted

I have to say I think I’ve exhausted all the potential bottlenecks to try in my attempt to turn my MythTV box all-digital. The Avermedia A180 HDTV card simply doesn’t get along with my motherboard/CPU. I spent some time over the weekend adjusting the PCI latency times for the system’s peripherals, including removing and/or disabling unused devices. I also upgraded to the latest ivtv driver. These changes seemed to help: I was getting far more of the signal than I used to but I could never completely eliminate the dropped frames.

My tinkering did reveal that the CPU is only an Athlon 850 MHz when I thought it was at least a 1 GHz. That matters little as I place the blame on the bus speed or memory speed of the system. It just can’t keep up.

I also noted a conflict between the Avermedia A180 and the PVR-150 Plus. When the PVR-150 Plus is present the A180 will claim to be tuning channels but it won’t receive any signals. I read about this behavior with the PVR-150 and different card and it seems to be the same thing with the A180 and the PVR-150.

I don’t want to go back to the analog setup as I want to drop basic cable, but at this point its either that or invest in a new motherboard/CPU. I’ll come back to it some other time.

Myth clue?

I thought to do a watch -d 'ls -l' on the file MythTV was creating when it was recording a show this evening and what I saw was very revealing. There seemed to be gaps of about 5 to 10 seconds where the file size did not change.

I’m using the XFS file system for my MythTV recordings, as it is better suited to the large files common to digital video. I did upgrade the system’s kernel, which may have somehow broken the XFS driver.

I have another partition formatted in EXT3. My next test will be to send the files to that partition and see if they continue to miss frames.