Wednesday, May 21, 2008

Command line to watch TV in Fedora

mplayer \
-framedrop \
-ao alsa:device=hw=1 \
-autosync 1 \
tv://7 \
-tv driver=v4l2:device=/dev/video0:chanlist=newzealand
channels=2-TV1,4-TV2,7-TV3,9-C4,41-Maori,57-Juice,59-Prime,62-Chinese \
-nolirc \
-aspect 1440:900

Mplayer with the following command options set:

  • -framedrop => hard framedropping
  • -ao:alsa:device=hw.1 => Sound output ( what you hear ) alsa card number 1. To be clear: THIS IS THE SOUND OUTPUT - not the INPUT from the TV card. That comes later.
  • -autosync 1 => Something to do with trying to get sound and video in sync. Works in small increments... ?
  • tv://7 => Play channel 7
  • tv: => Followed by all the sub options for tv
  • :driver=v4l2 => the Video 4 Linux driver v2
  • :device=/dev/video => the video device as enumerated by the kernel
  • :chanlist=newzealand => specify New Zealand channels. This is how the tuner gets tuned.
  • :norm=1 => PAL
  • :alsa => Use an alsa soundcard for input. This is where we specify the onboard sound card for the TV AUDIO INPUT... You could use a loopback cable from the audio out on your card to the aux in on your main sound card... In my experience this adds about a 1 second delay. Mplayer does allow for that delay to be fixed while watching TV using keystrokes. See man mplayer for mor.
  • :adevice=hw2 => on my computer when I type "cat /proc/asound/cards" the second card is listed is the sound device on the tv tuner. My TV tuner is supported in ALSA so this makes it easy. Try looking up your card on the V4l website for help. It might help to know the kind of chip that is on your card when you look this up.
  • :audiorate=32000kbits => this seems to be required by my card...
  • :amode=1 => again another requirement. Play with these settings on your card.
  • :forceaudio => f o r c e a u d i o
  • :immediatemode => Again - this is just something that worked while not having it there made for strange speeded up sound and glitchy tv.
  • :tdevice=/dev/vbi0 => Teletext device as enumerated by my kernel.
  • :outfmt=yuy2 => I read that this is a default for New Zealand analogue tv.
  • :channels #-name,#-name where # is the channel number and name is the channel name. The name appears on the OSD ( ON SCREEN DISPLAY ) when switching channels. You dont have to append this but its nice and I have all the auckland channels I get with my bunny ears and bits of coathanger and the wifes underwire... ( only joking - she took the underwires away when we had some guests arrive one time. Something about dignity and ... I don't really remember because I was thinking at the time that dignity comes second to qualtiy tv on the desktop... :) ) - Thats the end of the TV sub options by the way.
  • -nolirc => I cant find my remote control so I didnt bother with it. This just tells mplayer to not bother too. If you leave it out there is a warning in the bash prompt about it.
  • -aspect=1440:900 => when viewing in full screen I like it to be full screen.

Key strokes: ( not all of them but the useful ones anyway. )

  • h = Channel UP ( from 1 to 2 2 to 3 etc. )
  • k = Channel DOWN ( from 3 to 2 2 to 1 etc )
  • f = full screen toggle ( f to turn it on and f to turn it off or F-ON F-OFF... :)
  • NUMPAD + and NUMPAD - = increase or decreas the AV-DELAY in 100 millisecond intervals. This is handy when your audio is out of sync with your tv.
  • q = quit
  • m = MUTE
  • o = OSD toggle. Keep pressing it until you are happy.

Friday, May 16, 2008

Fedora 9 x86_64 Install Notes

I have now installed Fedora 9 x86_64 on my home pc. The RAM issue has been largely solved. I am still missing 64Mb of RAM due to some kind of setting that my motherboard does not support.

So I did a pretty big install. Well at first it was a small one, but then in the end, I went for a more full install from the DVD. The new package manager is not all that great so I thought it would be better to have a fuller install from the DVD.

Everything seems to work just fine except for NVIDIA graphics driver and FLASH in firefox 3. The first issue will just have to wait till it gets fixed. Its related to the NVIDIA drivers that are available not being properly supported by XOrg 7. The flash-in-firefox-3 issue can be easily fixed by installing the i386 version of firefox instead.

I also had some trouble getting my head around the NetworkManager. Once I had it going it was ok.

I turned off SELINUX. Too hard to have a home system and worry about such fine grained security.

I have decided to us the freshrpms source for extras because their repo just seems cleaner.

If installing gnash does not do the trick then the below will do it. Get the adobe plugin from the adobe website. Use the YUM version of the download to make sure that updates are automatically handled by the updater software in Fedora.

How to fix firefox by installing the i386 version: ( )

First, create /etc/yum.repos.d/fedora-i386.repo with the following

[fedora-i386]name=Fedora $releasever - i386failovermethod=priority#baseurl=$releasever/Everything/i386/os/mirrorlist=$releasever&arch=i386enabled=1gpgcheck=1includepkgs=firefoxgpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
$releasever - i386 -

This will provide you with access to the Fedora 9 i386 Yum repositories for Firefox
only (note includepkgs=firefox). Now, remove your 64-bit Firefox RPM.

sudo rpm -e firefox.x86_64

Finally, install the 32-bit Firefox RPM with the new Yum repository.

sudo yum install firefox.i386

So that takes care of the firefox issue.

Linux WACOM fix:

Section "InputDevice"
Driver "wacom"
Identifier "stylus"
"Device" "/dev/input/wacom" # USB ONLY
Option "Type"
Option "USB" "on" # USB ONLY

Section "InputDevice"
Driver "wacom"

Identifier "cursor"
Option "Device" "/dev/input/wacom" #
Option "Type" "cursor"
Option "USB"
"on" # USB ONLY

InputDevice "stylus" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"

There are also some items that need to be installed to get all the audio stuff working properly.

yum install xine gstreamer-ffmpeg gstreamer-plugins-ugly vorbisgain aacgain mplayer

Sunday, May 11, 2008

4 Gigabytes of RAM

I know - its an obscene number - but there it is. I now have 4 Gb Ram installed in my computer. Its the most the motherboard can handle but seeing as though it's mother's day - I thought I would treat her... :)

Here is what happened:

  1. The bios had no problems finding and providing the ram.
  2. My Fedora kernel ( i386 => 32 bit ) could only see 3 Gb.
  3. I installed the PAE variant of the kernel and that enabled all 4 Gb in Fedora.
    1. Had to switch from Freshrpms to Livna because Livna has more support for different kernels. I use livna for the NVidia and KQemu drivers. ( KQemu is what provides hardware acceleration for my virtual machines. )
    2. NVidia module for the PAE kernel installed fine and works fine.
    3. KQemu module for the PAE kernel installed and loaded fine, but the Guest machines just crash.
So I did lots of research and found out that 32bit OS's simply don't have a lot of support for more than about 3Gb Ram. The only solution to that was to install the PAE kernel. This worked to a point - no virtualisation which is a bit of a bummer seeing as though the whole reason for the upgrade was so that I could have better performance on my virtual machines.

The next step is to upgrade to an x86_64 ( 64 bit ) OS and see if that helps. I am waiting for Fedora 9. Quite eagerly now that I need to get my virt machines working again. I intend to install the 64bit Fedora 9 and the XEN kernel. Hopefully we see some results.

I got 4 gigs of raaaa-aaam. Naaa na na naaaaaaa naaaaaaah.

Saturday, May 3, 2008

Friday, May 2, 2008

1 Million Random Digits

Can anything be truly random. Definitions vary. One I have heard states that something is random if it is impossible to understand how the number was produced / derived. This definition introduces context and level-of-understanding.

The debate continues...

Look here for another slant on this fascinating topic: