You are not Logged in
Do you want to Log in or register?

linuxchix.org.nz

Syndicate content
Boys can't have all the fun
Updated: 4 weeks 5 days ago

MythTV

Sun, 2008-06-08 08:53

I met the devchix at the RailsConf 2008 Birds of a Feather (great time BTW) and somehow the conversation got onto the topic of PVRs. I was telling the ladies about the MythTV system I setup in my home a couple of months ago and how much fun I was having with it. They all wanted to know more about it and suggested maybe I could blog on devchix about it. Wow, a group of females that actually gets excited about this stuff! I’d love to share what I’ve learned with the group. So here goes!

First off, MythTV is very cool. It is a Personal Video Recorder (PVR) like TiVo or Windows Media Center but with some important differences;

  1. It’s cheap. Well, at least the software is. MythTV itself is free but you still have to have buy, borrow, or steal a computer to run it on and you have to sign-up with Schedules Direct for channel listings at about $20/year.
  2. It’s open source - yay!
  3. It’s not Microsoft - something about that just makes me feel good
  4. It includes some features the commercial PVRs don’t have like automatic commercial skip and burning to DVD
  5. You build your own hardware so you can add as many video capture cards or hard drives as your heart desires
  6. Techno geek ability is a prerequisite

And like other PVRs, MythTV includes;

  • Pause and Rewind live TV
  • Automatic recording of a show every time it’s on
  • Disk storage of as many recordings as you can fit on your disk
  • Playback of music and video from other sources
  • Support for HDTV

The only major feature that MythTV does not include, if you live in Canada, is the ability to purchase online movies. If you live in the U.S., however, you can download movies via Netflix.
MythTV Step 1 - hardware

Choosing hardware was the most difficult part of this project for me. I was nervous about forking out $500 to $1,000 for a computer and then not being able to get MythTV to work. I spent a lot of time googling hardware options to make sure that the components I selected would be compatible with Linux. Rule #1 when choosing hardware is make sure it works with Linux. Linux just isn’t plug and play and you will save yourself a lot of grief if you get hardware that MythDora includes drivers for. See MythTV HOWTO for details on compatible hardware. I chose an ASUS M2NPV mother board with embedded nVidia video card (detailed specs below). I recommend checking compatability of all the components you plan to buy especially the video card and video capture card. I chose an nVidia video card because they seem to be well supported in MythDora with binary nVideo drivers - just remember to select the nVideo drivers option when installing MythDora (it is not enabled by default). I installed 2 video captures cards, both Hauppauge PVR-150s. Having multiple video capture cards means you can record 2 shows at the same time or record and watch TV at the same time. I found tons of documentation online on MythTV with Hauppage cards so they seemed like a safe bet. Once I had selected all my components I went to our neighbourhood computer store with my specs and had them assemble it.

Here is the hardware I used…

Once you have your box get it all hooked up and ready for installation. You’ll need a few special cables.

  • S/Video cable to connect the video out on the video card to your TV (assuming your TV supports S/Video, if not, there are other video output options)
  • audio cable to connect left and right audio outputs on the audio card to your TV

Hook-up steps

  1. Connect cable TV via coax cable to TV in on Video Capture Card
  2. Connect S/Video Out on Video Card to S/Video in on TV Input-1 using S/Video cable
  3. Connect Audio Out on motherboard to Right and Left Audio In on TV Input-1 using Audio/Video Cable, black connector to Audio Out on motherboard, right and white connectors to red and white connectors on TV

MythTV Step 2 - Channel Listings

Before you install MythTV, sign up for Schedules Direct so that you can setup MythTV to download channel listings.

MythTV Step 3 - MythDora Installation

MythDora is an installation of MythTV bundled with Fedora. If you are installing a dedicated MythTV server I recommend MythDora for ease of installation.

Download MythDora DVD ISO from www.mythdora.com and burn to DVD (alternately you could download the CD ISO and burn to CD). I recommend connecting a monitor, keyboard, and mouse for installation, you can disconnect it later. MythDora installation is pretty straightforward. The only place I was a bit confused was in network setup. Remember that if you ever want to run another MythClient some day (if you want to access and play your MythTV content from another TV in your house), you should choose a static IP address when installing MythDora. I recommend watching the install video before you start. I had to do some additional steps to get Schedules Direct working with MythDora 4, as follows. Please note these instructions may not be applicable to the recently released MythDora 5.

Upgrading MythDora for Schedules Direct

  1. During the installation of MythTV under Video Sources select North America (Data Direct) for XMLTV Listings Grabber but do *not* select Retrieve Lineups. Under Input do *not* select Fetch channels from listings source.
  2. After completing the installation, follow the instructions at Upgrading MythDora4 for Schedules Direct
  3. Go back into MythTV setup and delete and recreate a video source. Then go back and select Retrieve Lineups and re-configure the Input and select Fetch channels from listings source.
  4. When done, exit out of Myth TV and run xterm via MythTV Tools and execute mythfilldatabase.

I also had an issue with TV out not working for this video card - nVidia GeForce 6150. Here’s what I did to fix it;
If TV out doesn’t work, disconnect the monitor and reboot. If it still doesn’t work, change the BIOS as follows;

  1. On Boot, select Del on the setup screen (be quick!) to enter the BIOS
  2. Select Advanced
  3. Select Chipset
  4. Change RGV/TV Display to TV
  5. Change TV Mode Support to NTSC-M
  6. Disconnect monitor and reboot

MythTV Step 4 - Using and Configuring

Here are a few tips on areas of MythTV usage and configuration that you may encounter.

Create a samba share /videos to /storage/videos and grant access to user mythtv

