Saturday, May 30, 2009

Now, the latest thing I've been looking into, and spending way too much time on: TV

As mentioned below, I'll be using the Pinnacle Dazzle (or to be specific, PCTV 71e)
There ware not much info on this online so I just worked with info on similar cards and a bunch of trial and error.

Firstly, what I wanted was of course to A- get it working to watch TV, B-find a way to record and C- stream it over the network (in order of importance)

So, you'll be happy to know that it does in fact work out the box... you will of course not believe me if you tried any of the media apps available (MythTV, TVTime, etc.) as they can't work it themselves... I might look into sorting that out later, but for now, let me show what I've done myself.

First, some programs to install:
DVBstream - this includes the tools you'll use to, as the name suggests, stream video from the device.
w-scan - scan the frequencies for active channels
ffmpeg - to convert the transport stream(ts) file
mplayer - can read a ts file raw and read a stream without much fuss
Gstreamer and the like should be installed by default.

Lastly, you shouldn't need it, but if you do want to manually install all the win32 codecs, get whichever file you want from here and extract the files to the correct folder:
wget ftp://ftp1.mplayerhq.hu/MPlayer/releases/codecs/
tar jxvf
sudo cp /* /usr/lib/win32/

easy as that.
Back to the important stuff...

A- Let's scan for channels now. We'll prepare a file for Totem to use with Gstreamer:
w_scan -X > ~/.gstreamer-0.10/dvb-channels.conf
This will create a file for gstreamer to use when accessing the divice.
You can now open the Totem player and open Move -> Watch TV on....
From there it's pretty self explanetory.

B - Now you may notice, that's great, but there's no way to pause or record... so lets look at DVBstreamer now.
Here is the command to start streaming to a file on disc:
dvbstream -f 538000 101 102 -o > test.ts
Don't worry, it's simple: dvbstream -f -o >
Read the man pages (man dvbstream) to find out more... there as far more that just this available to you.
To find the frequence and PID's for teh channel you want to watch, just open the file we created before while scanning for channels:
nano ~/.gstreamer-0.10/dvb-channels.conf

Great, it's streaming to disk now, good as recording. you can open the ts file in mplayer to watch it while streaming. Now you can play, pause and search.

Now this is recording, but you may want it in a format that other players can use.. this is where ffmpeg comes in.
ffmpeg -i test.ts -target dvd test.mpg will convert the file to a DVD formatted mpg file... look into ffmpeg's man pages for more options here.

C- After B, this is quite easy... using the same tools, this will stream the device from a computer elswhere on the network:
dvbstream -f 538000 -i 192.168.1.2 101 102
where 192.168.1.2 is the IP of the computer you want to watch on.
Now on the client box, run 'dumprtp 192.168.1.2 5004 | ts_filter 101 102 > test.ts' to stream it to a file, or 'dumprtp 192.168.1.2 5004 | ts_filter 101 102 | mplayer -' to stream it directly to a player. If your network's not the most stable you can cache the stream with 'dumprtp 192.168.1.2 5004 | ts_filter 101 102 | mplayer -cache 2048 -'

You can also stop the stream on the server side and start a new channel without stopping the player... just remmember to forward the PIDs to those already being used like this:
dvbstream -f 578000 -i 192.168.1.2 501:101 502:102

You can also let the stream run for any pc to use but I have a feeling you need a powerfull network, better than wireless which mine's on, but the command is simple:
dvbstream -f 538000 101 102 to stream and
dumprtp | ts_filter 101 102 | mplayer -cache 2048 - to watch.

(just in case you need to know, the port used by default here is 5004)

OK, that's it for now... some time I'll look into scripts to streamline this or maybe getting one of the media centre apps working, but this is very stable and looks pretty cool so I'm not bothered right now.
Now the graphics card switch...
First things first, backup your current xorg.conf file to xorg.conf.speed:
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.speed

Next download the Intel Xorg driver. There should only be one.

Now to create a config for the intel card:

sudo nano /etc/X11/xorg.conf.stamina and past the following in to save:# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
Option "XkbVariant" "intl"
Option "XkbOptions" "lv3:ralt_switch"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizEdgeScroll" "0"
Option "SHMConfig" "on"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/input/wacom"
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/input/wacom"
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/input/wacom"
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Device"
# Identifier "Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller"
# Driver "intel"
# BusID "PCI:0:2:0"
Identifier "Configured Video Device"
Option "AccelMethod" "uxa"
Option "EXAOptimizeMigration" "true"
Option "MigrationHeuristic" "greedy"
Option "Tiling" "true"
EndSection

Section "Monitor"
Identifier "Color LCD"
Option "DPMS"
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller"
Monitor "Color LCD"
DefaultDepth 24
SubSection "Display"
Modes "1280x800"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"

# Uncomment if you have a wacom tablet
# InputDevice "stylus" "SendCoreEvents"
# InputDevice "cursor" "SendCoreEvents"
# InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
EndSectionA lot of that is not necessary anymore so I'll cut it down when I get some time to go through it.

Now, to create the switching script:
sudo nano /etc/init.d/xorg_conf
Add this to the file and then save it:
#!/bin/bash
#xorg.conf switcher shell script

VIDEO=`/usr/bin/lspci |grep -c nVidia`

if [ "$VIDEO" = 1 ]; then
cp -f /etc/X11/xorg.conf.speed /etc/X11/xorg.conf
else
cp -f /etc/X11/xorg.conf.stamina /etc/X11/xorg.conf
fi

This just checks the switch and copies the relevant config file to the position of the main xorg.config.
Of course, we now need the system to actually run the script, so start by making it executable:
sudo chmod +x /etc/init.d/xorg_conf
and finally link it to the runlevel responsible for startup:
sudo ln -s /etc/init.d/xorg_conf /etc/rc2.d/S12xorg_conf

And there you go... switch working. Just remember we've left it so that power saving really is just that... power saving. No 3D acceleration, just low power usage from the Intel chipset.
For more control of power usage add two CPU scaling monitors to a panel and set them to minitor each of the CPU cores.
Let's start with VMWware

Here is the site I worked with, otherwise the details follow bwlow:

Here are the 32bit and 64bit downloads.


  1. Install required packages build-essential, linux-kernel-headers and linux-kernel-devel

    sudo aptitude install build-essential linux-kernel-headers (don't need linux-kernel-devel for uBuntu 9.04)
  2. Navigate to where the .bundle VMWare file is, then type this in

    gksudo bash ./VMware-Workstation-6.5.0-118166.i386.bundle (or whatever the file name is you downloaded)

Then you get the normal install process and usually defaults are fine.

When it's up, don't forget to finish off with: echo 'xkeymap.nokeycodeMap = true' > ~/.vmware/config to get the keyboard running right.

Then disable checking for updates with the VMWare player... if you do a player update, it removes Workstation.

Then if the problem occurs in w windows vm with the strange mouse click behavior, uninstall the vmware-tools mouse driver and let it install the standard ps2 version.

That should be all you need.
OK, so here's the low down, the lazy way:

After the install, most work great. Sound is up without a hitch, and though 3D support is not there out the box... just going into System Appearance and enabling visual effects automatically searches and downloads the latest nVidia drivers (not Intel though, so install with the switch set to speed.)

Networking and wireless also work straight away but Compiz is still not completely stable with the current nVidia drivers so leave the effects off for now. (We only enabled them to get the drivers installed... I did say the lazy way)

Before getting into settings I just want to list a few standards for software I've come to like (again, this is only those extra to the standard install):
gThumb - for picture managing and web album creating
Wine - compatability layer for Windows apps
fortune - what's Linux without this awesome app ;)
mPlayer - may seem reduntant but Totem handles the music as well, so both are needed down the line
VMWare Player - Prefferably with Workstation but if not possible, as long as the player is there
Blender - 3D design
Some games - Armagetron, Pengupop, Tux Racer, and through Wine - Eve-Online and Guild Wars as well as the simpler Steam games
Some educational stuff.. Celestia and the like.

Ok, next will be some work.

Labels:

Things are flying on the Linux front :) Because of that, and the fact that when I'm perfectly happy I'm gonna format a disk for a Linux only installation... I thought I'd better start taking down the details of what I've done, or at least where I got the info so that I don't have to go through the same again.

For this post, I'll put down the config of my box with regard to part's that will be referred to in following posts:

ASUS U3S
NVidia 8400G Mobile
Intel X3100 (965)
US Keyboard
UK USB Keyboard
Pinnacle PCTV 71e TV Tuner dongle

I'll add to this when I work on the next component.

Wednesday, May 27, 2009

Eve-Online... may not have direct support, but the fans and I'm sure with plenty help from CCP, have kept all things going smoothly.

Rather than going through all the details myself, here is a wiki page with all the Eve -- Linux info needed:

http://wiki.eveonline.com/wiki/Install_EVE_on_linux_with_wine
So I'm finally getting my Debian installation up to scratch to completely replace Winedows... Of course I have a XP64 installation on an external drive I connect by eSata for more hardcore gaming... but even in games, a lot works perfectly with the latest stable nVidia drviers I have on my box.

Anyway, one of the latest things I found, pretty handy for those into virtualisation... VMWware player works wonderfully, as expected from them, but some previous though relatively recent changes to Debian require the following string to be run so that the arrow and super keys properly from within a virtaul machine:

echo 'xkeymap.nokeycodeMap = true' > ~/.vmware/config

I was worried it would be a big deal, but it was as simple as that :)
Next... look into organising a good x server for my onboard intel graphics card... then I can try out some scripts I've seen to help booting into the corrrect one depending on the switch selection on my laptop... oi

Monday, May 18, 2009

Back to Windows 7 now... to be honest, I haven't recently checked if it was available for vista, but there are an awesome selection of themes available... some with multiple desktops even. Very nice.

Back to the task bar though, I just noticed another improvement in space management:
It seems to be an addition to Aero called Aero Peek which not only gives you the small preview just above the start bar, but if you hold the mouse over an icon a bit longer, you get a full screen preview to see exactly what's going on there.

Another addition I've noticed is built-in biometric software, so no need to installed layered software from your PC's manufacturer now...

Lastly for now, I haven't mentioned it before as it was the most mentioned item I had seen online before trying Win7 myself, is the way gadgets work now... not on a bar on the right but anywhere on the screen... again, just a nicety, never used it much myself so it may get a more rampant mention by a fan.

Ok, enough for now, my dinner's arrived!
Ok, I didn't think it was a problem when it happened first, but I'ts really bugging me now... IE8 is another step in the right direction for MS but it still manages to get on and jump around on my nerves... the thing I'm referring to now is the fact that it's smart enough to block activex installations and the like... but doesn't even give you a clue as to where it's coming from.. If i'm on site A, an activex installation may not have been requested by that site, possibly by a ad, in which case it's gotta stay blocked... what if not? Let us know!!!!

Sunday, May 17, 2009

Now, I haven't tried this yet, but I'm putting (ok, I really need to find out how to spell that.. am I right there, or is it putting.. grr *updated.. it was putting...*) this link here so that I can check it some time... I know I've had the problem for ages... geographical content filtering... which since it's always only on US sites, cause issues so damn often... anyway, apparently just blocking your IP will sort it out... rather than finding a US or anonymous proxy so here's an app that claims to do just that. (Though chances are it works through proxies anyway)

But I ramble... here's the link: Hotspot-Shield
OK, so I thought it was about time I got the Release Candidate for Windows 7 and test it out... I must say the download from IE8 was a bit irritating, but when I went back to FireFox, all went smoothly.

Right, so down to my first notes on Win7
  • Test and system details:
    The version I am using is the x86 version of build 7100
    Running on an ASUS U3S with 2.5Gb RAM and using the nVidia VGA card right now (will test the onboard Intel later)

The install seems focused on upgrading rather than new installations, (hehe, seems they realise most see this as a bit of a service pack for Vista,) but under the custom options it is very simple to start a fresh install and customise your partitions if necessary.

After the install which felt rather quick, you get to create your main user account and choose your update settings as expected and then you're in...

We're greeted with a new start bar which interestingly enough reminds me of a Linux bar I have used so that was pleasing. The bar now doesn't show the entire name of an app, rather just the icon. As well as this, the shortcut bar has the Apple and Linux feature of highlighting the apps you run from it rather than opening them as a new icon on the start bar... All of this is creating a great feel of space.

I was also pleasantly surprised to see my wireless card supported out the box, (ready for the first time to complete even the wireless settings during setup,) and then my GeForce drivers were installed with the first Windows Update installs.

Anyway, we're at that point now so I will be posting things every now and then as I find things worthy of it. But to conclude the first post... I am surprisingly impressed with my first glance at Windows 7... as I have heard many say, it looks to be what Vista was supposed to be.

Labels:

Saturday, May 16, 2009

So, I've been inactive for quite a while now, but with a few changes to how I use the net (with particular regard to multiple computers / OS's and clients) I have made number changes that should get me more active on all fronts... let's see how it goes.

Anyway, as a first off... again... I'd like to link to a few sites that have a rather interesting function; Online Operating Systems.

Now, th eidea is and is not as it sounds... It is in fact a rather handy centralised system which feels like a virtual computer that you connect to through a web browser... Of course the down sides, which push it away from being a true OS, are that you of course can't run normal apps on them, but they make up for it by obviously allowing any web based apps and have a nice file system for storage and even deffering levels of mail and office tools for personal use.

Well, I'll let you see for yourself now, these are the top few I have tried:

EyeOS - my favourite, if only they gave you more storage
GlideOS - probably the best all rounder, but maybe trying too hard?

The next seem good, but I haven't tested them enough to have an oppinion yet:
iCube
amoebaOS
eDesk Online
G.ho.st®