Include this in your bashrc / bash_profile:
function vcompress() {
local base="$(basename "$1" .mp4)"
ffmpeg \
-i "$1" \
-vf 'scale=if(gte(iw\,ih)\,min(1580\,iw)\,-2):if(lt(iw\,ih)\,min(1580\,ih)\,-2)' \
"${base##*/}-compressed.mp4"
}
vcompress largefile.mp4