Thursday, July 8, 2010

Compiling sfxr on Ubuntu

sfxr (http://www.drpetter.se/project_sfxr.html) is a cool utility for generating sound effects. To compile it on Ubuntu you need to install a few packages to resolve dependencies.

Dependencies are: build-essential libasound2-dev libasound2-plugins libsdl-dev libgtk2.0-dev

Taken from the comments in http://theravingrick.blogspot.com/2010/03/i-posted-on-some-of-work-i-want-to.html.

Thursday, June 17, 2010

ffmpeg: A simple command line tool for converting video formats

Simple to use:
ffmpeg -i input_file output_file.extension_of_new_format

like so, to convert a mpeg to swf (Adobe flash format)

bash$ ffmpeg -i video.mpeg output.swf

You can tweak the defaults by adding more parameters. Some that are useful are, bitrate(-b), framerate(-r) and output video size(-s). The last one would scale your video.

So the following:

bash$ ffmpeg -i video.mpeg -b 700k -r 25 -s 580x200 output.swf

would generate a swf that would have a birate of 700kbps, framerate of 25 and a size of 580 into 200 pixels.

If you are targeting a standard, like say dvd video. You can skip typing individual parameters and can use "-target dvd" instead. Check the man pages for more options.

Sunday, June 6, 2010

xvidcap: Make a video of your linux desktop.

Xvidcap is a nice tool to make movies of your linux desktop. It installs from the repos "sudo apt-get install xvidcap" and works great.

Sunday, March 28, 2010

High load on Acer Aspire 5738z with Ubuntu 9.10

There is a bug w.r.t to the graphic drivers for this laptop. This causes udev to take up quite a bit of CPU, making the laptop run hot.

The Ubuntu bug is here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/440411

From the ubuntu bug, once can go look at the related kernel bug:
http://bugs.freedesktop.org/show_bug.cgi?id=23183

There seem to have been a resolution in the kernel but that got reverted since it was causing issues. So for now the problem remains.

For now I am killing udev to keep my laptop cool. Like so:

$ sudo /etc/init.d/udev stop

Thursday, March 18, 2010

Brigthness fix for Acer Aspire 5738z with Ubuntu 9.10

The brightness keys on this laptop (Fn + left/right arrow keys), do not work out of the box on Ubuntu. It does not work on 9.04 (Jaunty Jalopy) and continued to not work in 9.10 (Karmic Koala).

The work around for this is modifying your kernel command line to add "acpi_osi=Linux nomodeset acpi_backlight=vendor". One way to do this is to modify (or safer yet copy) a kernel entry in menu.1st file of the grub bootloader.

So for example if your boot directory is /boot/ then menu.1st is in /boot/grub/menu.1st.

I edited my latest kernel like so:
Old entry ->

title Ubuntu 9.10, kernel 2.6.31-20-generic
uuid some_id
kernel /boot/vmlinuz-2.6.31-20-generic
root=UUID=some_id ro quiet splash
initrd /boot/initrd.img-2.6.31-20-generic
quiet
New entry ->

title *Brigthness fix* Ubuntu 9.10, kernel 2.6.31-20-generic
uuid some_id
kernel /boot/vmlinuz-2.6.31-20-generic root=UUID=some_id
ro quiet splash acpi_osi=Linux nomodeset acpi_backlight=vendor
initrd /boot/initrd.img-2.6.31-20-generic
quiet

Taken from this thread:https://bugs.launchpad.net/ubuntu/+source/acpid/+bug/392948

Thursday, February 11, 2010

mtpaint - Good application to do pixel art in Linux

If you want to create some pixel art, I would recommend mtpaint - http://mtpaint.sourceforge.net/. It has pretty good functionality. So far the only thing I find difficult to use is the multiple layer functionality for creating animations.

Mouse issues with Ubuntu Karmic Koala (9.10)

If you are considering updating to Karmic Koala, hold of for now. Mouse support for some people has been broken since around November 2009 and is broken to date (Feb 2010).

My initial update to Karmic Koala went pretty smoothly. However down the line as I continued to update my packages something went wrong and now my mouse can be pretty flaky. After doing some google searches, it turns out that a bunch of folks are experiencing this problem. The cause of the bug has not been tracked down and there are only work arounds, such as:
1. Log out of your windows session and log in again, this seems to be working for me.
2. If you only have issues with a particular application run that application from the console like so:
$ export GDK_NATIVE_WINDOW=1
$ application_having_issues.
3. For more esoteric workarounds read the threads below. The above 2 were easiest for me to try.

Threads with the complaints:
http://ubuntuforums.org/showthread.php?t=1334222
http://ubuntuforums.org/showthread.php?t=1308754