header image
JBT shows how to rock
September 16th, 2007 under Music. [ Comments: none ]

http://youtube.com/watch?v=DeV9N_tmTiQ&mode=related&search=


Cute Hamster
September 13th, 2007 under This And That. [ Comments: none ]

http://youtube.com/watch?v=rfqNXADl3kU


Piggyback With Meade ETX-90
September 11th, 2007 under Astro. [ Comments: none ]

I found a cheap way to build my own piggyback mount for my etx-90. All I needed was (Price in CHF):

  • Clamp 10.4cm diameter(7.-)
  • Super Glue (4.-)
  • M6 Metal Screw (0.70)

Here you can see how I assembled everything.

Glued Together Schelle
ETX-90 Mount ETX-90 Mount


MythTV with WinTV HVR-1300
September 5th, 2007 under Linux. [ Comments: none ]

One week ago I decided to get rid of my Windoze and replace it with an Arch Linux. I was wondering how the hardware support for tv tuners (analog) is with linux. I had a few troubles getting the remote control working but rest was pretty easy. Anyway, I want to write down all the important stuff one needs to be aware off to get everything working perfectly.

My goal was to use MythTV as my HTPC software. Ok here is what I needed to do:

  1. Install MythTV
  2. Install XMLTV (EPG Tool for MythTV)
  3. Get The TV Tuner Working (Analog)
  4. Get Sound From The TV Tuner
  5. Get The Remote Control Working

1) Install MythTV

The best way to to that is either to check read the MythTV Manual or some Tutorial for your Linux Distro (with Arch Linux there are two HOWTOs for setting up MythTV).

2) Install XMLTV

MythTV is a PVR (Personal Video Recorder). To use this feature of MythTV you need a TV Guide. XMLTV does exactly this job for you. There might be some precompiled packages for your distro. If there are none just download the source form the XMLTV website and follow the installation instructions. Here it is important that you install all the required PERL libraries. Fortunately, there is a collection of all the required libraries on the XMLTV website. During the installation you can choose which grabbers you would like to install. You just need the tv_grab_XX script for your country.

After you installed XMLTV it is time to grab the latest TV Program. For me, I needed to configure the grabber first. I had to run ‘tv_grab_ch_search –configure” in order to tell the application which TV Channels I am interested in. Then I had to run ‘tv_grab_ch_search –output tv.xml” to save all the information in the tv.xml file.

3) Get The TV Tuner Working

Here I had nothing to do at all. It just worked out of the box. The ModulAutoloading of Arch Linux loaded all the necessary drivers. Here is the module list for the HVR-1300:

  • cx88_blackbird (Hardware MPEG-Encoder)
  • cx8800 (TV Tuner)
  • cx88_alsa (TV Soundcard)
  • cx88_dvb (DVB TV *not tested)

The rest should be loaded automatically. I did not use the kernel modules that were provided by the kernel. I downloaded the latest sources of v4l (video for linux) from linuxtv (I also needed those to get the remote control working). There is a nice Tutorial how to compile and install the drivers (v4l tutorial).

After installing the modules I tested if the TV works. I used tvtime to do this.

I still got a problem with the TV Tuner, sometimes it just does not work. I could not figure out yet why this is. Usually, it works but once in a while all channels show a snowy picture. If this is the case I unload all the modules and load them again and usually it works fine afterwards. I wrote a simple script that does this job for me (here it is). If someone knows what the problem is, please let me know.

4) Get Sound From The TV Tuner

As already mentioned, it is the cx88_alsa module which enables the soundcard on the PCI Tuner Card. Unfortunately, the HVR-1300 does not have a connector for an internal audio cable (the cable that is also used to connect CD/DVD drives to to a soundcard) . Hence, we must get the audio data from /dev/dsp1 (/dev/dsp is for my regular soundcard and not the one on the TV Card). To provide tvtime with audio you can use this script which I found on the gentoo wiki. It pipes the sound from you TV Card to your Soundcard. Now you should be able to hear sound (is is a bit out of sync sometimes). MythTV and Mplayer automatically sync your audio and video that is why you should use one of those applications in my opinion.

This command worked for me perfectly: mplayer tv://$channel -tv \\ driver=v4l2:device=/dev/video0:alsa:adevice=hw.1,0:amode=1:audiorate=48000:forceaudio:\\
volume=100 :immediatemode=0

What we need to know, is that the HVR-1300 uses the 48000 sampling rate. This is important otherwise the sound quality is awful (lot of distortion and cracking noises) .

Now, we have all the information to setup MythTV. The MythTV manual explains how to setup the the channels (capture card: analog v4l /dev/video0 /dev/dsp1 48000 television). The only thing I had some problems with was the sound. The configuration that worked for me is this one:

  • Video: Encoding: MPEG-4 bitrate:4400 max quality: 2 min quality: 15 maxdiff: 3
  • Audio: Code: uncompressed sampling rate: 48000 vol:100%

That’s how I got it working.

5) Get The Remote Control Working

The kernel module for the remote control is ir_kbd_i2c (NOTICE: there are two kinds of remotes; a black and a white one. Use “modinfo ir-kbd-i2c” for more information. I had to add “options ir-kbd-i2c hauppauge=1” to /etc/modprobe.conf). “dmesg” should contain something like this: “ir-kbd-i2c: i2c IR (CX2388x rem detected at i2c-0/0-0071/ir0 [cx88[0]]”
Take a look at /proc/bus/input/device. There you find out which /dev/input/eventX you remote is ( use “cat /dev/input/eventX” in order to see if you get any events when you press buttons on you remote). Now, you can start lircd with the appropriate /dev/input/eventX. Lirc needs a config file that matches the input signal to a command (more information on the lirc website). You can use my config file if you want or create your own with “irrecord”. When you run “irw” and press a button on your remote you should see the name of on button you pressed.

What’s left is to configure MythTV and other applications to use lirc. I am not going to write how to do this becaus there are many other howtos for this.

I hope this helps.