Skip to content

Instantly share code, notes, and snippets.

@fatihturan
Created December 1, 2022 13:22
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 fatihturan/b8a9d602b0fe01312a0209c25c9137d9 to your computer and use it in GitHub Desktop.
Save fatihturan/b8a9d602b0fe01312a0209c25c9137d9 to your computer and use it in GitHub Desktop.
Optimize the videos with Handbrake CLI
for f in "$@"
do
name=$(echo $f | cut -f 1 -d '.')
/usr/local/bin/HandBrakeCLI -f mp4 -e x264 -r 30 -q 22.0 -i "$f" -o "$name.mp4"
done
osascript -e 'display notification "All videos are optimized" with title "Job(s) Done!" sound name "Submarine"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment