There are sadly not that many libraries which you can add to Blender that help here.
The problem with most codec-libraries boils down to the problem that they do not support sensible seeking.
ffmpeg (and it's underlying libraries libavformat and libavcodec) maybe not the best around but they basically work and can be build on several platforms. The short coming of ffmpeg is, that the authors tend to change the interface at will. The blender code tries to address most versions.
There are presets for most sensible output formats like SVCD, DVD, etc. and adjust the other values taking into account if you are generating PAL or NTSC videos.
The FFMPEG-Output is the only one in Blender that can automatically multiplex the audio-timeline into the output-stream. Just click on "Multiplex audio", choose your codec and bitrate and enjoy.
The audio-output is also controlled using the usual output-render options! If you want to change the output sample rate you have to do it there!
The code does not handle wrong combinations very well. For example the libavcodec is unable to produce 32khz DV-audio output. It simply dumps core...
./configure && make && make installlibIf you have installed libavformat-dev or libavcodec-dev before (using the Debian package system for example) please remove them before trying to compile Blender. If it doesn't work out for you, please use
export NAN_NO_FFMPEG = truein your user-def.mk.