Wednesday, July 30, 2008

Horrible MP3 sound ?

When i played MP3 files, they sound horrible and had a bad quality.

I don't know why, but if I set the PCM control to 80% or lower (thanks
to a hint from a forum), i will get the quality before I switched to
Linux.

Crazy, isn't it ?

Sunday, July 6, 2008

What happend with "Have a lot of fun ..."

Do you remember ? After a successful login on a tty, the text "Have a lot of fun ..." was displayed on the screen in the old days.

But nowadays ?

Friday, July 4, 2008

MythTV - a dream become true ...

MythTV is next generation of watching TV aside from Video on Demand. With MythTV you can pause, rewind, forward and more what you are watching. And that's all possible because MythTV records everything you are watching. It's your personal digital video recorder. For this you need a fast PC and a lot of free space on your hard disk. I have 2,0 GHz and somethings the video jitter. Watching HDTV is impossible.


Installation

Installing the program with ./configure && make && make install took a while til i had installed all need libraries and header files. The program files are installed into /usr/local which is not a default location on Fedora and so you start MythTV, it won't find the libraries.

Solution 1: Run ./configure --prefix=/usr
Solution 2: Create a new file named mythtv.conf in /etc/ld.so.conf.d and put in it where the libraries are, usually /usr/local/lib, run ldconf to apply the changes.

And do your eyes a favor: Install the additional themes package.


Tip 1: MySQL

MythTV uses MySQL to store its configuration and data. If you run mythbackend and mythfrondend on one PC, MySQL can run with a small configuration to save memory and disk space. Disable innodb (see skip-innodb), MythTV doesn't used it and with the default configuration it uses 10MB of your hard disk.

[mysqld]
#port = 3306
#datadir=/home/jorg/.mythtv/db
#socket=/home/jorg/.mythtv/db/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

server-id = 1

skip-bdb
skip-innodb

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout

After a restart of the mysql server you can remove the innodb files from your mysql data directory to free up the disk.


mythtv-setup

Configure MythTV the first time with mythtv-setup is hard, if you do not know what you are doing:

2. Capture Cards
Here you define your TV card.
3. Video Sources
Here you define where MythTV can find the program information for the EPG.
With DVB-S the "Transmitted guide only" is a good choice.
4. Input connections
Here you say Capture Card x can find his program information at video source y.

Scan for channels: That's a torture. Every time you do a Full Scan (Tuned) you have to reenter all the data. And with this type only a few data(?) channels are found. But i got the transponder list. And with a Full Scan of Existing Transports i got my channels. The first times i run it, i had the feeling the program hang up because no screen update for a long time and error messages in the log file. Go and get a cup of tea, the scan took longer than the dvbscan, about 10-20 minutes.

The next step is to download the channel logos, only if you like. I think, this tool is buggy. When you choose a logo for a channel from a list of choices, the logo get downloaded, but the channel is not updated, so you have to enter the filename by hand. If the program choose automatic a logo because there is only one, the channel will get updated. For the filename you have to enter the full path, e.g. /home/bob/.mythtv/channels/logo.jpg


Tip 2: Edit channels

If you are to lazy, like me, to install MythWeb there is another smart way to edit the channel list:
Export the channels into channels.csv:
$ mysql -u mythtv -p mythconverg -e "SELECT * FROM channel" > channels.csv
And you get a tabulator separated file, import it with e.g. OpenOffice.org Calc. Edit the channels, save and import it back:
$ sed -e "s/\"NULL\"/NULL/g" channels.csv > channel.csv
$ mysqlimport -u mythtv -p mythconverg --columns=`sed -n -e "y/\t/,/" -e "s/\"//g" -e P -e q channel.csv` --ignore-lines=1 --local --delete --fields-optionally-enclosed-by=\" channel.csv
You need the parameter --columns for the case, you changed the order of the columns.

The commands explained:

sed -e "s/\"NULL\"/NULL/g" channels.csv > channel.csv
Replace "NULL" with NULL, save into channel.csv
sed -n -e "y/\t/,/" -e "s/\"//g" -e P -e q channel.csv
Returns the first line which contains the column names, replace the tabulator with "," , replace the field separator " with nothing.



Tip 3: EPG

Be patient. The EPG needs its time. And it only collects the EIT information when the LiveTV is not running. Well, if you don't trust the program, run only the backend with

$ mythbackend -v eit

and do nothing, wait one minute (default setting, to change run mythtv-setup, go to General, Page EIT)


If you followed the install instruction correctly, you will be ready for the next generation of watching TV.
Have a lot of fun ...

Tuesday, July 1, 2008

CyberLink Remote Control

The CyberLink IR receiver is recognized as two simple USB keyboard (I don't know why two) and one mouse.

Kernel Log:
kernel: input: TopSeed Tech Corp. USB IR Combo Device  as /class/input/input3
kernel: input,hidraw0: USB HID v1.00 Keyboard [TopSeed Tech Corp. USB IR Combo Device ] on usb-0000:00:02.1-3
kernel: input: TopSeed Tech Corp. USB IR Combo Device as /class/input/input4
kernel: input,hiddev96,hidraw1: USB HID v1.00 Mouse [TopSeed Tech Corp. USB IR Combo Device ] on usb-0000:00:02.1-3

With the default, not really useful (for me) keycodes are assigned.
For example the the red button has the keycode KEY_F15 (389), green KEY_F17 (391), yellow KEY_MEDIA (226), blue KEY_VIDEO (393). (The funny thing is: xev doesn't report these keys.)

Remapping with keycodes and scancodes doesn't work because USB keyboards have no scancodes. A good explanation you can find on http://lkml.org/lkml/2006/6/9/307.

I was looking for a simple way to remap the keys to other keys. I looked quick over http://lineak.sourceforge.net/ and maybe that will do it also. But i wrote my own program to change the keys.

With this program you set your own keycodes. The default mapping is for MythTv. The change the mapping, just edit keys.h and recompile the package.

The source code of the program is available under
http://twe.awardspace.com/cyberlink/