FFmpeg on windows
Downscale video size with FFmpeg
FFmpeg on windows
FFmpeg is a CLI downscaling tool mostly used with linux. it is also compatible with Windows
Install FFmpeg on Windows
This documentation is based on information here https://ffmpeg.org/download.html
- Open PowerShell
Launch this commande
1
winget install ffmpeg
Test installation
1
ffmpeg -version
FFmpeg should be shown
Downscaling video files
I was using ffmpeg to reduce video file size to add video to a static website where video are saved in GitHub. the Max file size is 100MiB Tested with .mkv
and .mp4
formats
Here is the command I used to downscale from 1440p to 1080p.
1
ffmpeg -i input.mp4 -vf scale=1920:1080 -c:v libx264 -crf 23 -preset medium -c:a copy output_1080p.mp4
-crf
To lower the quality (and shrink file size), Increase the -crf value.-crf 23
= default (medium quality)-crf 28
= lower quality (smaller file)-crf 30
= even lower quality (more compression)
-preset
controls how much time the encoder spends optimizing the video. It does not affect quality directly. It affects File size, Encoding speed and CPU usage.Preset Encoding Speed File Size Quality ultrafast Fastest Biggest Lower compression superfast veryfast faster fast medium (default) Balanced Good Good slow Slower Smaller Same quality, smaller file slower veryslow Very slow Smallest Best compression
This post is licensed under CC BY 4.0 by the author.