Skip to content

Instantly share code, notes, and snippets.

@alfredodeza
Created January 2, 2023 21:21
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 alfredodeza/f3b42d4fd1ab958da29475efbcee8cd7 to your computer and use it in GitHub Desktop.
Save alfredodeza/f3b42d4fd1ab958da29475efbcee8cd7 to your computer and use it in GitHub Desktop.
Use avconvert to encode MOV files to MP4 using h264
destination_dir=$(dirname $1)
input_filename=$(basename $1)
name=$(basename ${input_filename} .mov)
output_path="$destination_dir/$name.mp4"
avconvert --preset Preset1920x1080 --source $1 --output $output_path
if [ $? -eq 0 ]; then
mv $1 /tmp/
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment