Experiences using digital video under Ubuntu, Redhat 8.0 + 9.0. Details the frustrations of getting cool stuff up and running in Linux.
Wednesday, July 06, 2005
OK, so upgrading the default ubuntu kernel to plain vanilla from linux.org breaks some important functionality. Like the ability to MOUNT HARDDRIVES OTHER THAN THE BOOT DRIVE!!! Probably something to do with inotify and dbus - I guess I need to look into this.
Thursday, June 09, 2005
Remember to turn off auto-play of DVDs on insertion in the Gnome System->Preferences->Removable Drives and Media->Multimedia tab if you are monitoring the DVD drive in Myth, or the DVD will start twice when inserted with mythfrontend running...
Sunday, May 22, 2005
Well it looked as if automounting of DVD/CDs was broken on my system. Digging into the problem, looking at .xsession-errors, I noticed that messages were being spewed out about the 'pmount' command not working. Searching around for pmount I find:ls -l /usr/bin/pmount mythtv@ubuntu:~$ ls -l /usr/bin/pmount -rwsr-xr-- 1 root plugdev 23704 Apr 5 02:38 /usr/bin/pmount
Checking my mythtv groups setting:mythtv@ubuntu:~$ groups mythtv cdrom audio video
D'oh! My user isn't part of the plugdev group. Adding this group fixes automount again :)
DVB channels under MythTV - nightmare stuff when you're not 100% sure what's going on... more later.
Managed to get a DVD drive playing DVDs under xine:
1) Installed the DVD drive as a slave of my main CD burner
2) Boot into ubuntu, confirm the drive is detected correctly:May 22 10:37:45 localhost kernel: hdd: ATAPI 32X DVD-ROM CD-R/RW drive, 2048kB Cache
3) Install the de-css software as outlined here (step 8)
4) Make a mount point for the dvd drive:mkdir /media/dvd0 ln -s /media/dvd0 /media/dvd
5) Add an entry to /etc/fstab for the drive:/dev/hdd /media/dvd0 iso9660 ro,user,noauto 0 0
6) Install xine-uisudo apt-get install xine-ui
7) Change the dvd read location to /dev/dvd (you'll need to change the settings level to 'expert')
8) Pop in a DVD and click the 'DVD' button on the xine gui!
Thursday, May 19, 2005
cat /proc/sndstat gives:Sound Driver:3.8.1a-980706 (ALSA v1.0.8 emulation code) Kernel: Linux ubuntu 188.8.131.52 #2 Wed May 18 14:21:23 EST 2005 i686 Config options: 0 Installed drivers: Type 10: ALSA emulation Card config: Brooktree Bt878 at 0xe2004000, irq 22 VIA 8235 with ALC650E at 0xc400, irq 19 Audio devices: 0: Bt87x Digital 1: VIA 8235 (DUPLEX) Synth devices: NOT ENABLED IN CONFIG Midi devices: NOT ENABLED IN CONFIG Timers: 7: system timer Mixers: 0: Bt87x 1: Realtek ALC650E
Of course we don't want that pesky Bt87x hogging /dev/dsp, since it's an input device, not output. A quick lsmod gives the sound drivers: snd_via82xx 28608 0 snd_ac97_codec 77624 1 snd_via82xx snd_pcm_oss 53728 0 snd_mixer_oss 20352 1 snd_pcm_oss snd_pcm 95688 4 snd_bt87x,snd_via82xx,snd_ac97_codec,snd_pcm_oss snd_timer 26436 1 snd_pcm snd_page_alloc 10052 3 snd_bt87x,snd_via82xx,snd_pcm gameport 4864 1 snd_via82xx snd_mpu401_uart 8256 1 snd_via82xx snd_rawmidi 25760 1 snd_mpu401_uart snd_seq_device 8780 1 snd_rawmidi snd 58404 10 snd_bt87x,snd_via82xx,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device soundcore 10592 1 snd
So we put these at the top of /etc/modules, reboot, and cat /dev/sndstat gives us:Sound Driver:3.8.1a-980706 (ALSA v1.0.8 emulation code) Kernel: Linux ubuntu 184.108.40.206 #2 Wed May 18 14:21:23 EST 2005 i686 Config options: 0 Installed drivers: Type 10: ALSA emulation Card config: VIA 8235 with ALC650E at 0xc400, irq 22 Brooktree Bt878 at 0xe2004000, irq 17 Audio devices: 0: VIA 8235 (DUPLEX) 1: Bt87x Digital Synth devices: NOT ENABLED IN CONFIG Midi devices: NOT ENABLED IN CONFIG Timers: 7: system timer Mixers: 0: Realtek ALC650E 1: Bt87x
Much better :)
Wednesday, May 18, 2005
OK, so after rebuilding the kernel, and remembering to do mkinitrd on the correct version... locking to the signal is much quicker - 1->2 seconds (possibly at the lower end of the limit for DVB-T?).
I'm running the 2.6.11-10
kernel from kernel.org with a fix for broken compilation of saa7134-dvb.c:
CC [M] drivers/media/video/saa7134/saa7134-dvb.o
drivers/media/video/saa7134/saa7134-dvb.c: In function `dvb_init':
drivers/media/video/saa7134/saa7134-dvb.c:56: error: too few arguments
to function `videobuf_dvb_register'
make: *** [drivers/media/video/saa7134/saa7134-dvb.o] Error 1
make: *** [drivers/media/video/saa7134] Error 2
make: *** [drivers/media/video] Error 2
make: *** [drivers/media] Error 2
make: *** [drivers] Error 2
make: Leaving directory `/usr/src/kernel-source-2.6.11'
make: *** [stamp-build] Error 2
- return videobuf_dvb_register(&dev->dvb);
+ return videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev);
Don't know if this fixes the module (don't really care) - but it does allow the build to complete.
Debian bug for this issue: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=302252
How to build a kernel image for ubuntu (for those who haven't done it before): http://www.ubuntulinux.org/wiki/KernelCompileHowto
Tuesday, May 17, 2005
The dvb card is so slow to lock to a channel. Typically I see:mythtv@ubuntu:~/mythtv$ tzap "ABC HDTV" using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' tuning to 226500000 Hz video pid 0x0903, audio pid 0x0000 status 00 | signal a2a2 | snr e4e4 | ber 0001fffe | unc 00000000 | status 0c | signal a2a2 | snr 3838 | ber 00000000 | unc 00000000 | status 00 | signal a1a1 | snr 5757 | ber 00000000 | unc 00000000 | status 00 | signal a2a2 | snr c0c0 | ber 0001fffe | unc 00000000 | status 0c | signal a2a2 | snr 4141 | ber 00000000 | unc 00000000 | status 1f | signal a1a1 | snr fefe | ber 000014d0 | unc 00000000 | FE_HAS_LOCK status 1f | signal a2a2 | snr fefe | ber 0000137a | unc 00000000 | FE_HAS_LOCK status 1f | signal a2a2 | snr fefe | ber 000012f4 | unc 00000000 | FE_HAS_LOCK status 1f | signal a2a2 | snr fefe | ber 00001376 | unc 00000000 | FE_HAS_LOCK
Wouldn't be a problem if it wasn't for the 1 second gap between each line...
Bad antenna? (I think not, the signals look fine once locked)
Dodgy kernel drivers? (possibly - yikes, I may need to rebuild the kernel!!!)
Dodgy PCI bus/motherboard? (possibly again, but not much I will do about this...)
Of course, before hacking mythtv, you need to do a channel scan in mythtv-setup, or your card won't tune to anything, even with a default channel set :)
Getting the Hauppauge Nova-T budget PCI card to scan to a channel under MythTV is difficult to say the least. Backend log looked like this:2005-05-17 18:39:55.214 SIParser: Starting DVB Section Reader thread2005-05-17 18:39:55.660 DVB#0 Using DVB card 0, with frontend Philips TDA10045H DVB-T.2005-05-17 18:39:55.663 DVB#0 Trying to tune to channel .2005-05-17 18:39:55.667 DVB#0 ERROR - Could not find dvb tuning parameters for transport 02005-05-17 18:39:55.669 DVB#0 ERROR - Failed to get channel options for channel .2005-05-17 18:39:55.670 DVB#0 Recorder: Card opened successfully (using PS mode).2005-05-17 18:39:55.670 DVB#0 AutoPID for ServiceID=0, PCRPID=02005-05-17 18:39:55.672 DVB#0 AutoPID Complete - PAT/PMT Loaded for service2005-05-17 18:39:55.674 DVB#0 Service is FTA2005-05-17 18:39:55.674 DVB#0 ERROR - No PIDS set, please correct your channel setup.
For some reason, it's trying to tune to an empty channel.
Looking at the source, tracing back from these debugs (Trying to tune to channel .) in the function:bool DVBChannel::SetChannelByString(const QString &chan)
We eventually reach tv_rec.cpp, and in the ::init function we see the following call: GetDevices(m_capturecardnum, videodev, vbidev, audiodev, audiosamplerate, inputname, startchannel, cardtype, dvb_options, firewire_options, skip_btaudio);
GetDevices performs a query to the DB, that is selecting the startchan field from the cardinput table for the appropriate card. Trouble is, if this field is empty (as was my case), it returns an empty field, which is then passed relatively unchecked back to the SetChannelByString function, which then fails with the error message as per the backend log.
I have run mythtv-setup and set a start channel for the appropriate DV card, but it doesn't seem to be populated in the DB - hacking the GetDevices function to return a valid channel number for the DV input card seemed to kick the database into gear and fill in a valid start channel. Of course it would have been much quicker to do a modify on the cardinput table entry, but that would be too simple :)
Monday, May 16, 2005
Braindump: so I don't have to fsck around when I drop all analogue channels next time:
For the analogue tuner card, you must set up the channel number on both the first and second pages of the channel config - ie use the channel number as the channel frequency - as long as you have the default frequencies set to 'Australia' then things should just work.
From mysql: select * from channel;
If the freqid != channel number, then the channel frequency isn't set up correctly and mythtv won't tune to the appropriate channel. Also, don't use the funny 'official' channel ID's - just use the channel number.