OSX Automator - Auto conversion of files moved to folder: MOV to MP4
- Dominant language
- Shell
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
```zsh
for f in "$@"
do
# 1. Setup paths
base="${f%.*}"
# 2. Check for .mov extension
if [[ "$f" == *.mov ]]; then
# 3. Run FFmpeg
/opt/homebrew/bin/ffmpeg -i "$f" -vcodec h264 -preset fast -acodec aac -strict -2 "$base.mp4"
# 4. Check if FFmpeg succeeded (Exit code 0 means success)
if [ $? -eq 0 ]; then
# Move original to Trash
mv "$f" ~/.Trash/
# Show Success Alert
osascript -e "tell application \"Finder\" to display notification \"$(basename "$f")\" with title \"MOV to MP4 Conversion\""
else
# Optional: Show Error Alert if it fails
osascript -e "tell application \"Finder\" to display alert \"MOV to MP4 Error\" message \"Could not convert $(basename "$f")\" to mp4"
fi
fi
done
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.