Encode video for uploading to Youtube/Vimeo. The output should be a similar quality as the input and will hopefully be a more manageable size.
ffmpeg -i input.avi -c:v libx264 -preset slow -crf 18 -c:a copy -pix_fmt yuv420p output.mkv
ffmpeg -i input.mov -c:v libx264 -preset slow -crf 18 -c:a aac -b:a 192k -pix_fmt yuv420p output.mkv
ffmpeg -i input.mp4 -vcodec libx264 -crf 24 -acodec aac output.mp4