We switched service providers at work, and as a result switched to new Blackberrys. Since my position involves international travel, that meant that I got one of the spiffy ‘World Edition’ 8830s. The two things about it that I wanted to explore a little were the gps capability and it’s media support.
On the gps front, it has a full internal gps, unlike a lot of cell phones that can only determine location with the assistance of cell towers. There are a few commercial applications out there that support the unit, but I was unwilling to pay $25 or more when the unit already has an included mapping package and the ability to install google maps. Since the missing feature as far as I’m concerned is logging of position over time, I naturally went looking for open source solutions. I found a few different programs, but the one that worked for me was bbTracker. It tracks the position, displays it on the screen, and saves the track to the Blackberry. Once you have a saved track, you can export it in a couple of formats, and use it to do things like display in Google Maps.
I did run into one problem with bbTracker – it seemed like it wouldn’t work for me at first, everytime I tried to use it, it would crash. The crashing is definitely a bug, but there turned out to be an easy workaround. The problem is that if no gps position has been calculated when you start a track, when it gets the first position it crashes. To avoid this, you need to wait for a position to be displayed before starting a track. Other than that, it does what I want. The next trick is to take the track data and use it to automatically tag my photographs with location data.
Once I had gps working, I then turned my attention to converting video into a format that would play on the 8830. RIM has a page that lists the supported codecs, etc. but I had a lot of trouble getting anything to work. It seemed like no matter what I did, it told me the format was not supported. Since I’m primarily a linux user, the fact that the Roxio Media Manager application converts videos to the right format didn’t help as a long term solution. It did however give me a valid file to look at – and using that I managed to figure out how to successfully convert videos.
The solution appears to be to use a .mp4 container, not a .avi container. My initial conversion attempts all used mencoder, but I had to switch to ffmpeg to get it into an mp4 container. To make that work on Ubuntu, I wound up having to recompile ffmpeg since the required codecs are not supported by default. If you need to do the same thing, these are what I used.
The actual command I’m using looks like this:
ffmpeg -i input_file.mpg -f mp4 -vcodec mpeg4 -maxrate 800k -b 700k -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab 64 -s 320:240 -aspect 4:3 output_file.mp4
There appear to be a couple ‘correct’ resolutions – 320×240 is full screen, 4:3 aspect ratio, 240×180 is the ‘recommended’ 4:3 resolution, and 320×180 is the right one for a 16:9 aspect ratio.
I suspect there are a bunch of tweaks that can be applied to this yet, for instance, I suspect I can reduce the base video bitrate can be reduced a little, but for now I’ve figured out how to convert movies that will play.