input.mp4
Selected file
FFmpeg command
ffmpeg -i 'input.mp4' -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k 'output.mp4'About this command
This command re-encodes the video with H.264 and AAC. The CRF value controls the balance between visual quality and file size.
Compression level
Balanced · CRF 23
A good balance between visual quality and file size.
-iSpecifies the input video file.
-c:v libx264Encodes the video using H.264, a widely supported video codec with good compression efficiency.
-crfControls video quality. Lower values produce better quality and larger files, while higher values produce smaller files with lower quality.
-preset mediumControls the encoding speed and compression efficiency. Slower presets generally produce smaller files at the same quality, but take longer to encode.
-c:a aacEncodes the audio using AAC.
-b:aSets the audio bitrate. Higher bitrates generally preserve more audio quality but produce larger files.