Author Archive

J-Doc got Sparked

Posted in Disability, Open Source, Research on June 16th, 2009 by Jorge – Be the first to comment

Pretty cool piece by Nora Young and the rest of the CBC Spark team about some of the work we have been doing over at the Adaptive Technology Resource Centre.

Check out the podcast here:
http://www.cbc.ca/spark/2009/06/episode-82-june-17-20-2009/

and the video clip Nora mentioned here:

Grab video from a DV camera with Kino

Posted in GNU | Linux, HowTo, Open Source on June 10th, 2009 by Jorge – Be the first to comment

First, you need to make sure you have kino installed:

$ sudo apt-get install kino

then, connect your camera with the firewire cable and make sure the iee1394 module is loaded. Doing:

$ lsmod | grep ieee1394

should give you:

ieee1394              108288  4 dv1394,raw1394,sbp2,ohci1394

Now make sure the device /dev/raw1394 has been created. Doing:

$ ls -all /dev/raw1394

should give you something like:

crw-rw---- 1 root disk 171, 0 2009-06-10 09:56 /dev/raw1394

Also, make sure /dev/raw1394 belongs to either the disk or video groups. You will notice in the output above that my /dev/raw1394 belongs to the disk group, so it’s ok, but if this is not the case for you, then you can fix it by doing:

$ sudo chown root.disk /dev/raw1394

Finally, add yourself to the disk or video groups (whichever group you added the device to):

$sudo useradd -G [group-name] [user-name]

Now Kino should be able to recognize the camera and you should be able to transfer your videos to your computer!

Hi-Res Duke Nukem 3D on Linux

Posted in Gaming, GNU | Linux, HowTo, Open Source on March 29th, 2009 by Jorge – Be the first to comment
Screenshot of Duke Nukem 3D with eDuke32

Screenshot of Duke Nukem 3D on Linux with eDuke32

A long, long time ago in a country far, far away, I used to spend hours playing one of the first 3D first person shooter games that allowed me to do just about anything I wanted. It was so cool to be able to turn lights on and off, look at your own reflection in the mirrors (even if the reflection was carrying the wrong gun) and, yes of course, pee, if you felt like it. All of this was possible in the wonderful world of Duke Nukem 3D. So you can imagine my surprise when I discovered I could turn back the clock to my teenage years and enjoy, once again, the full agency of my virtual presence in post-apocalyptic Hollywood, thanks, of course, to the magic of Linux.

The code that will make this happen for you is located on the eDuke32 wiki page. eDuke32 is an open source port of the original engine and it works like a charm. This is how you make it work:

  1. Download and extract the most recent source package. It should be named something like: eduke32_src_YYYYMMDD.zip, where YYYYMMDD is the release date.
  2. It is also a good idea to download the most recent patch, which will be named eduke32_src_YYYYMMDD.diff, into the same directory where you extracted the source code.
  3. To apply the patch, do:
    $ patch -p3 < eduke32_src_YYYYMMDD.diff

    from the directory where you extracted the source code.

  4. Make sure you have the required dependencies:
    $ sudo aptitude install libsdl1.2-all libsdl1.2-dev libsdl-mixer1.2-dev libsdl-sound1.2-dev nasm
  5. Now cd into the eduke32_src_YYYYMMDD directory and type make like this:
    $ cd eduke32_src_YYYYMMDD/
    $ make
  6. More detailed information is available on the eDuke32 site, the eDuke32 wiki and the high resolution pack site. Enjoy!

Video editing with Linux

Posted in GNU | Linux, HowTo, Open Source on February 22nd, 2009 by Jorge – Be the first to comment

Convert to FLV:

$ ffmpeg -i original_video.avi -qscale [quality] -s [WxH] -ar 22050 converted_video.flv

Join multiple videos:

$ mencoder -oac copy -ovc copy -o joined.avi clip1.avi clip2.avi [...]

Extract a clip from a video:

$ ffmpeg -qscale 1 -acodec mp3 -ab 256k -ss [start time in hh:mm:ss] \
   -t [length in hh:mm:ss] -i video.avi clip.avi 

Dump the audio:

$ mplayer -vc null -vo null -ao pcm -benchmark test.avi 

Grab an image from a video:

$ ffmpeg -i movie.avi -ss [time-in-seconds] -vframes 1 -f image2 frame.jpg

Overlay an image on a video:

$ ffmpeg -i input.avi -vhook '/usr/lib/vhook/imlib2.so -x 0 -y 0 -i overlay.png' output.avi

Encode a Windows-compatible video:

$ mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=msmpeg4v2:vhq:vbitrate=1600
  -o videoout.avi videoin.xxx

with a separate audio file:

$ mencoder -audiofile audiofile.wav -oac mp3lame -ovc lavc
-lavcopts codec=msmpeg4v2:vhq:vbitrate=1600 -o videoout.avi videoin.xxx

There is also a good guide on how use ffmpeg to create FLV videos for posting online here:
http://scott.yang.id.au/2006/07/flash-video-ffmpeg-flowplayer/

Handy scripts and configurations for Gnome-Compiz

Posted in GNU | Linux, HowTo, Open Source on January 3rd, 2009 by Jorge – Be the first to comment

Change Gnome panel font color

To change the colour of the fast user switching applet, open the file to edit the colours with:
$ gedit .gtkrc-2.0
Then add these lines into the file (#FFFFFF for white):
style "modpanel" {
fg[NORMAL] = "#FFFFFF"
}
widget "*PanelWidget*" style "modpanel"
widget "*PanelApplet*" style "modpanel"
widget "*fast-user-switch-applet*" style "modpanel"

Now run this code to reload the panels:
$ killall gnome-panel
(Taken from http://ubuntuforums.org/showpost.php?p=4315463&postcount=10)

Change desktop folder in Gnome

You need to edit the file ~/.config/user-dirs.dirs:
$ nano ~/.config/user-dirs.dirs
Modify the XDG_DESKTOP_DIR entry as needed. For instance:
XDG_DESKTOP_DIR="$HOME/.desktop"

Make Audacity work with Pulseaudio

Rename the file /usr/bin/audacity to /usr/bin/audacity.original:
$ sudo mv /usr/bin/audacity /usr/bin/audacity.original
Create a new /usr/bin/audacity file using:
$ sudo gedit /usr/bin/audacity
Then write the following lines into the file:

#!/bin/bash

padsp audacity.original "$@"

Save the file and make it executable:
$ sudo chmod +x /usr/bin/audacity
Enjoy! You can use the same trick with Skype and avidemux

Make Thunderbird the preferred email application for KDE

Modify the file $ ~/.kde/share/config/emaildefaults so it looks like this:

[Defaults]
Profile=Default

[PROFILE_Default]
EmailAddress=
EmailClient[$e]=thunderbird
FullName=First Last
Organization=
ReplyAddr=
ServerType=
TerminalClient=false

Change Icon Size in Konqueror

Under the [Settings] section in $ ~/.kde/share/config/konqiconviewrc modify the following parameter:
IconSize=48

Turn off the PC Speaker (Bell)

Uncomment the following line on /etc/inputrc:
set bell-style visible
and restart.

Custom Icons

A complete tutorial is available here.