Tool
When your external drive is full, re-encoding every video would take far too long. Paste a list from an ffprobe scan of the folder (codec, resolution, fps, bitrate, duration) and this tool calculates, for each file, how many GB you would save by re-encoding it, using the x264 and x265 curves we measured ourselves, then ranks the files largest first. Files whose bitrate is already low, so there is nothing to gain, are flagged. All processing happens inside this browser.
1. Build the file list (Windows PowerShell)
Open PowerShell in the folder and run the script below. It walks all subfolders and writes list.csv. ffprobe must be on your PATH. File names and paths are not sent anywhere; whatever you paste is processed only inside your browser.
Get-ChildItem -Path . -Recurse -File -Include *.mp4,*.mkv,*.mov,*.avi,*.m4v,*.ts,*.wmv | ForEach-Object {
$j = ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,width,height,avg_frame_rate,bit_rate:format=duration,size,bit_rate -of json $_.FullName | ConvertFrom-Json
$s = $j.streams[0]; $f = $j.format
if ($s) { '"{0}",{1},{2},{3},{4},{5},{6},{7},{8}' -f $_.FullName.Replace('"','""'), $s.codec_name, $s.width, $s.height, $s.avg_frame_rate, $s.bit_rate, $f.duration, $f.size, $f.bit_rate }
} | Set-Content -Encoding UTF8 list.csvColumn order: path, codec, width, height, fps, video bitrate (bps), duration (s), file size (bytes), overall bitrate (bps). The header line is optional. The example is made-up values to show the format, not real files.
3. Target quality for re-encoding
The higher the target, the less you save. See the notes below and the VMAF score interpreter for what each score looks like.
Codec to re-encode with
For HEVC files both choices are the same. Conversion to AV1 or VP9 is not included in this tool.
Resolution and fps scaling
We only measured 1080p25 clips, so 4K, 30 fps and 60 fps files are scaled by this ratio as an assumption. 0.75 is an option for the case where 4K needs less; it is not a measured value.
Used for files such as MKV where the video stream bitrate is empty. 128 is an arbitrary starting value, so change it to match your actual audio.
Loading measurement data…
The tool reads the raw data from the CRF sweep measurement as is (four 10-second 1080p25 clips, x264 and x265 at medium, six CRF steps, one PC). Every measurement point has a bitrate (kbps) and a mean VMAF.
"bpp" (bits per pixel) is the bitrate divided by frame size and fps, shown so you can compare files of different resolutions. To see how much is too much, with the measured curve alongside, use the bits-per-pixel bitrate judge. What a VMAF score means is covered in the VMAF score interpreter, and the bad moments an average score hides are in Is an average VMAF of 95 safe?.
list.csv. With a very large number of files it can take a few minutes. On a Mac or Linux, build a CSV with the same column order yourself and paste it in.