Friday, May 27, 2005

DVD playback with mplayer

mplayer [-v] dvd://1 -dvd-device /dev/hdb -fs -zoom -monitoraspect 16:9 -vo xv -ao alsa:device=digital -aid 128

-v: shows all audio tracks available and format (5.1, stereo, etc.)

pgup/pgdn: skip 10mins
up/down: skip 1 min
left/right: skip 10s
space: pause

Monday, May 23, 2005

Backend is stable

After the kernel upgrade to 2.6.11 and pchdtv 2.0 DVB drivers, IOBOUND errors have gone away and the backend has been stable for several days.

FE is still on 2.6.9. It powered off for the first time with 'shutdown -h now'.

Friday, May 20, 2005

8192 pid (DVB)

[linux-dvb] Confused Air2PC owner: "> *Note: the 8192 is not a valid PID it will return the entire TS stream
> to mplayer. To find other streams in a TS stream run mplayer with the
> -v option."

8191 is other special pid.

Thursday, May 19, 2005

DVB BER will always be zero

pchdtv.com :: View topic - pcHDTV 2000 and DVB: "BTW - the number isn't high bit-error-rate (BER). Neither card has BER capabilities, the HD3000 driver returns 0 if it cant support it, the HD2000 driver returns -1. The two drivers had to go through different linux approval paths to get to the same place and that is one of the dissagreements currently, out there (minor as it is) The DVB API is supposed to determine if the capability is present (which both drivers report they can't do) and only show a number if it means something. Hence what a device returns if it isn't supported is a non-issue so no one wants to pick something and run with it...

There is your bit of OpenSource trivia for the day...

Rusty"

Wednesday, May 18, 2005

VNCserver setup

[root@myth ~]# cat ~/.vnc/xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# Use kde.
startkde &
# twm &

Reset access passwd:
[root@myth ~]# ls ~/.vnc/passwd
/root/.vnc/passwd

[root@be ~]# cd .vnc
[root@be .vnc]# ls
be.donnlee.com:1.log be.donnlee.com:2.log passwd xstartup~
be.donnlee.com:1.pid be.donnlee.com:2.pid xstartup
[root@be .vnc]# which vncpasswd
/usr/bin/vncpasswd
[root@be .vnc]# vncpasswd
Password:
Verify:

Start server:
[root@myth ~]# vncserver

(enter access pw)

Restart server:

[root@be .vnc]# service vncserver stop
Shutting down VNC server: [ OK ]

[root@be .vnc]# vncserver
New 'be.donnlee.com:2 (root)' desktop is be.donnlee.com:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/be.donnlee.com:2.log

Windows vnc client doesn't connect. So found in 'man Xvnc':

