Skip to content

Instantly share code, notes, and snippets.

@octipus
Last active April 22, 2022 11:49
Show Gist options
  • Select an option

  • Save octipus/b9acb7707d5f6f2090d1c6fa069b31dd to your computer and use it in GitHub Desktop.

Select an option

Save octipus/b9acb7707d5f6f2090d1c6fa069b31dd to your computer and use it in GitHub Desktop.
ffmpeg Single/Batch compression script
### Single File - default compressor - change the CRF value to tweak with size(and quality)
ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4
### Batch Compression
1. Create a new folder for all your videos
2. Inside, create another folder called: compressed
3. Run script via your CLI
4. optional - change the CRF value to tweak with size(and quality)
for %a in ("*.*") do (ffmpeg -i "%a" -vcodec libx265 -crf 28 "compressed\%~na.mp4")
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment