Quick Drop
How to compress videos with FFmpeg?
The basic FFmpeg command to compress a video while preserving the original audio channels looks like this:
ffmpeg -i input.mp4 -c:v libx264 -crf 28 -c:a copy output.mp4
Let's break this down:
ffmpeg
: This calls the FFmpeg tool.-i input.mp4
: Specifies the input video file.-c:v libx264
: Sets the video codec to H.264 (which is very efficient).-crf 28
: The Constant Rate Factor value, which controls the compression level for video. Lower values mean better quality but larger files. 28 is a reasonable default for a good balance of size and quality.-c:a copy
: This flag tells FFmpeg to copy the audio stream from the input to the output without re-encoding it, preserving the original audio channels and quality.output.mp4
: The path and filename for the compressed output video.
You can adjust the -crf
value to get higher compression (worse quality) or lower compression (better quality). Values typically range from 18 (best quality) to 28 (smaller file size).
How to compress videos quickly using QuickDrop?
QuickDrop offers a seamless integration with FFmpeg. You can add the following script into QuickDrop.
{{ffmpeg}} -hide_banner -y -i "{{inputFilePath}}" -c:v libx264 -preset slow -crf 18 -c:a aac -b:a 192k "{{outputFilePath}}"
After that, you can drag and drop files into the corresponding quick command to compress your videos quickly.
Home - Blogs - Change logs
© An Tran - 2024. All rights reserved.