-rfbport port
Specifies the TCP port on which Xvnc listens for connections
from viewers (the protocol used in VNC is called RFB - "remote
framebuffer"). The default is 5900 plus the display number.

Windows vnc client uses 5900.

# vncserver -rfbport 5900

Another post about fixing mythfill channels with scan data

pchdtv.com :: View topic - hd3000 dvb setup in mythtv: "The myth scan for DVB channels returns useful information, but the channel names don't match,
so this information has to be transferred over, which is why I spent a good part of today getting the hang of mysql and mysql-browser. What is (sortof) working for me are the following table entries:

mysql> SELECT chanid,channum,freqid,sourceid,callsign,name,
xmltvid,mplexid,serviceid,atscsrcid FROM `channel` where sourceid=2;
+--------+---------+--------+----------+----------+
--------------------+---------+---------+-----------+-----------+
| chanid | channum | freqid | sourceid | callsign | name | xmltvid | mplexid | serviceid | atscsrcid |
+--------+---------+--------+----------+----------+
--------------------+---------+---------+-----------+-----------+
| 2014 | 4_1 | 28-1 | 2 | WNBCDT | WNBCDT (WNBC-DT) | 20459 | 23 | 3 | 2 |
| 2015 | 4_2 | 28-2 | 2 | WNBCDT2 | WNBCDT2 (WNBC-DT2) | 44936 | 23 | 4 | 1 |
| 2016 | 5_1 | 44-1 | 2 | WNYWDT | WNYWDT (WNYW-DT) | 20360 | 32 | 3 | 3 |
| 2017 | 2_1 | 56-1 | 2 | WCBSDT | WCBSDT (WCBS-DT) | 16689 | 37 | 1 | 1 |
| 2018 | 5_2 | 44-2 | 2 | WNYWDT2 | WNYWDT2 (WNYW-DT2) | 30763 | 32 | 4 | 4 |
| 2019 | 7_1 | 45-1 | 2 | WABCDT | WABCDT (WABC-DT) | 20453 | NULL | NULL | NULL |
| 2020 | 9_1 | 38-1 | 2 | WWORDT | WWORDT (WWOR-DT) | 26566 | 32 | 4 | 4 |
| 2021 | 11_1 | 33-1 | 2 | WPIXDT | WPIXDT (WPIX-DT) | 20373 | 27 | 3 | 3 |
+--------+---------+--------+----------+----------+
--------------------+---------+----"

Kernel upgrade, pcHDTV driver upgrade

[One suggestion to my iobound problem email was to upgrade to 2.6.11]

Kernel upgrade from 2.6.9 to 2.6.11
# yum upgrade kernel
[reboot]

# uname -a
Linux myth.donnlee.com 2.6.11-1.14_FC3 #1 Thu Apr 7 19:23:49 EDT 2005 i686 athlon i386 GNU/Linux

Upgrade from pchdtv 1.5 drivers to 2.0 with DVB. Old 1.5 drivers didn't seem to work with the new kernel.

Download pcHDTV-2.0.tar.gz from pchdtv.com
pchdtv 2.0 dir: 'make' and 'make install'
'make udev' said "udev is up to date"

REBOOT

After reboot modprobe:

modprobe cx88-dvb


dmesg:

Linux video capture interface: v1.00
cx2388x v4l2 driver version 0.0.4 loaded
ACPI: PCI interrupt 0000:00:09.0[A] -> GSI 11 (level, low) -> IRQ 11
cx88[0]: subsystem: 7063:3000, board: pcHDTV HD3000 HDTV [card=22,autodetected]
tuner 1-0061: chip found @ 0xc2 (cx88[0])
tuner 1-0061: type set to 52 (Thomson DDT 7610 (ATSC/NTSC))
cx88[0]/0: found at 0000:00:09.0, rev: 5, irq: 11, latency: 32, mmio: 0xe200
0000
cx88[0]/0: registered device video0 [v4l2]
cx88[0]/0: registered device vbi0
cx88[0]/0: registered device radio0
ACPI: PCI interrupt 0000:00:0c.0[A] -> GSI 10 (level, low) -> IRQ 10
cx88[1]: subsystem: 7063:3000, board: pcHDTV HD3000 HDTV [card=22,autodetect
ed]
tuner 2-0061: chip found @ 0xc2 (cx88[1])
tuner 2-0061: type set to 52 (Thomson DDT 7610 (ATSC/NTSC))
cx88[1]/0: found at 0000:00:0c.0, rev: 5, irq: 10, latency: 32, mmio: 0xe400
0000
cx88[1]/0: registered device video1 [v4l2]
cx88[1]/0: registered device vbi1
cx88[1]/0: registered device radio1
cx2388x dvb driver version 0.0.4 loaded
ACPI: PCI interrupt 0000:00:09.2[A] -> GSI 11 (level, low) -> IRQ 11
cx88[0]/2: found at 0000:00:09.2, rev: 5, irq: 11, latency: 32, mmio: 0xe300
0000
cx88[0]/2: cx2388x based dvb card
DVB: registering new adapter (cx88[0]).
DVB: registering frontend 0 (pcHDTV HD3000 HDTV)...
ACPI: PCI interrupt 0000:00:0c.2[A] -> GSI 10 (level, low) -> IRQ 10
cx88[1]/2: found at 0000:00:0c.2, rev: 5, irq: 10, latency: 32, mmio: 0xe500
0000
cx88[1]/2: cx2388x based dvb card
DVB: registering new adapter (cx88[1]).
DVB: registering frontend 1 (pcHDTV HD3000 HDTV)...

dev:

[root@myth ~]# ls -l /dev/dvb/adapter
adapter0/ adapter1/

[root@myth ~]# ls -l /dev/dvb/adapter0/
demux0 dvr0 frontend0 net0

startx and run mythtv-setup
"Yes, delete my card settings"
Capture Cards
>> type: DVB
>> DVB card number: 0

but dialog box says "Recompile with DVB-Support!"

====

make clean
make distclean

[root@myth mythtv]# ./configure --enable-dvb --dvb-path=/usr/include --enable-proc-opt
WARNING: include the output of ./configure along with
any bug report, when using a processor optimized build.
# Basic Settings
Compile type release
Compiler cache no
DistCC no
Install prefix /usr/local
CPU x86 (athlon)
Big Endian no
MMX enabled yes
Vector Builtins no

# Input Support
Joystick menu yes
lirc support no
ivtv support yes
FireWire support no
DVB support yes [/usr/include]

# Sound Output Support
OSS support yes
ALSA support yes
aRts support no
JACK support no

# Video Output Support
x11 support yes
xrandr support yes
xv support yes
XvMC support no
XvMC VLD support no
OpenGL vsync no
DirectFB no

Creating config.mak and config.h

# qmake mythtv.pro
# make
# make install

===

Now in mythtv-setup it says:

Type: DVB
DVB card #: 0
Card name: pcHDTV HD3000 HDTV
Card type: ATSC
DiSEqC input type (DVB-S): *greyed out* [good]
Default input: *greyed out* [good]

After associating each card with source=Antenna, goto option 5, Channel Editor.
"Scan for channels"
type: "Full scan"
Let it run the scan
Look for "Signal Locked" messages [good]

Start BE:
# mythbackend


Start FE and a recording:

2005-05-18 13:13:50.433 Started recording "Texas Justice" on channel: 1002 on cardid: 1, sour
ceid 1
2005-05-18 13:13:50.438 DVB#0 ERROR - Could not find dvb tuning parameters for transport 0
2005-05-18 13:13:50.438 DVB#0 ERROR - Failed to get channel options for channel 2_1.
2005-05-18 13:13:50.728 Changing from None to RecordingOnly
2005-05-18 13:13:50.759 DVB#0 Recorder: Card opened successfully (using PS mode).
2005-05-18 13:13:50.761 DVB#0 ERROR - No PIDS set, please correct your channel setup.
2005-05-18 13:13:51.761 DVB#0 WARNING - No data from card in 1 second.
2005-05-18 13:13:52.762 DVB#0 WARNING - No data from card in 1 second.
2005-05-18 13:13:53.763 DVB#0 WARNING - No data from card in 1 second.
2005-05-18 13:13:54.764 DVB#0 WARNING - No data from card in 1 second.
2005-05-18 13:13:55.764 DVB#0 WARNING - No data from card in 1 second.
2005-05-18 13:13:56.765 DVB#0 WARNING - No data from card in 1 second.


Get dvb-apps:

cvs -d :pserver:anonymous@cvs.linuxtv.org:/cvs/linuxtv login
[empty pw]
cvs -z3 -d :pserver:anonymous@cvs.linuxtv.org:/cvs/linuxtv co dvb-apps

make bindir=/usr/local/bin datadir=/usr/local/share libdir=/usr/local/lib
make bindir=/usr/local/bin datadir=/usr/local/share libdir=/usr/local/lib DESTDIR=/ install

'make ... install' had these errors:

/bin/sh: -c: line 0: syntax error near unexpected token `do'
/bin/sh: -c: line 0: `for d in dvb-* ; do test -d $d continue ; echo ..... $d ..... for d
in atsc ; do test -d $d continue ; echo ..... $d ..... ; mkdir -p //usr/local/share/dvb/
$d/ ; cp `find $d -type f` //usr/local/share/dvb/$d/ ; done'
make[2]: *** [install-data] Error 2
make[2]: Leaving directory `/root/cvs/dvb-apps/util/scan'
make[1]: *** [Makefile] Error 2
make[1]: Leaving directory `/root/cvs/dvb-apps/util'
make: *** [install] Error 2

[no search hits]

Installed these files:

[root@myth dvb-apps]# ls -R
.:
usr

./usr:
local

./usr/local:
bin share

./usr/local/bin:
atscscan azap czap dvbscan femon szap tzap

./usr/local/share:
dvb

./usr/local/share/dvb:


Don't bother with installed binaries, just use the compiled bins in cvs/dvb-apps.


Tried to run:
cd dvb-apps/util/szap/channels-conf/atsc
perl make_atsc_chanconf.pl 92107 > ~/.azap/channels.conf

Got perl error:
Can't locate XML/XPath.pm in @INC

Fix, search hit:

"""To fix this, you need to install one or more Perl modules from CPAN. If you get the above error message, the missing module's name is XML::XPath (because Perl could not locate XML/XPath.pm, that means the module's name is XML::XPath).

To install module XML::XPath, run this command at the command line:

perl -MCPAN -e 'install "XML::XPath"'
(note the single and double quotes). This command may ask you many questions; in most cases, it is perfectly okay to simply hit return if you aren't sure. Depending on the load of the CPAN servers, executing this command may take a while.
"""

This time it worked:
perl make_atsc_chanconf.pl 92107 > ~/.azap/channels.conf

[root@myth atsc]# cat ~/.azap/channels.conf
KSTS:683000000:8VSB:0:0
KTEH:689000000:8VSB:0:0
KNTV:207000000:8VSB:0:0
KDTV:695000000:8VSB:0:0
KICU:701000000:8VSB:0:0
KPIX:563000000:8VSB:0:0
KKPX:635000000:8VSB:0:0
KQED:569000000:8VSB:0:0
KFSF:593000000:8VSB:0:0
KSMS:575000000:8VSB:0:0
KBHK:659000000:8VSB:0:0
KCNS:623000000:8VSB:0:0
KCSM:647000000:8VSB:0:0
KTSF:551000000:8VSB:0:0
KGO:533000000:8VSB:0:0
KBWB:503000000:8VSB:0:0
KTVU:725000000:8VSB:0:0
KMTP:587000000:8VSB:0:0
KRON:731000000:8VSB:0:0


[root@myth szap]# ./azap -r KGO
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
tuning to 533000000 Hz
video pid 0x0000, audio pid 0x0000
status 00 signal 3ef9 snr e4ff ber 00000000 unc 00000000
status 1f signal d80f snr f9c5 ber 00000000 unc 00000000 FE_HAS_LOCK
status 1f signal d1a9 snr f991 ber 00000000 unc 00000000 FE_HAS_LOCK
status 1f signal d3b5 snr f9c7 ber 00000000 unc 00000000 FE_HAS_LOCK
status 1f signal d5c1 snr f9cd ber 00000000 unc 00000000 FE_HAS_LOCK




[root@myth szap]# cd ../dvbtraffic/
[root@myth dvbtraffic]# ./dvbtraffic
0000 9 p/s 1 kb/s 14 kbit
0030 10 p/s 1 kb/s 16 kbit
0031 5365 p/s 984 kb/s 8069 kbit
0034 281 p/s 51 kb/s 423 kbit
0040 9 p/s 1 kb/s 14 kbit
0041 2449 p/s 449 kb/s 3684 kbit
0044 156 p/s 28 kb/s 234 kbit
1ffb 39 p/s 7 kb/s 59 kbit
1fff 4578 p/s 840 kb/s 6885 kbit
2000 12901 p/s 2368 kb/s 19403 kbit


1fff and 2000 are totals not pids.


31 and 34 are good pid. convert to dec: 49 and 52.
edit ~/.azap/channels.conf

KGO:533000000:8VSB:49:52

Restart azap:

[root@myth szap]# ./azap -r KGO
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
tuning to 533000000 Hz
video pid 0x0031, audio pid 0x0034
status 1f signal d5c1 snr f9a9 ber 00000000 unc 00000000 FE_HAS_LOCK
status 1f signal d5c1 snr f99f ber 00000000 unc 00000000 FE_HAS_LOCK
status 1f signal d80f snr f9b5 ber 00000000 unc 00000000 FE_HAS_LOCK
status 1f signal d5c1 snr f9d7 ber 00000000 unc 00000000 FE_HAS_LOCK

looks good.


In another window:
# cat /dev/dvb/adapter0/dvr0 > ~/test.mpg

Writes video to file.

dvbscan info (while azap is running):

[root@myth scan]# ./dvbscan -c
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
service is running. Channel number: 7:1. Name: 'KGO-DT '
service is running. Channel number: 7:2. Name: 'KGO-DT '
dumping lists (2 services)
KGO-DT (0x0003) 00: PCR == V V 0x0031 A 0x0034 (eng) 0x0034 (eng)
KGO-DT (0x0004) 00: PCR == V V 0x0041 A 0x0044 (eng) 0x0044 (eng)
Done.


Noticed that dvb_channel table in mysql was empty.

Reran mythtv-setup, and this time told it to Delete my channel information.
Created the "Antenna" video source again.
Remapped "Antenna" to each DVB card.

Re-scanned channels in mythtv-setup.
(scanning adds channels that can be tuned to but have no guide-info)


# mythfilldatabase
(this adds channels that have guide-info but cannot be tuned to)

SELECT xmltvid,chanid,channum,freqid,callsign,name,
mplexid,serviceid,atscsrcid FROM channel;


(this is table before doing mythfilldatabase)

mysql> SELECT xmltvid,chanid,channum,freqid,callsign,name,
mplexid,serviceid,atscsrcid FROM channel;
+---------+--------+---------+--------+----------+
---------+---------+-----------+-----------+
xmltvid chanid channum freqid callsign name mplexid serviceid atscsrcid
+---------+--------+---------+--------+----------+
---------+---------+-----------+-----------+
1000 111 NULL KNTV-HD KNTV-HD 2 4 1
1001 112 NULL NBC Wea NBC Wea 2 5 2
1002 201 NULL KBWB-HD KBWB-HD 3 3 1
1003 202 NULL KBWB-SD KBWB-SD 3 4 2
1004 71 NULL KGO-DT KGO-DT 4 3 1
1005 72 NULL KGO-DT KGO-DT 4 4 2
1006 261 NULL KTSF-D1 KTSF-D1 5 3 3
1007 262 NULL KTSF-D2 KTSF-D2 5 4 4
1008 51 NULL KPIX DT KPIX DT 6 1 1
1009 91 NULL KQED-HD KQED-HD 7 3 1
1010 92 NULL ENCORE ENCORE 7 4 2
1011 93 NULL WORLD WORLD 7 5 3
1012 94 NULL LIFE LIFE 7 6 4
1013 95 NULL KIDS KIDS 7 7 5
1014 321 NULL KMTP-DT KMTP-DT 9 3 3
1015 21 NULL KFSF-DT KFSF-DT 10 3 1
1016 381 NULL KCNS KCNS 11 3 3
1017 11 NULL KKPX-DT KKPX-DT 12 3 3
1018 12 NULL PaxEast PaxEast 12 4 4
1019 13 NULL Worship Worship 12 5 5
1020 14 NULL Faith Faith 12 6 6
1021 431 NULL KCSM TV KCSM TV 13 2 1
1022 432 NULL Jazz TV Jazz TV 13 3 2
1023 441 NULL KBHK-DT KBHK-DT 14 1 1
1024 41 NULL KTLN-DT KTLN-DT 15 3 1
1025 481 NULL KSTS-DT KSTS-DT 16 3 3
1026 482 NULL KNTV-DT KNTV-DT 16 4 4
1027 541 NULL KTEH-DT KTEH-DT 17 1 1
1028 141 NULL KDTV-DT KDTV-DT 18 3 1
1029 361 NULL KICU-HD KICU-HD 19 3 1
1030 21 NULL KTVUHD KTVUHD 20 3 1
1031 22 NULL KTVU-DT KTVU-DT 20 4 2
1032 41 NULL KRON-SD KRON-SD 21 3 3
1033 42 NULL KRON-HD KRON-HD 21 4 4
+---------+--------+---------+--------+----------+
---------+---------+-----------+-----------+
34 rows in set (0.00 sec)

After mythfilldatabase, table is:


mysql> SELECT xmltvid,chanid,channum,freqid,callsign,name,
mplexid,serviceid,atscsrcid FROM channel;
+---------+--------+---------+--------+----------+
-------------------------------+---------+-----------+-----------+
xmltvid chanid channum freqid callsign name mplexid serviceid atscsrcid
+---------+--------+---------+--------+----------+
-------------------------------+---------+-----------+-----------+
1000 111 NULL KNTV-HD KNTV-HD 2 4 1
1001 112 NULL NBC Wea NBC Wea 2 5 2
1002 201 NULL KBWB-HD KBWB-HD 3 3 1
1003 202 NULL KBWB-SD KBWB-SD 3 4 2
1004 71 NULL KGO-DT KGO-DT 4 3 1
1005 72 NULL KGO-DT KGO-DT 4 4 2
1006 261 NULL KTSF-D1 KTSF-D1 5 3 3
1007 262 NULL KTSF-D2 KTSF-D2 5 4 4
1008 51 NULL KPIX DT KPIX DT 6 1 1
1009 91 NULL KQED-HD KQED-HD 7 3 1
1010 92 NULL ENCORE ENCORE 7 4 2
1011 93 NULL WORLD WORLD 7 5 3
1012 94 NULL LIFE LIFE 7 6 4
1013 95 NULL KIDS KIDS 7 7 5
1014 321 NULL KMTP-DT KMTP-DT 9 3 3
1015 21 NULL KFSF-DT KFSF-DT 10 3 1
1016 381 NULL KCNS KCNS 11 3 3
1017 11 NULL KKPX-DT KKPX-DT 12 3 3
1018 12 NULL PaxEast PaxEast 12 4 4
1019 13 NULL Worship Worship 12 5 5
1020 14 NULL Faith Faith 12 6 6
1021 431 NULL KCSM TV KCSM TV 13 2 1
1022 432 NULL Jazz TV Jazz TV 13 3 2
1023 441 NULL KBHK-DT KBHK-DT 14 1 1
1024 41 NULL KTLN-DT KTLN-DT 15 3 1
1025 481 NULL KSTS-DT KSTS-DT 16 3 3
1026 482 NULL KNTV-DT KNTV-DT 16 4 4
1027 541 NULL KTEH-DT KTEH-DT 17 1 1
1028 141 NULL KDTV-DT KDTV-DT 18 3 1
1029 361 NULL KICU-HD KICU-HD 19 3 1
19571 1030 21 NULL KTVUHD KTVUHD 20 3 1
1031 22 NULL KTVU-DT KTVU-DT 20 4 2
1032 41 NULL KRON-SD KRON-SD 21 3 3
1033 42 NULL KRON-HD KRON-HD 21 4 4
19572 1034 5_1 29-1 KPIXDT KPIXDT (KPIX-DT) NULL NULL NULL
19573 1035 4_1 57-1 KRONDT KRONDT (KRON-DT) NULL NULL NULL
19574 1036 7_1 24-1 KGODT KGODT (KGO-DT) NULL NULL NULL
19575 1044 44_1 45-1 KBHKDT KBHKDT (KBHK-DT) NULL NULL NULL
20547 1037 4_2 57-2 KRONDT2 KRONDT2 (KRON-DT2) NULL NULL NULL
21650 1038 36_1 52-1 KICUDT KICUDT (KICU-DT) NULL NULL NULL
21785 1039 11_1 12-1 KNTVDT KNTVDT(KNTV-DT) NULL NULL NULL
24343 1040 20_1 19-1 KBWBDT KBWBDT (KBWB-DT) NULL NULL NULL
24344 1041 9_1 30-1 KQEDDT KQEDDT (KQED-DT) NULL NULL NULL
30460 1048 48_1 49-1 KSTSDT KSTSDT (KSTS-DT) NULL NULL NULL
30507 1042 9_2 30-2 KQEDDT2 KQEDDT2 (KQED-DT2) NULL NULL NULL
30833 1043 7_2 24-2 KGODT2 KGODT2 (KGO-DT2) NULL NULL NULL
31220 1045 38_1 39-1 KCNSDT KCNSDT (KCNS-DT) NULL NULL NULL
31221 1046 26_1 27-1 KTSFDT KTSFDT (KTSF-DT) NULL NULL NULL
34116 1047 9_5 30-5 KQEDDT5 KQEDDT5 (KQED-DT5) NULL NULL NULL
34168 1049 9_4 30-4 KQEDDT4 KQEDDT4 (KQED-DT4) NULL NULL NULL
35278 1050 9_3 30-3 KQEDDT3 KQEDDT3 KQED World (KQED-DT3) NULL NULL NULL
35375 1065 65_1 41-1 KKPXDT KKPXDT (KKPX-DT) NULL NULL NULL
35545 1051 43_1 43-1 KCSMDT KCSMDT (KCSM-DT) NULL NULL NULL
35547 1052 43_2 43-2 KCSMDT2 KCSMDT2 (KCSM-DT2) NULL NULL NULL
42586 1066 66_1 34-1 KFSFDT KFSFDT (KFSF-DT) NULL NULL NULL
42617 1053 14_1 51-1 KDTVDT KDTVDT (KDTV-DT) NULL NULL NULL
43082 1054 48_2 49-2 KSTSDT2 KSTSDT2 (KSTS-DT2) NULL NULL NULL
44200 1055 43_3 43-3 KCSMDT3 KCSMDT3 (KCSM-DT3) NULL NULL NULL
44690 1056 54_1 50-1 KTEHDT KTEHDT (KTEH-DT) NULL NULL NULL
+---------+--------+---------+--------+----------+
-------------------------------+---------+-----------+-----------+
59 rows in set (0.00 sec)


UPDATE mytable SET age='22' WHERE age='21'

Add mythfill data to scanned channels:
UPDATE channel SET xmltvid='19571' WHERE chanid='1030';

UPDATE channel SET xmltvid='19572' WHERE chanid='1008';
UPDATE channel SET xmltvid='19574' WHERE chanid='1004';
UPDATE channel SET xmltvid='43082' WHERE chanid='1026';

UPDATE channel SET xmltvid='' WHERE chanid='';

Add scan info to mythfill'ed channels (better, retains my recording schedules):

UPDATE channel SET mplexid='16', serviceid='4', atscsrcid='4' WHERE chanid='1054';
UPDATE channel SET mplexid='4', serviceid='3', atscsrcid='1' WHERE chanid='1036';


UPDATE channel SET mplexid='6', serviceid='1', atscsrcid='1' WHERE chanid='1034';
UPDATE channel SET mplexid='21', serviceid='3', atscsrcid='3' WHERE chanid='1035';
UPDATE channel SET mplexid='14', serviceid='1', atscsrcid='1' WHERE chanid='1044';
UPDATE channel SET mplexid='3', serviceid='3', atscsrcid='1' WHERE chanid='1040';
UPDATE channel SET mplexid='7', serviceid='3', atscsrcid='1' WHERE chanid='1041';
UPDATE channel SET mplexid='17', serviceid='1', atscsrcid='1' WHERE chanid='1056';

UPDATE channel SET mplexid='7', serviceid='4', atscsrcid='2' WHERE chanid='1042';
UPDATE channel SET mplexid='7', serviceid='5', atscsrcid='3' WHERE chanid='1050';
UPDATE channel SET mplexid='7', serviceid='6', atscsrcid='4' WHERE chanid='1049';
UPDATE channel SET mplexid='7', serviceid='7', atscsrcid='5' WHERE chanid='1047';
UPDATE channel SET mplexid='21', serviceid='4', atscsrcid='4' WHERE chanid='1037';
UPDATE channel SET mplexid='19', serviceid='3', atscsrcid='1' WHERE chanid='1038';

UPDATE channel SET mplexid='2', serviceid='4', atscsrcid='1' WHERE chanid='1039';
UPDATE channel SET mplexid='16', serviceid='3', atscsrcid='3' WHERE chanid='1048';
UPDATE channel SET mplexid='4', serviceid='4', atscsrcid='2' WHERE chanid='1043';
UPDATE channel SET mplexid='11', serviceid='3', atscsrcid='3' WHERE chanid='1045';
UPDATE channel SET mplexid='5', serviceid='3', atscsrcid='3' WHERE chanid='1046';
UPDATE channel SET mplexid='12', serviceid='3', atscsrcid='3' WHERE chanid='1065';
UPDATE channel SET mplexid='13', serviceid='2', atscsrcid='1' WHERE chanid='1051';
UPDATE channel SET mplexid='13', serviceid='3', atscsrcid='2' WHERE chanid='1052';
UPDATE channel SET mplexid='10', serviceid='3', atscsrcid='1' WHERE chanid='1066';
UPDATE channel SET mplexid='18', serviceid='3', atscsrcid='1' WHERE chanid='1053';

UPDATE channel SET mplexid='', serviceid='', atscsrcid='' WHERE chanid='';

All scan data added to mythfill rows:

mysql> SELECT xmltvid,chanid,channum,freqid,callsign,name,
mplexid,serviceid,atscsrcid FROM channel;
+---------+--------+---------+--------+----------+
-------------------------------+---------+-----------+-----------+
xmltvid chanid channum freqid callsign name mplexid serviceid atscsrcid
+---------+--------+---------+--------+----------+
-------------------------------+---------+-----------+-----------+
1000 111 NULL KNTV-HD KNTV-HD 2 4 1
1001 112 NULL NBC Wea NBC Wea 2 5 2
1002 201 NULL KBWB-HD KBWB-HD 3 3 1
1003 202 NULL KBWB-SD KBWB-SD 3 4 2
19574 1004 71 NULL KGO-DT KGO-DT 4 3 1
1005 72 NULL KGO-DT KGO-DT 4 4 2
1006 261 NULL KTSF-D1 KTSF-D1 5 3 3
1007 262 NULL KTSF-D2 KTSF-D2 5 4 4
19572 1008 51 NULL KPIX DT KPIX DT 6 1 1
1009 91 NULL KQED-HD KQED-HD 7 3 1
1010 92 NULL ENCORE ENCORE 7 4 2
1011 93 NULL WORLD WORLD 7 5 3
1012 94 NULL LIFE LIFE 7 6 4
1013 95 NULL KIDS KIDS 7 7 5
1014 321 NULL KMTP-DT KMTP-DT 9 3 3
1015 21 NULL KFSF-DT KFSF-DT 10 3 1
1016 381 NULL KCNS KCNS 11 3 3
1017 11 NULL KKPX-DT KKPX-DT 12 3 3
1018 12 NULL PaxEast PaxEast 12 4 4
1019 13 NULL Worship Worship 12 5 5
1020 14 NULL Faith Faith 12 6 6
1021 431 NULL KCSM TV KCSM TV 13 2 1
1022 432 NULL Jazz TV Jazz TV 13 3 2
1023 441 NULL KBHK-DT KBHK-DT 14 1 1
1024 41 NULL KTLN-DT KTLN-DT 15 3 1
1025 481 NULL KSTS-DT KSTS-DT 16 3 3
43082 1026 482 NULL KNTV-DT KNTV-DT 16 4 4
1027 541 NULL KTEH-DT KTEH-DT 17 1 1
1028 141 NULL KDTV-DT KDTV-DT 18 3 1
1029 361 NULL KICU-HD KICU-HD 19 3 1
19571 1030 21 NULL KTVUHD KTVUHD 20 3 1
1031 22 NULL KTVU-DT KTVU-DT 20 4 2
1032 41 NULL KRON-SD KRON-SD 21 3 3
1033 42 NULL KRON-HD KRON-HD 21 4 4
19572 1034 5_1 29-1 KPIXDT KPIXDT (KPIX-DT) 6 1 1
19573 1035 4_1 57-1 KRONDT KRONDT (KRON-DT) 21 3 3
19574 1036 7_1 24-1 KGODT KGODT (KGO-DT) 4 3 1
19575 1044 44_1 45-1 KBHKDT KBHKDT (KBHK-DT) 14 1 1
20547 1037 4_2 57-2 KRONDT2 KRONDT2 (KRON-DT2) 21 4 4
21650 1038 36_1 52-1 KICUDT KICUDT (KICU-DT) 19 3 1
21785 1039 11_1 12-1 KNTVDT KNTVDT(KNTV-DT) 2 4 1
24343 1040 20_1 19-1 KBWBDT KBWBDT (KBWB-DT) 3 3 1
24344 1041 9_1 30-1 KQEDDT KQEDDT (KQED-DT) 7 3 1
30460 1048 48_1 49-1 KSTSDT KSTSDT (KSTS-DT) 16 3 3
30507 1042 9_2 30-2 KQEDDT2 KQEDDT2 (KQED-DT2) 7 4 2
30833 1043 7_2 24-2 KGODT2 KGODT2 (KGO-DT2) 4 4 2
31220 1045 38_1 39-1 KCNSDT KCNSDT (KCNS-DT) 11 3 3
31221 1046 26_1 27-1 KTSFDT KTSFDT (KTSF-DT) 5 3 3
34116 1047 9_5 30-5 KQEDDT5 KQEDDT5 (KQED-DT5) 7 7 5
34168 1049 9_4 30-4 KQEDDT4 KQEDDT4 (KQED-DT4) 7 6 4
35278 1050 9_3 30-3 KQEDDT3 KQEDDT3 KQED World (KQED-DT3) 7 5 3
35375 1065 65_1 41-1 KKPXDT KKPXDT (KKPX-DT) 12 3 3
35545 1051 43_1 43-1 KCSMDT KCSMDT (KCSM-DT) 13 2 1
35547 1052 43_2 43-2 KCSMDT2 KCSMDT2 (KCSM-DT2) 13 3 2
42586 1066 66_1 34-1 KFSFDT KFSFDT (KFSF-DT) 10 3 1
42617 1053 14_1 51-1 KDTVDT KDTVDT (KDTV-DT) 18 3 1
43082 1054 48_2 49-2 KSTSDT2 KSTSDT2 (KSTS-DT2) 16 4 4
44200 1055 43_3 43-3 KCSMDT3 KCSMDT3 (KCSM-DT3) NULL NULL NULL
44690 1056 54_1 50-1 KTEHDT KTEHDT (KTEH-DT) 17 1 1
+---------+--------+---------+--------+----------+
-------------------------------+---------+-----------+-----------+
59 rows in set (0.00 sec)

Deleted ch 66_1 KFSF, Spanish (channum "21" conflicted with "21" KTVU).

VERY IMPORTANT: You must restart the myth backend after removing conflicting channum "21" (KFSF). Otherwise, it will keep recording KFSF and not KTVU.

DELETE FROM channel WHERE chanid='1015';

Deleted non-unique ch41, KTLN.

mplexid seems to change every time you rescan. This means you cannot use the mplexid of a previous scan on the current scan. The mplexid has been reliable on every scan (there has not been a need to change it from the scanned value).

[end]

Mailing List Archive: hdtv guide data

Mailing List Archive: hdtv guide data: "When you scan for channels and run mythfilldatabase you get two sets
of the same channels. (More or less.) Those added by the scan have no
guide info, but you can tune them. mythfilldatabase added channels
that cannot be tuned but have guide data (obviously.)

So, you have two choices:

1) Add xmltvid's to those channels added by the scan and mark the
mythfilldatabases as not 'visible'. This is in the channel editor,
BTW. However, marking them not visible doesn't remove them from
livetv browse, just the guide. This is the easiest and if you don't
use livetv much or at all just do this one. You can't delete the
mythfilldatabase channels, they'll just come back next time it runs.

2) Update the channel entries for the mythfilldatabase added entries
so that they can be tuned, then delete the scanned channels from the
channel table.

2 is a bit more involved and you have to look at your mysql tables.
The important values are in the channel table... for the scanned
channels you will see entries in the mplexid, serviceid, and atscsrcid
fields. In the equivalent mythfilldatabase added channel record, set
the above fields to what you see in the scanned channel entry.

You have to do this for each channel. When you're done you should be
able to tune the mythfilldatabase channels. When you're sure it's all
working you can delete the channel records corresponding with the
scanned channels."

pchdtv.com :: View topic - HowTo: Test the HD-3000 DVB using dvb-apps

pchdtv.com :: View topic - HowTo: Test the HD-3000 DVB using dvb-apps

DCL archive:
http://www.employees.org/~donn/htpc/test_hd-3000_dvb_using_dvb-apps.htm

MythTV DVB Setup Guide

MythTV DVB Setup Guide

pchdtv.com :: View topic - pcHDTV 2.0 drivers with mythtv 0.18

pchdtv.com :: View topic - pcHDTV 2.0 drivers with mythtv 0.18: "I'm in the Sacto., CA area and to get good playback/recording for FOX 40 (and better all around I think) I had to go into the Advanced Options -> Recording for the DVB Capture card and select use TS instead of PS option."

Kernel modules info

Quick HOWTO: Creating Custom Linux Kernels

pchdtv.com :: View topic - pcHDTV 2.0 drivers with mythtv 0.18

pchdtv.com :: View topic - pcHDTV 2.0 drivers with mythtv 0.18: "I'm on FC3 (2.6.11smp), pcHDTV 2.0 drivers, mythtv 0.18 (from atrpms mythtv-suite). Looks to me like maybe you've got both the atsc and dvb drivers loading? I was unable to get the 2.0 atsc drivers to work with mythtv since they don't use /dev/video32 and up sockets which mythtv appearantly wants. But the dvb driver is working great.

What worked for me was to make sure FC3 doesn't try to load the atsc drivers by listing them in /etc/hotplug/blacklist. Then `modprobe cx88-dvb` which created /dev/dvb/adapter0 directory with several devices in it (I had to manually install the udev files since `make udev` didn't work for me). Then in mythtvsetup I added the capture device as a DVB card using the default device (dvb device 0?) *not* a pcHDTV and this worked for me. "

Upgrading Using Yum

Upgrading Using Yum: "Kernel Upgrade
I don't know if it is strictly necessary to upgrade the kernel separately, but that's what I did. A quick check ('yum check-update | grep -i kernel') tells me that there is a kernel upgrade between .94 and .95. So the first thing I did was:

yum upgrade kernel"

Tuesday, May 17, 2005

The Musician's Guide To PCI Slots & Interrupts

The Musician's Guide To PCI Slots & Interrupts

PCGuide - Ref - IRQ Function and Operation

PCGuide - Ref - IRQ Function and Operation

Monday, May 16, 2005

IOBOUND troubleshooting

CPU overheating problem? Took panels off case.

===

Put tuners on different interrupts:

Was:

[root@myth ~]# cat /proc/interrupts
CPU0
0: 117748684 XT-PIC timer
1: 155 XT-PIC i8042
2: 0 XT-PIC cascade
8: 1 XT-PIC rtc
9: 0 XT-PIC acpi
10: 2 XT-PIC uhci_hcd, ohci1394
11: 63076644 XT-PIC cx8800[0], cx8800[1], ehci_hcd, uhci_hcd, uhci_hcd, eth0
12: 66 XT-PIC i8042
14: 9395 XT-PIC ide0
15: 849659 XT-PIC ide1
NMI: 0
ERR: 0

Now (after moving one tuner to slot 2nd from the bottom):

[root@myth ~]# cat /proc/interrupts
CPU0
0: 148924 XT-PIC timer
1: 311 XT-PIC i8042
2: 0 XT-PIC cascade
8: 1 XT-PIC rtc
9: 0 XT-PIC acpi
10: 2 XT-PIC cx8800[1], uhci_hcd, ohci1394
11: 71 XT-PIC cx8800[0], ehci_hcd, uhci_hcd, uhci_hcd, eth0
12: 66 XT-PIC i8042
14: 687 XT-PIC ide0
15: 3242 XT-PIC ide1
NMI: 0
ERR: 0

SPDIF recording with SBLive

linux-audio-user: Re: [linux-audio-user] Recording from SPDIF w: "Yes this is a well known problem of the SB Live. The EMU10K1 Chips work
only at 48kHz and the SPDIF input is resampling the data to 48kHz
whatever is the input sample rate (even if this is 48kHz). So it's not
possible to do sample accurate digital copy from SPDIF-in. Most semi-pro
audio cards support exact recording from SPDIF, the M-audio cards for
example are well supported under Linux (the Audiophile is a good
candidate if you don't need multiple IO). "

Sunday, May 15, 2005

Internal buffers increased again

Now:
TFW_DEF_BUF_SIZE (32*1024*1024)

rbuffer->SetWriteBufferSize(64*1024*1024)

MPlayer - Fedora Guide

MPlayer - Fedora Guide: "MPlayer - Fedora Guide"

ALSA and passthru

: "Perhaps I can clear up some mystification about AC3 passthrough in
general and mplayer in special:

To get the external decoder solution working, it must be fed with data
which is bitidentical to the chunks in the source ac3 file (compressed
data is very picky about bit errors). Additionally - or better to say
'historically' - the non-audio bit should be set in the spdif status
fields to prevent old spdif hardware from reproducing ugly scratchy
noise. Note: for current decoders (probably those with DTS capability)
this safety bit isn't needed anymore. At least I can state that for my
Sherwood RVD-6095RDS. I think it is due to DTS because DTS sound can
reside on a ordinary AudioCD and an ordinary AudioCD-Player will always
have it's audio-bit set.

The sample format of the data must be 2channel 16bit (little endian
IIRC). Samplerates are 48kHz - although my receiver also accepts
44100Hz. I do not know if this is due to an over-compatability of my
receiver or if 44100 is also possible in the ac3 specs. For safety's
sake lets keep this at 48000Hz. AC3 data chunks are inserted into the
stream every 0x1600 bytes (don't bite me on that, look into
'ac3-iec958.c': 'ac3_iec958_build_burst').

To come back to the problem: data must be played bit-identically through
the soundcard at the correct samplerate and should optionally have it's
non-audio bit set. There are two ways to accomplish this:

1) Some OSS guy invented the format AFMT_AC3. Soundcard drivers
implementing this format should therefore adjust it's mixers and
switches to produce the desired output. Unfortunately some soundcard
drivers do not support this format correctly and most do not even
support it at all (including ALSA)."

e2fsadm not found

redhat.com | Red Hat, Inc.: "You could either do a full e2fsck on it (it should be able to recover this
since the metadata that the inode table is overlapping is unused and e2fsck
will make a copy of the duplicate blocks) or you could use resize2fs to
shrink it back to the original size (that should also make the problem go
away). Best to do this before doing any writes to the filesystem, and I
would suggest making a backup, but since this is already a backup...

> Well, I do have ext2online installed, although there's no e2fsadm. I'll
> have to check for other RPMs...

It would be part of the lvm 1.0 tools if it was anywhere. It is just a
convenience wrapper around lvextend and ext2online (or resize2fs for
unmounted resizes)."

Shrink ext3 filesystem

: "I am finding that e2fsadm will resize both the ext3 partition and the LVM.
Here's the command I'm running:
umount /dev/fileshare/share
e2fsck -f /dev/fileshare/share
e2fsadm -L 45G /dev/fileshare/share

Then to remove the unused volumes, run vgreduce:

vgreduce -a /dev/fileshare"

Recompile: Compile error

Installing and using MythTV: Troubleshooting.: "Internal Segmentation Fault.
This is most likely to be caused by an overheating processor rather than an actual programming fault within gcc."

So, reverted back to overvoltage=Auto, Cpu host freq=133 (cpu host clock control = disabled).

LVM HOWTO

LVM HOWTO: "Distributing Old Extents to a New Replacement Disk"

pvmove: Reduce LV first.

redhat.com | Red Hat, Inc.: "> % pvmove /dev/sdb
> No extents available for allocation
>
> I'm assuming that this means that there's nowhere to move the data that
> is on /dev/sdb. I further assume this means that I need some free
> physical extents somewhere. This is where I'm confused. When I set up
> LVM, I allocated all of my spare drives to it. So I have a 271GB
> logical volume of which I'm using only 32GB. So I know that I have free
> space to move the data around; I just don't know how to do it.

Your logical volume is 100% used by the filesystem. It sounds like the
filesystem isn't full though, but LVM doesn't know that.

You need to shrink your filesystem, then shrink your LV, then use
pvmove."

pchdtv.com :: View topic - Buffer overruns with HD3000 & myth-0.16

pchdtv.com :: View topic - Buffer overruns with HD3000 & myth-0.16: "Enlarge the kernel buffer in the HD-3000 driver.
(assuming Fedora-Core2) Do this:

host# cd HD-3000-CD-04/FedoraCore2-Kernel-2.6-systems/drivers/FedoraCore2-HD3000-driver-rev-1.4
host# vi cx88-atsc.c
[Change BUF_DEFAULT from 188*512 to 188*1536. Note that larger
values may not work.]
host# make install "

IOBOUND, Re: [mythtv] [PATCH] RingBuffer - fsync thread

Re: [mythtv] [PATCH] RingBuffer - fsync thread

"While the backend is recording, try:

tail -f /var/log/messages.log

When watching the shows, if you see any corruption, or glitches, it is
probably caused by the HD-3000 driver overrunning it's buffer."


My log:
May 14 23:45:52 myth kernel: cx88atsc: buffer overrun
May 14 23:46:23 myth last message repeated 20 times
May 14 23:47:24 myth last message repeated 39 times
May 14 23:48:25 myth last message repeated 22 times
May 14 23:49:26 myth last message repeated 43 times
May 14 23:50:28 myth last message repeated 42 times
May 14 23:51:29 myth last message repeated 41 times
May 14 23:52:30 myth last message repeated 42 times
May 14 23:53:32 myth last message repeated 42 times
May 14 23:54:33 myth last message repeated 43 times
May 14 23:55:34 myth last message repeated 44 times

Thursday, May 12, 2005

Recording profiles don't matter with HD; How HD is stored into files

> Recording profiles have no meaning with the HD-3000 as the incoming
> stream does not need to be encoded. It is already MPEG2 (in an MPEG-TS
> container). the Nuv format is also just a wrapper that MythTV wraps
> your stream in, so once again, no converting is done here. Now... with
> regards to converting them to Divx, that you can do with transcoding
> profiles, or mencoder, or transcode. Each has it's own pros and cons.

no, in this case, nuv is *not* a wrapper. With HDTV, the file is pure
and simple an mpeg transport stream that happens to have a .nuv suffix
on its name instead of .mpg.

[myth-users]

How myth stores HD channels with multiple subchannels

> Does that mean it includes both 'channels' for HD channels that have > 1
> subchannels ?

When I originally wrote the HDTV code it did, but that has since
changed. The reason is rarely do you want to record more than 1
subchannel. So, when you record a channel it takes the incoming data
and strips all the other subchannels off, except for the one you had set
to record. You also would then have to have 2 HDTV tuners to record 2
subchannels on one channel right now, but this will change in the future
(We just need a smarter packet processor that knows it should save N
number of streams to different files if you want more than 1 stream on
the same channel, and DVB will better support this feature also.)

There is also some additional processing done on the packets to get rid
of redundant data, so we're not storing pure MPEG-TS streams... They're
closer to/if not mpeg-ps streams when saved to disk.

--Brandon

[myth-users]

Wednesday, May 11, 2005

More RAM in backend

Still more IOBOUND errors. Measures taken:

a. Removed 'noapic' from kernel options (at boot). This reverts back to FC3 canned bootup.

b. Increased internal write buffers. TFW_DEF_BUF_SIZE now (8*1024*1024) in RingBuffer.cpp, set SetWriteBufferSize(16*1024*1024) in tv_rec.cpp.

c. Added 512MB PC3200 CL2.5 ram stick. Now 768MB DDR in backend.

Rollback to 4/22 versions

After rolling back and recompiling:

[root@myth ~]# mythbackend --version
0.18.20050409-1

[root@be mythtv]# mythfrontend --version
0.18.20050409-1

Rolling back to previous CVS date

cvs -d :pserver:mythtv@cvs.mythtv.org:/var/lib/mythcvs login

cvs -z3 -d :pserver:mythtv@cvs.mythtv.org:/var/lib/mythcvs update -D "2005-04-22" mythtv

If subdirs are empty:
cvs -z3 -d :pserver:mythtv@cvs.mythtv.org:/var/lib/mythcvs checkout -D "2005-04-22" mythtv


View revision (total history):
>> cvs log hello.c

Proving I'm rolled back to a previous date:

Get current:
# cvs -z3 -d :pserver:mythtv@cvs.mythtv.org:/var/lib/mythcvs update -D now mythtv

# Get status of a file:

[root@myth libmythtv]# cvs -Q status blend.c
===================
File: blend.c Status: Up-to-date

Working revision: 1.2
Repository revision: 1.2 /var/lib/mythcvs/mythtv/libs/libmythtv/blend
.c,v
Sticky Date: 2005.05.11.06.51.55


Rollback:
# cvs -z3 -d :pserver:mythtv@cvs.mythtv.org:/var/lib/mythcvs update -D 04/22/05 mythtv

View status again:

[root@myth libmythtv]# cvs -Q status blend.c
====================
File: blend.c Status: Up-to-date

Working revision: 1.1
Repository revision: 1.1 /var/lib/mythcvs/mythtv/libs/libmythtv/blend
.c,v
Sticky Date: 2005.04.22.07.00.00

[This is the rev that was active on 4/22/05 ]

Tuesday, May 10, 2005

Enlarge hdtv internal write buffer

Increase HDTV internal write buffer to reduce IOBOUND messages:

[tv_rec.cpp]:

