ffmpeg -i input.mov -c:v libx264 -crf 23 -maxrate 6M -bufsize 2M -x264-params colormatrix=bt709 -c:a aac -b:a 160k output.mp4
Flag | Description |
---|---|
-crf 23 |
Constant Rate Factor – ranges from 0 (no compression) to 51 (maximum compression). |
-maxrate 6M -bufsize 2M |
Limits the output file size. |
-x264-params colormatrix=bt709 |
Prevents colors from being washed out during compression. |
-c:a aac -b:a 160k |
Sets the audio compression. |