Thursday, February 26, 2009

Watch Battlestar Galactica on Your Phone.

I have a crappy Nokia flip phone. There is nothing special about it. It does have a camera and can take really poor quality video if you happen to be standing in reasonable light. It does have have a media player to watch these videos which are formatted in .3gp, which I guess is very common in these small portable devices. I also have a 1 Gb micro SD card for storage on my phone. So far nothing too outlandish about this phone or it's features. These features are found on the most basic "free" phone given to you by carriers when you sign away your 1st born with one of their contracts. This is definately not a iPhone or some other overpriced "smartphone".

Anyway I wanted to see if I could watch Battlestar Galactica on my phone while on the bus to work each morning and found that it's not that difficult with Free open source software. My Battlestar Galactica episodes in .avi format, so I just needed a way to convert my .avi file to .3pg. Then put that newly created .3pg file on my microSD card and fire up my media player on my phone and I should be good to go. Here is how I did it.

Install the following: ffmpeg, amrnb, amrwb and sox. In debian based distros it's pretty straight forward with apt-get and each of these applications are in the Ubuntu repos. Then issue the follow command:

ffmpeg -i inputfile.avi -s qcif -vcodec h263 -acodec aac -ac 1 -ar 44100 -r 25 -ab 192 -y outputfile.3gp
Here is a brief breakdown of the ffmpeg command. You can find more detail on the ffmpeg man page.

-i input file
-s video size (qcif=176x144, see man page)
-vcodec video codec (needed for the conversion)
-acodec audio codec
-ac # if audio channels
-ar Audio frequency
-r Frame rate
-ab audio bitrate
-y output file

You may have to fiddle with the frame rate a bit to what works best for you on your device. I've converted one file and played it on 2 different devices and the audio and video sync was off on one and not the other, which tells me that something funky is going on with different media players. I would recommend that you keep the audio quality (freq and bitrate) high because the speakers on most of these low quality device are pretty crappy. You will want to have goo sound quality if you expect to hear anything.

A one hr long episode of Battlestar Galatica in .avi is about 350 mb, once converted to .3pg with the above configuration rates is about 80 mb.

If you have mpeg files you would like to convert, use the following:

ffmpeg -i inputfile.mpg -s qcif -vcodec h263 -acodec aac -ac 1 -ar 8000 -r 25 -ab 32 -y outputfile.3gp
If you're try to get videos off your phone to watch on your computer, here convert your files the other way.

ffmpeg -i clip.3gp -f avi -vcodec xvid -acodec mp3 -ar 22050 file.avi

Tuesday, February 24, 2009

Gwyneth Paltrow is Ubuntu!?

Yep! Gwyneth Paltrow believes in Ubuntu. The philosophy, not the Linux operating system. Check it out. Scroll down to the bottom to see the reference.

“Ubuntu” is an African term that means what makes us human is the humanity we show each other. It’s a worldview that sees humanity as a web of family rather than a mass of individuals. When you relate in this way, you feel connected, energized and have a sense of abundance.

These tips are merely seven of the more than 50 in the book. All are fairly easy to incorporate into your busy lifestyle and, more importantly, they each can make a profound difference.

I wonder if she knew that there was an operating system and an entire community out there who actively practice these ideals, if she would be willing to use it?

Sunday, February 22, 2009

Configured Crunchbang!

I installed the latest Crunchbang Linux on my laptop a while ago but I haven't had time to actually configure it to my own liking, until this weekend. Here's the Screenshot.

Conky took some time to get just right, especially the weather option, but this is mostly due to my lack of knowledge of configuring conky.

I also set key-bindings for transparency effect of windows and an expose effect using skippy. Then I installed synergy which allows me to use my mouse and keyboard from my main computer on my laptop, similar to a KVM.

Finally, I added wine and installed MS Office 2007, which is required for a class I teach.

I took careful notes, for future blog posts. I will now try to mimic this set up on the Ubuntu install on my main desktop. I've seen some posts concerning this on the Crunchbang forum which I think will help.

Let me know what you think.