How to encode H.264 video with baseline profile and AAC with low complexity profile using ffmpeg

With a recent (0.11.*+) version of ffmpeg and libx264+libfaac library support the following should work:
ffmpeg -i input.avi -y -f mp4 -vcodec libx264 -profile:v baseline -acodec libfaac -profile:a aac_low -b:v 560k -ar 44100 -b:a 128k -ac 2 -s 480x270 output.mp4

The noteworthy options (changes compared to older ffmpeg versions) are:
  • "-profile:v": specifies the profile for the video encoder
  • "-profile:a": specifies the profile for the audio encoder
  • "-b:v": specifies the bitrate for the video encoder
  • "-b:a": specifies the bitrate for the audio encoder
Btw. the low complexity profile is the default in libfaac (and/or ffmpeg) so if you don't specify it, you're still OK.