else if (cardtype == "HDTV")
{
rbuffer->SetWriteBufferSize(8*1024*1024);

Was: 4*1024*1024

After syncing with cvs, must re-patch with these settings.

HDTV recording error: IOBOUND - blocking in ThreadedFileWriter::Write()

DCL: Doubled ringbuffer to: #define TFW_DEF_BUF_SIZE (4*1024*1024), and recompiled.

Mailing List Archive: HDTV recording error: IOBOUND - blocking in ThreadedFileWriter::Write(): "If you compiled your own install of Myth, you could try bumping up the
recording file writer buffer size from its default of 2 Megs. Edit
mytthv/libs/libmythtv/RingBuffer.cpp and change the TFW_BUF_SIZE line
near the top to 4*1024*1024 instead of 2*1024*1024. I don't know
what bitrate the video you're recording is at, but if it's 16Mbit or higher
then less than 1 second of video will fit in the buffer so if you have
anything that delays your backend from writing to disk you could easily
fill the buffer and get the IOBOUND error. "

Monday, May 09, 2005

Hiding video noise at very top of screen (NBC). Centering video horiz.

Settings, Appearance:
Unchecked "Use GUI size for TV playback"

TV Settings, Playback:
Set vertical overscan to +1 percent.

CBS: Couldn't see all of the bug/logo on the right. Set horizontal overscan to +5.

Settings, Appearance: TV screen size, offset (left shifted)

Previous (when FE and BE were on P4-3.4GHz together):

INSERT INTO settings VALUES ('GuiWidth','878','be.donnlee.com');
INSERT INTO settings VALUES ('GuiHeight','480','be.donnlee.com');
INSERT INTO settings VALUES ('GuiOffsetX','-30','be.donnlee.com');
INSERT INTO settings VALUES ('GuiOffsetY','-4','be.donnlee.com');
INSERT INTO settings VALUES ('GuiSizeForTV','1','be.donnlee.com');

Now:

| GuiWidth 830
| GuiHeight 480
| GuiOffsetX 13
| GuiOffsetY -4
| GuiSizeForTV 0

And:
VertScanPercentage 1
HorizScanPercentage 5
XScanDisplacement 0
YScanDisplacement 0

Verifying DMA on hard drives

"using_dma" below:

[root@myth ~]# cat /proc/ide/hda/settings
name value min max mode
---- ----- --- --- ----
acoustic 0 0 254 rw
address 0 0 2 rw
bios_cyl 65535 0 65535 rw
bios_head 16 0 255 rw
bios_sect 63 0 63 rw
bswap 0 0 1 r
current_speed 66 0 70 rw
failures 0 0 65535 rw
init_speed 12 0 70 rw
io_32bit 1 0 3 rw
keepsettings 0 0 1 rw
lun 0 0 7 rw
max_failures 1 0 65535 rw
multcount 16 0 16 rw
nice1 1 0 1 rw
nowerr 0 0 1 rw
number 0 0 3 rw
pio_mode write-only 0 255 w
unmaskirq 1 0 1 rw
using_dma 1 0 1 rw
wcache 1 0 1 rw

Kernel options

Install Cheatcodes: "linux noapic ( skips part of hardware detection )

linux pci=noapic ( skips parts of the hardware detection on PCI cards )

linux ide=nodma ( disable DMA on all IDE drives )

linux mem=1536M ( if the memory has more then 1G memory )

linux vga=0 ( sets the vga to default )

linux acpi=off ( skips parts of the hardware detection on PCI cards )

Here are a few more options you can add after the kernel version:
noagp ( skips hardware detetion on agp slot )
noaudio ( skips parts of the hardware detection )
noddc ( skips parts of the hardware detection )
noapic ( skips parts of the hardware detection )
nopcmcia ( skips parts of the hardware detection )
noscsi ( skips parts of the hardware detection )
nousb ( skips parts of the hardware detection )
nofirewire ( skips parts of the hardware detection )
noapm ( disable Advanced Power Management )

The next ones are used without typing the kernel version first and only have effect on the installer itself:

vgahi ( high resolution graphical install )
vgalo ( low resolution graphical install )
vga16 ( 640 x 480 in 16 colors install )
text ( text install instead of graphical )"

Output for getting alsa help

ls /dev/snd/

kmix (kde mixer, has section for switches like Optical Raw)

View mixer settings:
cat /etc/asound.state

[root@be ~]# rpm -qa | egrep xine
xinetd-2.3.13-4
xine-0.99.3-2.1.fc3.rf
xine-lib-1.0.0-2.1.fc3.rf

[root@be ~]# rpm -qa |egrep alsa
alsa-lib-1.0.6-3
alsa-tools-1.0.6-1
alsa-utils-1.0.6-3
alsa-lib-devel-1.0.6-3

less ~/.xine/config

Blue screen when watching recordings

Blue screen? Restart X.

myth-users:

> I just posted about a blue screen when trying to watch
> a recording. I've included that below. I have just
> noticed something else. When I run mythfrontend from
> an xterm, and try to watch something, I get the
> following messages..

1. do 'xvinfo' to make sure you're using xv
2. Check /var/log/Xorg.0.log or /var/log/XFree86.0.log (You didn't say
what distro you're using, so I'm assuming Fedora of one sort or another)

Chances are you might not have enough videoram. Since it's the onboard
video, some bioses have the option to allocate more ram to the video
chipset.

Stuttering video: backend msgs: IOBOUND = blocking in ThreadedFileWriter::Write()

IOBOUND = blocking in ThreadedFileWriter::Write()

Fix from myth-users:

"I tracked
down the problem to the kernel (top reported 100% wait time).
Eventually I discovered that disabling APIC (by appending "noapic" to
the kernel loader) would cause MythTV to start working."

Old /boot/grub/menu.lst:
kernel /vmlinuz-2.6.9-1.667 ro root=/dev/VolGroup00/LogVol00 rhgb quiet

New:
kernel /vmlinuz-2.6.9-1.667 ro root=/dev/VolGroup00/LogVol00 rhgb quiet noapic

---
What is the noapic option? found this:

"APIC is the hardware that ia32 systems use to communicate between CPUs to
handle low-level events like interrupts and TLB flushes" (from the linux
kernel FAQ).

Reverting cvs codebase with -D

Open Source Development With CVS: "floss$ cvs -q update -D '1999-04-19'
U hello.c
U a-subdir/subsubdir/fish.c
U b-subdir/random.c
floss$

With the -D option, update retrieves the highest revision of each file as of the given date, and it will revert the files in the working copy to prior revisions if necessary. "

Troubleshooting ALSA, Linux ALSA sound notes

Linux ALSA sound notes

xine sb live and oss driver

xine - A Free Video Player: "OSS "

asound devices in .asoundrc

The following works with sb live after muting iec958 optical raw:

from .asoundrc:

iec958 {
type plug
slave.pcm 'hw:0,0'
}
emu10k1 {
type hw
card 0
}

digital {
type plug
slave.pcm digital-hw
}
digital-hw {
type hw
card 0
device 0
}

All of these work:
aplay -D digital bustin.wav
aplay -D emu10k1 bustin.wav
aplay -D iec958 bustin.wav

Setting Tone, Bass, Treble for SB Live

Best: Just disable tone control and output sound cleanly. In alsamixer, mute item "Tone" and it will say "Item: Tone [Off]".

If you want tone control, unmute. Adjust Bass and Treble sliders. Set slider=20 for closest value for pure tone. With tone control on, the volume is weaker and I need to pump up the volume some more on the Denon.

Enabling digital out with Alsa 1.0.1 and higher (VERY IMPORTANT)

wiki:alsa [Notes]: "Enable digital output with Alsa 1.0.1
Something have change in Alsa, from version 1.0.1. It seems that now, when enabling the digital output, the analog on is shut down. Anyway, you need to enable the loopback to convert Analog to Digital, doing:

options snd-ac97-codec enable_loopback=1

Then, turn on, in alsamixer, the ADC/DAC.
Some other thinks have to be done, it's strange:

***Mute the IEC958 Optical Raw***"

Running kaconnect (turns out to be midi tool)

[root@be kaconnect-1.1.1]# modprobe snd-seq-midi
[root@be kaconnect-1.1.1]# ls -l /dev/snd/seq
crw-rw---- 1 root root 116, 1 May 9 13:58 /dev/snd/seq
[root@be kaconnect-1.1.1]# ./kaconnect

ALSA sequencer successfully opened

IEC958 TTL Volume

Re: [Alsa-devel] CD SPDIF in Soundblaster Live 5.1 working?: "The 'IEC958 TTL Volume' control actually controls the volume of the 'CD
SPDIF' input. "

[Alsa-devel] CD SPDIF in Soundblaster Live 5.1 working?

[Alsa-devel] CD SPDIF in Soundblaster Live 5.1 working?: "I've tried different options to snd-emu10k1. Currently I'm using the
following line, since it gives me the most options to play with.

options snd-emu10k1 extin=0x3fff extout=0x1fff"

SB Live mixer explanations

LWN: Documentation/sound/alsa/SB-Live-mixer.txt

modprobe.conf for SB Live

redhat.com | Red Hat, Inc.: "I was able to resolve this by adding following to /etc/modprobe.conf


alias char-major-116 snd
alias snd-card-0 snd-emu10k1


alias char-major-14 soundcore
alias sound-slot-0 snd-card-0


# card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

This seems to have done the trick with Sound Blaster Live. However after everything I still got no sound since ALSA starts muted. You have to use

alsamixer

and increase the volume or use XMMS with ALSA plug-in to bump up the volume."

Removing unwanted channels

Installing and using MythTV: Miscellaneous.: "Removing unwanted channels"

Upgrade mythweb (because they changed the FE/BE protocol version)

CVS update:
cvs -z3 -d :pserver:mythtv@cvs.mythtv.org:/var/lib/mythcvs update mythplugins

Save old /var/www/html/mythweb/.htaccess as .htaccess_donn

Edit:
/var/www/html/mythweb/config/conf.php

Changing mythweb after splitting off backend

Edit /var/www/html/mythweb/config/conf.php

//
// How to access the database
//
define('db_host', '192.168.1.x');

Was:
define('db_host', 'localhost');

Sunday, May 08, 2005

MONO, not stereo cable. Connecting Sound Blaster Live 5.1 Card to Receiver

Connecting Sound Blaster Live 5.1 Card to Receiver: "Check it out man (and everyone else trying to do the same thing) A mono jack is completely critical, it will -NOT- work with a stereo adapter. After rigging up a mono jack setup it worked PERFECT with a Sound Blaster Live 5.1 OEM just by clicking the 'ENABLE DIGITAL OUT' box in the surround mixer and hooking the digital co-axial up to the right input on your receiver. I have not tested DD 5.1 because I don't have any sources, but this is a lot cheaper than buying a $1000 music server when you can get a 120GB HD for <$150. Thanks for your help all! "

ac3 passthru

ALive!: "The SBLive! is not capable of outputting all its audio in Dolby Digital format (through the S/PDIF output). It is only able to output Dolby Digital and DTS soundtracks that are already pre-encoded and made available on DVDs and other file formats like .AC3 or .VOB. This is because Dolby Digital and DTS are non-PCM formats, unlike the PCM format supported by the EU10K10."

SB Live CT4760 card

ALive!: "With a simple minijack-to-RCA cable that can be bought in most electronic stores, you can obtain digital output from the card and connect it to a Dolby Digital amplifier or digital speakers that have S/PDIF inputs."

