Created
January 14, 2021 09:29
-
-
Save ebual/f19ae8954eab2839b1f96f6cff64a684 to your computer and use it in GitHub Desktop.
Mac Automator Script for converting MOV to MP4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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