edit /etc/samba/smb.conf and add

videos
comment = Videos
path = /storage/videos
valid user = mythtv
public = no
writeable = yes
browseable = no

In a linux shell execute
smbpasswd -a mythtv and setting samba password
/etc/init.d/smb restart

Connect network share to \\myth\mythtv (where myth is hostname of MythTV server)

Skip Commercials

To skip commercials, configure the Recording Profile to flag Commercials and configure the Playback Profile to skip commercials. MythTV doesn’t delete commercials it just marks them and you can watch the recording with Auto-Skip enabled. If you burn a recording to DVD you can tell it to delete commercials before burning but you have to first load the commercials into a cut list. To load commercials into a cut list you need to click Menu to edit the recording (while watching it) and click Z to load the cut list. Unfortunately, the keys to press for Menu and Z will vary depending on the remote control you are using. It took me awhile to figure out what all the key mappings were for my remote control. If you are trying to figure out the buttons on your remote control the MythTV wiki is a good place to start . Also the MythTV Daily Use Manual is a great resource for figuring out the day to day operation of MythTV

MythTV has completed changed television viewing for my family. I haven’t watched *any* live TV since we set it up. Instead, I regularly surf the channel listings and record everything I want to watch. Now if I could just get enough time to watch all those hundreds of shows before my hard drive fills up - since of course I can’t possibly delete anything I haven’t seen, I mean, some day I’ll desperately want to watch it, right!? Or maybe I’ll just stroll back into the computer store and get a 2nd hard drive…

Categories: Sister Groups

A quick (and dirty?) way to mail Oracle alerts.

Sat, 2008-06-07 04:24

Where I work, we have about 45 external Oracle Database Servers running RHEL 3. It’s a little tough keeping up with all of them day to day, so I made a quick BASH script that will check for any ORA- alerts in your Oracle alert_*.ora file. Here goes:
********************************
#!/bin/sh

tail -500 /usr/oracle/admin/ora_sid/bdump/alert_sid.log | grep ORA- > mailoraalerts.log
wc -l mailoraalerts.log > greporacount.txt
COUNT=`awk ‘{print $1}’ greporacount.txt`
if [ $COUNT -gt 0 ]; then
mail -s “Check ” your.address@mail.net < mailoraalerts.log
fi
********************************

So what this does is greps the last 500 lines of your alert log looking for ORA- string, and pipes that out to a log file. It then does a word count on that log file. If the word count is greater than 0 (there exists ORA- errors) then email me what the error is.

Then just schedule a cron job to run at whatever interval you desire. This probably isn’t the prettiest way to do this, I’d love to see other suggestions if anyone has any! My next step is to find out how to get Oracle to email me directly when there’s an error, instead of having cron determine when I am alerted.

Enjoy!

Categories: Sister Groups

Multiple object forms, delegation, and has_one…

Wed, 2008-06-04 17:08

I had an ah ha moment that maybe shouldn’t have been such an ah ha moment but it was so I figured I would share it. Yeah so I am sure most of us have had a situation where we needed to have multiple model forms. Most of the time now days I use attribute_fu to solve this issue but attribute_fu doesn’t work with has_one associations. Today I had a situation where I had two fields that were required for a has_one association object. Long story short it came to me that if we just used the delegate method provided by rails that we could essentially act like the attributes we were setting were on the parent model. This meant we only needed to create one form with multiple fields even though some of those fields were actually on a different model. I then remembered that back when I was working with the guys over at ThoughtWorks that we used a Ruby Extension called Forwardable to be able to delegate multiple attributes on one object.

So instead of this:

delegate :first_name, :to => :profile
delegate :last_name, :to => :profile
delegate :some_other_attribute, :to => :profile

side note: I’m not sure but I don’t believe delegate can take multiple attributes (I tried to look this up but for some reason couldn’t find the documentation for this method and didn’t have time to dig in the code)

You could do the following:

include the Ruby Extension Forwardable in the parent model class


include Forwardable

and then add this line:

def_delegators :profile, :first_name, :last_name, :some_other_attribute

So yeah that was my little ah ha moment. I am sure there are even better ways than this but this was better than what we were looking at doing to begin with.

Categories: Sister Groups

Rails Conf 2008

Sat, 2008-05-31 06:55

Hello Ladies,
I am reporting from RailsConf 2008. The main focus of this post is logistics for the conference. I’ll be posting about the talks as soon as I get to attend one. I have been running around trying to take care of DevChix related stuff.

We were unable to get an official room for a BoF but I have decided we will just take over some area of the convention center. Lets meet outside Exhibit Hall E at 7:30 on Saturday night. We can discuss whatever we want to. We are also planning appetizers and cocktails after the BoF. Hashrocket Inc, the company I work for is sponsoring the evening. Thanks Hashrocket!

Please either come to the BoF for more information or find one of the ladies with a DevChix logo on their badges for more information. I will also have stickers to give out (until they run out).

We would love to meet ALL the women developers at the conference so please come out and get to know us.

Cheers
Desi

Categories: Sister Groups

Reporting from the /ETC in Amsterdam

Tue, 2008-05-27 03:26

It’s difficult to find words for this tech gathering, without sounding like an excited child on their birthday. It’s fun, awesome, amazing, unreal, just simply great.

From social issues to soldering, this gathering has the most diverse lineup of things to do and see for techhie type women. Every year it’s held in a different European city, making it even better. I don’t know how to describe it other than saying it’s just the best damn gathering I go to on a regular basis.

Woo! Back to soldering.

Gloria

Categories: Sister Groups

linuxchix.org.nz

robo tux, linuxchix mascot

Linuxchix International