mp4tools are a set of scripts to encode Audio and Video in Isomedia (aka MP4) format
mp4tools uses opensources programs as backends like mencoder, MP4Box, xvid, x264
and its quality is very good.
There are presets for most common devices like Sony PSP, Apple iPod, Nokia S60 phones,
so you haven't to go in the jungle of encoding options, firmware bugs, unsupported configurations common in all embedded devices.