Optimum video codec for low end Android phones? While I know Android phones play mp4 the best, I wanted to know what other specification in this container is the best for playback, (the bitrate, resolution, fps etc). Or perhaps some other codec/format that Android can (or is designed to) play smoothly and with an acceptable file size/quality ratio?

I searched the Android developer page and tried the H.264 setting on my converter etc, but the file fails to play natively on my handset and when I tried to open it using RockPlayer. It plays slowly and the video-audio gets out of sync progressively. I tried many external players. However, 3GP videos from my Nokia phones play smoothly (even natively). So I want to know what is ideal for my low end phone (video should be normal quality and size)? 

My phone is a Huawei IDEOS U8150 running Froyo with a 320x240 resolution and a 528 Mhz ARMv6 processor.

Also if anyone has tips, what types of encoding is recommended, if I'd be using the software decoder mode in apps like RockPlayer, so I can achieve more file size compression yet achieve smooth playback?
I got H.264 (x264 encoder) to play with these settings on my Huawei U8150


Main profile
320x240 (original video was 4:3 which helps, 16:9 or 2.35:1 should become even easier to decode)
and tuned with the 'fastdecode' setting


I used ffmpeg as the frontend, as Handbrake makes selecting the "fastdecode" option impossible

ffmpeg -i "inputfile.avi" \
    -sws_flags lanczos+accurate_rnd \
    -vf "scale=320:-1" \
    -c:v libx264 \
        -crf 23.0 \
        -preset veryslow \
        -profile:v main \
        -tune fastdecode \
    outputfile.mp4


the resultant file was only 10% bigger than the one using high profile and no fast decode

I would also recommend using MX player as it actively resyncs the video and audio for those occasional slow downs it may have, but fastdecode seems to fix all the slow downs I could find.