ffmpeg - resize and crop
Use this:

-vf "scale=iw*min(1920/iw\,1080/ih):ih*min(1920/iw\,1080/ih), pad=1920:1080:(1920-iw*min(1920/iw\,1080/ih))/2:(1080-ih*min(1920/iw\,1080/ih))/2"


This code evaluates which ratio to apply for scaling, then scales it and finally applys the requisite amount of padding.