Skip to content

Instantly share code, notes, and snippets.

@ebual
Created January 14, 2021 09:29
Show Gist options
  • Select an option

  • Save ebual/f19ae8954eab2839b1f96f6cff64a684 to your computer and use it in GitHub Desktop.

Select an option

Save ebual/f19ae8954eab2839b1f96f6cff64a684 to your computer and use it in GitHub Desktop.
Mac Automator Script for converting MOV to MP4
#!/bin/bash
originalFilePath=$1
#extension=$(echo "$originalFilePath" | rev | cut -d"." -f1 | rev)
pathWithoutExtension=$(echo "$originalFilePath" | rev | cut -d"." -f2- | rev)
/Applications/ffmpeg -i "$originalFilePath" "$pathWithoutExtension.mp4"
if [ $? -eq 0 ]; then
rm -f "$originalFilePath"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment