Two-pass encoding for target file size

compression

// shell

$ ffmpeg -i input.mp4 -c:v libx264 -b:v 1M -pass 1 -f null /dev/null
$ ffmpeg -i input.mp4 -c:v libx264 -b:v 1M -pass 2 output.mp4