Best presets to scale legacy 4:3 and 5:4 videos using ffmpeg
In order to maintain the aspect ratio of the source movie through FFMpeg's scaler, you have to specify a scale with an unknown:

ffmpeg -i input.mp4 -an -vcodec libx264 -profile:v main \
  -pass 2 -vf scale=-1:180 -pix_fmt (etc...)


The "-1" will tell the scaler to make the output 180px high, and however many pixels wide the output must be to preserve it's original aspect ratio.

This would give you movies with the old aspect ratio, you need a way of forcing the original movie into an arbitrary rectangle.  The documentation give an example of how you do this:

ffmpeg -i input.mp4 -vf scale="'if(gt(a,4/3),320,-1)':'if(gt(a,4/3),-1,240)'"  


This example will create a movie that is 320x240, and preserves the original pixel aspect ratio, whatever that may be.  The output will be positioned against the upper-left corner (I think) so you'll have to do a filter to repo it.