Search This Blog

Sunday, November 29, 2009

Never wear the opposing teams color when approaching the mascot

USC's Cocky (Youtube Video)

Never too young to start learning lessons.

My Own DVR

First of all, just want to say that MythTV has several advantages, and several disadvantages, over what a cable/satellite company can offer you.

Advantages over Provider
1. No monthly cost
2. Various storage space options, not limited to their selections
3. Prioritization of recordings
4. Continuously being developed
5. Content is easily accessible for further editing
6. Customizable
7. You have access to code to make changes, if you wish.
8. Plugins provide access to DVD, Netflix, music, etc.
9. One server/backend can provide content to various frontends.

Advantages of provider
1. No upfront cost
2. It works out of the box.
3. No setup required
4. If it breaks, they replace it

So, while I do have two DVR's provided by local cable company, I chose to create a linux based DVR so that I could easily save programs that I wish, and if need be, burn them off onto CD.

Here is my setup.

Old Dell XPS system.
Pentium D
1 gig of ram
1TB Harddrive
Hauppage 1600 TV Tuner
MCE Remote/IR Blaster (as I could not get the Hauppage to work and it was included with the PC).

I have tried Mythbuntu 9.04, 9.10, 9.04 upgraded to 9.10, and 9.04 with MythTV upgraded to 0.22 and have come to the conclusion, atleast for now, that 9.04 that is setup and then upgraded to 9.10 was best for me.

So, I obtained the Mythbuntu CD through torrent and burned it off onto disk. It appears that this is no longer available on the Mythbuntu.org website, but a quick search of Google found this Mythbuntu 9.04

I plopped it into the computer, set it to boot from CD and let it load. I chose to install the system, and went with the default options, using the entire drive for my setup.

Once the install completed, you are given the option to go to schedules direct to setup your account and channel line ups. and then to setup MythTV. Upon choosing to setup MythTV, I was presented with a grey box that did nothing. I could not escape, etc. Apparently several other users have this issue as well from searches. But I was able to ALT-TAB to the console, hit Ctrl-C and exit out of it. For my setup, this was not a bad option as I had to do some additional downloads from what I had read.

Once the machine restarts, exit out of the front end and bring up a console. The below are the steps that I took to get the drivers installed and working for my Hauppage 1600. I used a Wiki guide for the basis, with some other steps that I had to take.

Stop the Backend
-sudo /etc/init.d/mythtv-backend stop

Install mercurial, headers, and build-essential
-sudo apt-get install mercurial linux-headers-`uname -r` build-essential

Download the drivers
-hg clone http://linuxtv.org/hg/v4l-dvb

Download the ncurses library (needed for menuconfig)
-sudo apt-get install libncurses5-dev

Change into the drivers library and make the drivers
-cd v4l-dvb
-sudo make rminstall
-sudo make distclean
-sudo make menuconfig (right arrow over and select exit, as the defaults should be fine).
-make (this will take a while)
-sudo make install

