This blog details the work I'm doing to turn the old computer I used in college into a Freevo system that uses Slackware Linux. I'll post the steps I take (hopefully something resembling a tutorial) and links to drivers or helpful websites. No promises on quality writing, but I still hope it can help! My system is detailed below. If you have any questions about how I got my stuff working, please contact me through my website. The link is on the left. Happy Linuxing!

My System:

Monday, August 16, 2004

Status Update 

I've completed a substantial amount of work on my Freevo. This includes getting my Matrox G400 video card working (for TV output), IR receiver working (for remote control), getting NES and SNES emulators working, and setting up a joystick, which is a Playstation 2 controller with Radio Shack USB adapter. Smaller things I've done are setting up cron jobs to retrieve TV listings at night and to update my PC's clock (which loses something like 7 seconds per day, which explained why my recordings were beginning to be way off in time).

I'd like to detail my work on all of this, because it's very cool. The TV output of the Matrox G400 is beautiful. Getting the SNES and NES emulators to output to TV is great, because with the proper filtering it actually looks better than it does with the original console hooked up. And of course, if you're going to use those emulators you need a suitable controller. Finally, the remote control gives it the ease of use that any consumer electronics item should have.

Hopefully I can get writing soon.

Monday, May 10, 2004

<Mel Gibson voice> Freeeeeeeeeeeeevoooooooooooooo! </Mel Gibson voice> 

My Freevo box is up!

Everything that I care about works. I can view TV listings, set things to record, set favorites, the web server works so I can set things remotely, everything records great, and I even have Samba up so I can share the video files with my Windows XP laptop.

I still want to get my remote control working, but other than some tweaking with the quality of the video files there's really not much else for me to do.

Freevo's great. It's worth the effort to get it up.

Tuesday, May 04, 2004

Linksys LNE100TX EtherFast® 10/100 LAN Card 

As I noted in my last entry, I left my wireless USB network adapter at my parents' house. I don't need wireless in my new condo since the Freevo is right next to where the router is, so I got a normal wired LAN card.

Installation with Slackware 9.1 was simple. I put the card into a PCI slot and turned on the PC. Linux instantly recognized the card and it worked fine. That's all. Didn't need a new version of the Tulip driver or anything like that.

I ran netconfig to configure the network settings. Simple!

Sunday, May 02, 2004

I'm back! 

This may be hard to believe, but I WILL finish this Freevo box.

I've been taking graduate classes on top of working full time, I bought a new place AND there's a new girl in my life. This equated to ZERO Freevo (or free, for that matter) time. But the semester's over, I've moved into my new condo, and I want to get this thing up and running so that when I'm super busy again I'll at least be able to record the shows I was missing.

The new hard drive went in last night (yes, it took 5 months for me just to get the drive into the case). I still put a Windows 2000 partition on there, just in case I need to use the box for Windows stuff. Slackware is installing as we speak.

I am so glad I blogged everything. It's going to be easy to get back up to speed. One problem, though. Back at my parents' house I was using a USB wireless adapter to connect to the internet. This box has no network card and I left the USB adapter at my parents' house. I've been too busy to visit and pick it up. Having to burn CDs on my laptop with the software I need will be a pain until I buy a network card, or visit my home town.

Tuesday, December 02, 2003

New hard drive 

I got an 80 GB Maxtor hard drive from Staples for $40 after rebate (Black Friday sale). This will be my Freevo's hard drive. It's been over a month since I last worked on the Freevo, but I'm going to make a big push to get it done before the end of the year. Might totally start from scratch with the new drive, because the 12 GB drive that's in there now is dual-booted with Windows 2000 and has lots of really old files on it.

Friday, October 24, 2003

Diamond Viper V770 with nVidia Riva TNT2 chipset and 32MB RAM 

This entry will detail configuring the XFree86 settings and installing the Nvidia driver.

Originally (before I found a driver) I just ran xf86config, which was located in /usr/X11R6/bin/. It generates the XF86Config file that is found in /etc/X11/.

I didn't need any website or documentation. I just followed the prompts. Problem is, you need very specific information about your video card and your monitor. Make sure you know the card you have, the chipset, how much video RAM is on the card, the model of your monitor, and the vertical and horizontal refresh rates of the monitor. If you know the model number of the monitor you can probably Google it and find the refresh rate information that way. That's what I did. Also, you may not think about it much as you boot, but often the first thing that comes on the screen at boot time is information on the video card. That's how I easily determined the amount of memory on my card.

The card database is pretty big. You should be able to find your exact card or chipset on there. I don't know what else to say. It's a pretty self-explanatory configuration program.

When you're done, type startx to get the GUI up. If you didn't know, hitting Control, Alt, and the plus (+) key on the number pad (NOT the top row of the keyboard) will increase the resolution. Likewise, Control, Alt, and minus (-) reduce the resolution.

The driver for this chipset can be found at Nvidia's website, specifically on their Linux portal page. If you have a normal Intel Pentium processor (I have a Pentium III) you want the Linux IA32 driver, which as of this writing is at version 1.0-5336. Download the .run file and execute the following command to start the installer:

sh NVIDIA-Linux-x86-1.0-5336-pkg1.run

Follow the prompts. The installer attempted to download a kernel interface for my specific Linux kernel but couldn't connect, so it just compiled a version on the spot. After the installer finished, all I had to do was modify a couple lines in XF86Config file:

In Section "Device" changed
Driver "nv" to
Driver "nvidia"

In Section "Module" uncommented Load "glx"

See the very detailed README file for details.

Everything seems great with the card so far. I've been wanting to try an OpenGL application but I haven't had a chance yet.

Comments 

I've added the ability to comment on each post so you can correct any errors, add your thoughts, or ask a question.

Wednesday, October 22, 2003

Update 

I've done nothing with my Freevo system since getting XMLTV to work. I'm hoping to have some free time this weekend. Freevo still needs to be configured so that the proper command line arguments are sent to mplayer.

I also need a video card that has an S-video out. There was one on eBay that I wanted, but I forgot about the auction and lost. I can get that part last, though, so I have plenty of time.

The only other things I need are a larger hard drive and possibly an IR receiver. My TV card comes with an IR receiver, but if getting it to work is too much of a pain I'll just get a separate one. They're inexpensive.

Friday, October 17, 2003

XMLTV 

I have updated this post to reflect changes in the XMLTV installation. It seems easier this time. It's basically the same, though.

You can read the XMLTV project page and download the XMLTV source files at SourceForge. The XMLTV page at the Freevo site has some useful information too.

Download the XMLTV package at SourceForge and read the README file. A little more than halfway down is a list of dependencies that you'll probably need to get. You'll need to make use of a program called cpan, which comes with Perl (which for some crazy reason I forgot to install with Slackware!). Type cpan and configuration will start. I used the default values (just hit enter) for almost everything. For the FTP servers I just picked some random ones. Doesn't really matter.

After configuration you're given the cpan> prompt. From there you can begin installing all the perl modules you need (again, they're listed in the README file that comes with XMLTV). I ended up installing some of the optional ones too, even though I didn't really know what they did. To install, just type install, space, and then the package you want to install, like install XML::Twig. If the package you're installing requires another package, it'll ask you if you want to install the required package(s) first. Answer yes, obviously.

Some of the installations may fail. My LWP package refused to install because too many errors were produced during the test. Just force it by putting force before the installation command (force install LWP). I forced the installation despite having a large percentage of failures and my XMLTV works just fine.

Follow the instructions in the README to install. Pick the grabber(s) you need when you run perl Makefile.PL. If you're an American all you want are tv_grab_na_dd and tv_grab_na_icons (if you want to retrieve icons for each channel). Once you've picked the programs you want to install it'll create the makefile. The makefile maker will let you know if you're missing any needed modules.

Once you've run make, make test, and make install, you'll want to configure tv_grab_na_dd by running:
tv_grab_na_dd --configure

Follow all instructions. You need a Zap2it account. Follow all prompts. It's pretty straight-forward!

Now in your /etc/freevo/local_conf.py file there's a field called XMLTV_GRABBER where you specify which grabber you're using (it'll probably be '/usr/local/bin/tv_grab_na_dd') and XMLTV_DAYS where you can specify the number of days of TV listings you want to retrieve. Retrieve the listings by executing ./freevo tv_grab in your Freevo directory. The local_conf.py file also has a TV_CHANNELS field where you can specify the names of all the channels. To generate this list, a friend of mine wrote a very useful Perl script. Put it in a file (like xmltv2freevo.pl) and run it after you've grabbed listings at least once. Then run the script by executing perl xmltv2freevo.pl < /tmp/TV.xml (this assumes you've got the listings going to the default location). Place the output in the local_conf.py file.
while () {
chomp;
if (/^\s+$/) {
$disp_name=0;
$last_id = $1;
} elsif (/^\s+(.+)<\/display-name>$/) {
if($disp_name==0){
$last_name = $1;
}elsif($disp_name==2){
$last_chan = $1;
$length = length($last_chan);
if($length<=1){
$last_chan="0".$last_chan;
}
}
$disp_name++;
} elsif (/^\s+<\/channel>$/) {
$string="\(\"$last_id\"\, \"$last_name\"\, \"$last_chan\"\)\,";
$hash{$last_chan}=$string;
#print $string;
}
}
for $keys (sort keys %hash){
$output = $hash{$keys};
print "$output\n";
}

You may want to make a cron job that will retrieve the listings automatically. I hope to update with that information later.

Old post:
XMLTV was not fun to install. Well, to clarify I should say that XMLTV itself wasn't so bad, but all its dependencies were a pain in the ass until I figured out what you can get away with. Had I read the XMLTV page at the Freevo site I would've known.

First you should grab the XMLTV package from SourceForge: http://sourceforge.net/project/showfiles.php?group_id=39046

Untar it and read the README file. In there is a list of the Perl packages you need to install before installing XMLTV itself. You can get them a few ways, but I chose the CPAN route. It was tough, but I got through it.

First, run the following command to set up and start CPAN:
perl -MCPAN -e shell
I used the default values (just hit enter) for almost everything. For the FTP servers I just picked some random ones. Doesn't really matter.

I was then given the cpan> prompt. From there you can begin installing all the perl modules you need (again, they're listed in the README file that comes with XMLTV). I ended up installing some of the optional ones too, even though I didn't really know what they did. To install, just type install, space, and then the package you want to install, like install XML::Twig. If the package you're installing requires another package, it'll ask you if you want to install the required package(s) first. Answer yes, obviously.

Some of the installations may fail. My LWP package refused to install because too many errors were produced during the test. Just force it by putting force before the installation command (force install LWP). I forced the installation despite having a large percentage of failures and my XMLTV works just fine.

Once all the necessary modules are installed you can install XMLTV itself. Just follow the directions in the README. When XMLTV has successfully installed (and if it doesn't successfully install I have no idea what to do; try installing the necessary perl packages again), run tv_grab_na --configure to set up the data needed to grab TV listings. It asks you for a ZIP code and other junk. It'll fetch the channels for your area and put them in a configuration file located at ~/.xmltv/. I forget the exact filename, but it's the only file in there and I'll edit this entry later.

To grab listings and put them in a file, do tv_grab_na --days <num days> /<path>/<filename>. You can leave out the --days <num days>, but setting it to 1 or 2 for testing purposes makes the download go more quickly. By default Freevo wants to find the listings in /tmp/TV.xml so you should probably put it there (tv_grab_na --days 1 /tmp/TV.xml) unless you specify otherwise in Freevo's local_conf.py file.

Now you've got the listings, but local_conf.py still needs to be updated with the channel list. The XMLTV wiki at the Freevo site has a couple scripts you cause to extract the channel data from the TV listings file and output it into the format that Freevo wants. I took the output from one of those scripts, ordered it the way I wanted to, and had to then had to change the station name and number for each entry manually so they'd be the way I wanted it.

For some reason freevo_conf.py has a default channel list in there that you need to comment out or delete. Or I guess you could add your channel list to that file, but either way I thought that file was never to be modified. Who knows. Also, if you start up Freevo, look at the listings, and find that the channel list doesn't reflect the changes you've made, delete the file in /tmp/freevo/cache/ that has the word "pickle" in it (forget the actual name of the file, but it's impossible to miss). When you start Freevo again and look at the listings it'll regenerate this pickle file.

I thought XMLTV would be one of the easier things to set up, but it's been a pretty big pain in the ass. Works OK for me now, though. Eventually I'll set up a cron job so that the listings are retrieved automatically on a regular basis.

Wednesday, October 15, 2003

Connection lost! 

I'm at work installing XMLTV when the terminal just stops responding. Maybe the power went out, or the wireless network cut out, or the DSL is down on Verizon's end. I'm pissed. I was in the middle of something. Right now I'm repeatedly pinging until I get a response in hopes that whatever caused the failure will undo itself.

This page is powered by Blogger. Isn't yours?