> compression
5 commands for ffmpeg compression
// compression
5 commandsCompress video with CRF quality control
$ ffmpeg -i input.mp4 -c:v libx264 -crf 23 -c:a aac output.mp4Two-pass encoding for target file size
$ ffmpeg -i input.mp4 -c:v libx264 -b:v 1M -pass 1 -f null /dev/nullHardware-accelerated encoding with VideoToolbox
$ ffmpeg -i input.mp4 -c:v h264_videotoolbox -b:v 5M output.mp4Hardware-accelerated encoding with NVENC
$ ffmpeg -i input.mp4 -c:v h264_nvenc -preset p7 -cq 23 output.mp4Reduce file size by limiting bitrate
$ ffmpeg -i input.mp4 -b:v 1M -maxrate 1M -bufsize 2M -c:a aac output.mp4