Skip to content

Instantly share code, notes, and snippets.

@smagch
Created May 12, 2020 13:44
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 smagch/73ebf05af605034ded594a4cc3475aa8 to your computer and use it in GitHub Desktop.
Save smagch/73ebf05af605034ded594a4cc3475aa8 to your computer and use it in GitHub Desktop.
convert multiple movies
#!/usr/bin/env bash
distdir="$(pwd)/dist$RANDOM$RANDOM"
mkdir "$distdir"
for input in "$@"; do
base=$(basename "$input")
output="$distdir/${base,,}"
ffmpeg -i "$input" \
-crf 28 \
-b:a 128k \
-color_range 1 \
-color_trc arib-std-b67 \
-color_primaries bt2020 \
-colorspace bt2020nc \
"$output"
echo "converted: $output"
done
echo "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment