Hujambo!

snake-sugar
Living and working in Nairobi, Kenya

Crazy People Are Crazy

Crazy guy carrying a stone!Today was a holiday, Madaraka Day, so I didn’t have to work. I spent the morning and the better part of the afternoon listening to loud music, cooking fried rice, and making notes for my class tomorrow. By the time I walked to the market it was almost 4:00 pm. There’s a funny phenomenon which happens in the developing world that you don’t really see in the United States: crazy people walk around town. I guess some homeless people are pretty crazy, but I’ve never seen it as bad in California as it is here. There are a few wazimu (“crazy person?”) in particular who I see often.

One of them really put on a show today. As I entered Tala’s market I saw he had placed a large stone and some trash on the road, and was running around with a stick. He didn’t have a shirt on, but had cut a hole in some large black trash bag or something, and was wearing that instead. Of course when he saw me he ran at me. I say “of course” because it seems like the crazies and the drunks are always excited in their own way when they see me. A few minutes later I was seated at a shop talking to some dudes and the crazy guy came back. This time he ran into the shop next door and stole a cardboard box. The lady in the shop was yelling, the crazy guy was yelling, and pretty soon he ran out and threw the box. We all laughed and talked about how crazy he was, if he was really crazy, etc. Haha!
Read more

5 comments

FFmpeg, Linux, 3gp, Nokia, and you!

If you have a relatively-new Nokia phone it should be able to play videos, which is totally sweet. Any video that you can play on the computer can be converted to a format that your phone can play; videos from YouTube, VCD, SVCD, DVD, XviD, etc. All you need is FFmpeg (I use GNU/Linux, but FFmpeg also runs on BSD and apparently Windows). I’ve tried Nokia phones running Symbian S40 and S60, but it should work on other phones too (the 3gp file format was designed with mobile phones in mind).

If your phone has a bit of horsepower (tested on Nokia 5130 XpressMusic and 5320 XpressMusic), you can convert using the following command:

ffmpeg -i all_shall_perish-eradication.flv -f 3gp -vcodec mpeg4 -b 150000 -s 320x240 -r 18 -acodec libfaac -ab 64000 -ar 24000 -ac 2 all_shall_perish-eradication.3gp
Note: the “-r 18″ sets the frame rate. The video skips on some phones if they can’t keep up with the frame rate (even with the bit rate set lower, like 100000). You shouldn’t notice any loss of quality with a setting like 18 (most videos are closer to 30), but the video will be much more pleasant to watch. Play with the settings and pay attention to video/audio synchronization when people are talking, for example.

Phones like the Nokia 2630 and the 3110c use more-conservative settings, such as:

ffmpeg -i all_shall_perish-eradication.flv -f 3gp -vcodec h263 -b 100000 -s 128x96 -r 12 -acodec libamr_nb -ab 12200 -ar 8000 -ac 1 all_shall_perish-eradication.3gp

The difference between the two is:

  • Video codec
  • Video quality (-b, “bit rate”)
  • Audio codec (AMR was designed specifically for voice data)
  • Audio channels (-ac, stereo sound needs left and right!)
  • Frame rate

Enjoy.

3 comments

Nokia, GPRS, Linux, USB, and you!

Nokia 5320 XpressMusicI’ve written a few times about using GPRS with Linux in Kenya. First I was using Safaricom’s “Bambanet” USB device, which was merely a re-branded Huawei e220. A few months after that I sold the Bambanet and was using a Nokia 2630 over Bluetooth wireless. Last month I upgraded to a Nokia 5130 XpressMusic, and then sold it and upgraded to a Nokia 5320 XpressMusic (the 5320 runs Symbian S60, which is way more advanced than the S40 on either of my previous Nokias). The procedure is the same for all Nokia phones when using Bluetooth, but when using the USB cable there are a few show stoppers.
Read more

1 comment

Nokia 2630, Linux, Bluetooth, Safaricom, and you!

I bought a Nokia 2630 phone a few weeks ago. It has Bluetooth and GPRS, the latter meaning that I can browse the net on the go. The former plus the latter meaning that I can browse the net from my computer via the phone using the Bluetooth. I got it working in a few minutes on my Zenwalk (Slackware) laptop, and now you can too!
Read more

18 comments