Hardware-accelerated encoding with VideoToolbox

compression

// shell

$ ffmpeg -i input.mp4 -c:v h264_videotoolbox -b:v 5M output.mp4