Sound Blaster Live info: Differences

ALive!

Advanced Linux Sound Architecture - Sound Blaster Live Value. emu10k1

Advanced Linux Sound Architecture - Sound Blaster Live Value. emu10k1

My SB Live! OpenAL Linux page

My SB Live! OpenAL Linux page

SBLive Support: emu10k1, ac3 passthrough, xine, alsa

SBLive Support

kaconnect util

: "This first version of kalsatools only implements 'kaconnect', which
is a KDE version of 'aconnect'. 'kaconnect' displays all ports of the
ALSA MIDI sequencer and allows to subscribe and unsubscribe connections
among them."

Kalsatools, AlsaModularSynth

AlsaModularSynth

QAMix, QARecord, KAconnect

emu10k1 - AlsaOpensrcOrg wiki

emu10k1 - AlsaOpensrcOrg: "0x3fc3/0x1fc3]"

Running / Troubleshooting Xine

xine -pfhq --no-splash --verbose dvd:///dev/hdb > tmp_xine.txt

Sound Blaster Live info

cat /proc/asound/card1/emu10k1

[root@be ~]# cat /proc/asound/card1/emu10k1
EMU10K1

Card : Creative
Internal TRAM (words) : 0x2000
External TRAM (words) : 0x10000

Effect Send Routing : A=0, B=1, C=2, D=3

Captured FX Outputs :
Output 00 [AC97 Left]
Output 12 [MIC Capture]

All FX Outputs :
Output 00 [AC97 Left]
Output 01 [AC97 Right]
Output 02 [Optical IEC958 Left]
Output 03 [Optical IEC958 Right]
Output 04 [Center]
Output 05 [LFE]
Output 06 [Headphone Left]
Output 07 [Headphone Right]
Output 08 [Surround Left]
Output 09 [Surround Right]
Output 10 [PCM Capture Left]
Output 11 [PCM Capture Right]
Output 12 [MIC Capture]
Output 13 [AC97 Surround Left]
Output 14 [AC97 Surround Right]
Output 15 [???]
Output 16 [???]
Output 17 [Analog Center]
Output 18 [Analog LFE]
Output 19 [???]
Output 20 [???]
Output 21 [???]
Output 22 [???]
Output 23 [???]
Output 24 [???]
Output 25 [???]
Output 26 [???]
Output 27 [???]
Output 28 [???]
Output 29 [???]
Output 30 [???]
Output 31 [???]

S/PDIF Output 0
Professional Mode : no
Not Audio Data : no
Copyright : yes
Emphasis : none
Mode : 0
Category Code : 0x12
Generation Status : original
Source Mask : 0
Channel Number : left
Sample Rate : 48000Hz
Clock Accuracy : 1000ppm

S/PDIF Output 1
Professional Mode : no
Not Audio Data : no
Copyright : yes
Emphasis : none
Mode : 0
Category Code : 0x12
Generation Status : original
Source Mask : 0
Channel Number : left
Sample Rate : 48000Hz
Clock Accuracy : 1000ppm

S/PDIF Output 2/3
Professional Mode : no
Not Audio Data : no
Copyright : yes
Emphasis : none
Mode : 0
Category Code : 0x12
Generation Status : original
Source Mask : 0
Channel Number : left
Sample Rate : 48000Hz
Clock Accuracy : 1000ppm

CD-ROM S/PDIF
Professional Mode : yes
Not Audio Data : yes
Copyright : yes
Emphasis : 7
Mode : 3
Category Code : 0x7f
Generation Status : original
Source Mask : 15
Channel Number : 15
Sample Rate : 15Hz
Clock Accuracy : unknown
S/PDIF Locked : off
Rate Locked : off
Estimated Sample Rate : 0x0

General purpose S/PDIF
Professional Mode : yes
Not Audio Data : yes
Copyright : yes
Emphasis : 7
Mode : 3
Category Code : 0x7f
Generation Status : original
Source Mask : 15
Channel Number : 15
Sample Rate : 15Hz
Clock Accuracy : unknown
S/PDIF Locked : off
Rate Locked : off
Estimated Sample Rate : 0x0

Zoomed Video
Rate Locked : off
Estimated Sample Rate : 0x0

DigitalSoundHowTo - MythTV.info

DigitalSoundHowTo - MythTV.info

Help with ALSA & AC3 passthrough

AVS Forums Archives - Need help with ALSA & AC3 passthrough: "Problem solved, at least partially. I chucked Mplayer out the window and used Xine instead, and now it works with both the Revo and the on-board chip! Oh joy and eternal happiness!!! :-)

For the record, Xine requires an entry like this in the alsa config to make it work though:
pcm.!iec958 {
type plug
slave.pcm 'hw:0,1'
}

You also need to activate the pass-through in the Xine settings but that's no big deal."

Split mythfrontend and mythbackend

Built dedicated mythtv master backend server with Gigabyte GA-7VAXP and Athlon XP 2100+ 1.733GHz (overclocked to 143MHz w/ +7.5% overvoltage). 256MB DRAM. 80GB on Primary IDE, 200GB WD (recent rma) on Secondary IDE. No CDROM drive.

May not need to overclock, as cpu utilization is reasonable during some recording and network serving tests. Exhaust air seems pretty hot.

Mythtv frontend is still ASUS P5P800 (P5P800-UAYZ) and Pentium 4 Processor 550, LGA775 pkg, 3.4GHz, 1MB L2-cache, 800MHz FSB.

Recompiled mythtv on ASUS with:
./configure -–enable-opengl-vsync

Did not use --enable-xvmc because the compile would complain it couldn't find XvMCW libs. Tried deleting references to xvmcw in config.mak but build still broke. Couldn't de-install xvmcw because the DVD programs (xine, mplayer) need it.

Since I don't use xvmc hardware acceleration anymore (can't do deinterlacing), no need to compile it.

Playback of recordings is much better after splitting-off BE from FE. No longer hit cpu bottlenecks when two recordings are in progress (and one is hidef), and we're watching a third show off disk. Seeking forward/backward is more snappy.

But, I did run into nasty IOBOUND errors that would sometimes lockup the backend and require a restart of mythbackend. Measures taken: noapic kernel option at boot, increasing the internal write buffer in RingBuffer.cpp and tv_rec.cpp. These are documented in later blog entries.

Saturday, May 07, 2005

Setting up mythtv Frontend machine vs. Backend machine

Installing and using MythTV: Downloading and compiling.: "Frontend-only configuration
Since MythTV uses a client/server architecture, multiple frontend computers can simultaneously access content on a Myth system. Live TV, watching and scheduling recordings, etc. are all possible from multiple frontends.

To get a better picture of what is needed to run a frontend, note the following:
You do NOT need the MySQL server installed on your remote frontend
You do NOT need XMLTV installed on your remote frontend
You do NOT need to run the MythTV setup program on your frontend machine

Other than the exclusion of the MySQL server and XMLTV, the MythTV compilation procedure is the same as when you're setting up both a backend and a frontend. However, you will need to install the database access libraries.

Once MythTV is compiled and installed:
* Run the MythTV setup program on your Master backend. Under the 'General' menu, change the IP address of the current machine (by default, '127.0.0.1') to the real external IP address - 127.0.0.1 is the loopback address and no external machine can access it. Change the Master Server IP setting to the same IP address as well.
* Run the mythfrontend program on your frontend machine, and a 'Database Configuration' screen should appear [DCL note: If it does not, goto Settings and find the Database Configuration screen]. Set the 'Host name' field to point to your Master backend's IP address. "

Compiling, Optimizing

The pcHDTV and MythTV Howto: "If you want to optimize mythTV (The main module) for your system, try changing the QMAKE_CXXFLAGS_RELEASE line in settings.pro to 'QMAKE_CXXFLAGS_RELEASE = -O3 -march=athlon-xp -m3dnow -mmmx -msse -mfpmath=sse -fomit-frame-pointer' or 'QMAKE_CXXFLAGS_RELEASE = -O3 -march=pentium4 -mmmx -msse -mfpmath=sse -fomit-frame-pointer'. Also change the QMAKE_CFLAGS_RELEASE line in libs/libavcodec/libavcodec.pro to 'QMAKE_CFLAGS_RELEASE = $$OPTFLAGS -DPIC -fPIC -march=athlon-xp -m3dnow -mmmx -msse -mfpmath=sse -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE' or 'QMAKE_CFLAGS_RELEASE = $$OPTFLAGS -DPIC -fPIC -march=pentium4 -mmmx -msse -mfpmath=sse -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE libs/libavcodec/libavcodec.pro'."

Monday, May 02, 2005

Added 200GB WD drive (RMA replacement)

Added the whole drive to a LVM volume group. See lvm notes on Donn Lee blog.

Changed subdir for mythtv recordings:
a. Stopped mythfrontend and mythbackend.
b. Ran 'mythtv-setup'.