Skip to content

Instantly share code, notes, and snippets.

@malwaremily
Created July 8, 2020 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malwaremily/b21461c14fd2bab781e75519078cd447 to your computer and use it in GitHub Desktop.
Save malwaremily/b21461c14fd2bab781e75519078cd447 to your computer and use it in GitHub Desktop.
Batched compress videos files in directory using ffmpeg
# See this stackoverflow discussion: https://unix.stackexchange.com/questions/28803/how-can-i-reduce-a-videos-size-with-ffmpeg
mkdir compressed
for file in *.mp4; do ffmpeg -i "$file" -vcodec libx265 -crf 28 "compressed/${file%.mp4}.jpg"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment