1. Extract the audio from a mp4 file via ffmpeg
2. Set the label color of the outputted file from step 1 to red
So this is what I have:
- Code: Select all
#!/bin/sh
f="$1"
filename=$(basename "$f")
dirname=$(dirname "$f")
extension="${filename##*.}"
filename="${filename%.*}".m4a
/Users/scott/bin/ffmpeg -i "$f" -vn -acodec copy "$dirname/$filename"
/usr/bin/osascript -e "tell application \"Finder\" to set label index of alias POSIX file (\"file://$dirname/$filename\") to 2"
Sometimes the label color will be set and other times it won't. Any ideas on why the label is not getting set consistently?