I wrote the following wrapper for FFMPEG:
function Video($input, $crop = null, $scale = null, $output = null, $extra = null)
{
$input = @new ffmpeg_movie
In general you shouldn't specify a bitrate at all. It's only useful for streaming, in which case you need to respect VBV as well (which specifies a maximum bitrate over time, as well as the average bitrate).
Use x264 crf 23 - its default constant-quality mode- and be happy. In the case of ffmpeg, this is something like:
ffmpeg -i -vcodec libx264 -vpre slower -acodec copy
As for audio, it's best directly copied if the input was compressed. This is not possible in some situations, such as if the input was vorbis and the output is a .flv file. In that case I would stick to whatever the default of the audio encoder selected is.