How to compress video file?

ffmpeg -i input.file -c:v libxvid -qscale:v 8 -c:a libmp3lame -ac 2 -q:a 6 -s 1024x768 outputfile-vq8aq6.avi

//  -qscale:v 8 -q:a 6  - higher arg values​​ - lower quality and reduce file size

// 1024x768 - output video stream resolution