Download firmware and copy to correct location
-wget http://linuxtv.org/downloads/firmware/v4l-cx23418-cpu.fw
-wget http://linuxtv.org/downloads/firmware/v4l-cx23418-apu.fw
-wget http://linuxtv.org/downloads/firmware/v4l-cx23418-dig.fw
-sudo cp *.fw /lib/firmware
(Or if doing after a kernel upgrade... sudo cp cx18-firmware/*.fw /lib/firmware/`uname -r`)

Reboot machine

Once restarted, exit out of the front end.

Start the MythTV-BackEnd setup

Go through step 1.
For step 2, add new capture card. Select Analog V4L capture card, and press next a couple of times.
Then scroll down, and select the Analog card, and change it to IVTV MPEG-2 encoder card. If I did not do it this way, the card would not work for some reason. Not sure if it is a bug in MythTV or the drivers. This differs from the Wiki guide I followed.

Add the HDTV tuner as a DVB DTV capture card (v3.x), and select recording options, and change max recordings to 1.

Add your video sources in step 3 that you created for schedules direct.

Input connectors, you will need to connect the card to the video source and scan for channels.

This is where I ran into issues and was not able to find a good guide/how to. And all posts for people that say they got it to work, never give details on how they did it.

I had a cable box that I wanted to control with the system, and most guides that I came accross were for DishTV. Hopefully this will help someone.

If you just have basic cable, or over the air, what you will need to do in Step 4 is to select appropriate tuner, the 'analog' for basic cable, or DVB for 'ota'. Then choose the appropriate channel lineup. For basic cable, I called mine Basic Cable, High Def for the ota channels, and Digital Cable for my cable box setup, which I will cover later.

Once the channels are scanned, you can exit out and let the mythfilldatabases run to get your channels and such setup.

Now, if you want to control a cable box, the setup needs to be a little different.

For your connector, you will chose the 'analog' card, and your digital channel lineup. You will not need to scan for channels though. Make sure your tuner preset is set to 3, or appropriate channel, and then choose fetch channels from source. It will appear to be doing nothing, but if you CTRL-Tab to the console, you should see it downloading the channels.

Once completed, set your starting channel to something like NBC, FOX, etc. Mine defaults to 1 which is an on-demand channel and not the greatest choice.

Exit out and let the mythfilldatabase do its thing.

Restart the frontend and verify that you can watch tv. Channel changing may not work if you have an external box setup. This is because there are some additional steps to take.

If you have a settop box to control, the following steps worked for me. I could never get the hauppage remote to work, so went with an MCE that I had that came with the PC originally that I had never used.

To get it to work, close out of the frontend, and enter the Mythbuntu Control Center. Select the Infrared section, and select the Remote that you have, and the blaster that you have. Apply the changes and let it do its thing.

Now you will need to create a channel change script. To do so, the following worked for me. In a console, open vi (or vi channel-change.sh) and you should have a blank document. You can use your editor of choice for this.

The following script worked for me...

#!/bin/bash
REMOTE_NAME=SAE8000
for digit in $(echo $1 | sed -e 's/./& /g'); do
irsend --device=/dev/lircd SEND_ONCE $REMOTE_NAME $digit
sleep 0.5
done
irsend --device=/dev/lircd SEND_ONCE $REMOTE_NAME select
sleep 1.0
irsend --device=/dev/lircd SEND_ONCE $REMOTE_NAME exit
sleep 1.5
irsend --device=/dev/lircd SEND_ONCE $REMOTE_NAME exit

REMOTE_NAME=SAE8000, this will need to match your settop box/remote from your provided. In my case I have a Scientific Atlanta 4250C and the SA8000 remote works for it. The middle for loop just sends the channel number to the settop. Afer the loop, it then sends a select, which is like the enter for the remote. it waits a second, then sends an exit which will clear the guide faster, and then waits another 1.5 seconds and sends another exit. This is for the Enhanced/Startover menu that some of our channels have. You can customize this script to meet your needs. Save the file and exit out of the editor. Now do a 'sudo chmod +x channel-changer.sh' to make it executable. Now copy it to /usr/local/bin with 'sudo cp channel-change.sh /usr/local/bin' This will make it available to the backend to change channels and not have a permissions issue.

To test, if you are in the directory of the script, run './channel-change.sh 54' and it should change the converter to channel 54 for you. Once verified that this works, you can go back into the backend and choose your channel source (step 4) and for the external channel change script, type in the full path/name for the script.

You can now exit out of the backend, no need to run mythfilldatabase, you can cancel that, and then start the front end and ensure that you can change the channel while watching TV. If the path/file name were entered wrong, i.e. it cannot find it, it will bring up a black screen and exit to the menu.

At this point, 9.04 with MythTV 0.21 should be setup and ready to watch/record tv. I chose to upgrade to 0.22 and found that the best way to do this was to upgrade MythBuntu to 9.10. Why not start with that? Well, there is a nasty bug in MythTV 0.22 that will not scan channels on the analog card. By installing and setting up 0.21 first, you can avoid that as the files will already be created/database filled in and the channel scan will be unnecessary. I tried just staying with 9.04 with an update to MythTV 0.22 and initially got an error that the frontend and backend where different version. I finally did a full upgrade to 9.10 and things worked normally. To keep up with MythTV updates, you can install the Auto-Builds package.