convert any video to mp4 (h264, AAC)

and adopt it for playing in browser
ffmpeg -i input.avi -movflags +faststart -pix_fmt yuv420p output.mp4

Option -movflags faststart moovs atom at the front of the file to allow video play in streaming mode

convert any video to mp4, resize to 720p and compreess it

ffmpeg -i input.avi -movflags +faststart -pix_fmt yuv420p -crf 30 -vf scale=-1:720 output.mp4

-crf 23 — default compression
-crf 25 — middle compression
-crf 35 — high compression

just remove audio and keep video untoched

ffmpeg -i input.avi -vcodec copy -an output.mp4

Convert all files in folder to fullHD

for i in *.mp4; do ffmpeg -i "$i" -movflags +faststart -pix_fmt yuv420p -crf 25 -vf scale=-1:1080 ~/Downloads/"${i%.*}.mp4"; done