alfred-youtube-workflow
alfred-youtube-workflow copied to clipboard
Audio download (mp3 convert) borken
[ERROR: alfred.workflow.action.script] Code 1: ERROR: ffprobe or avprobe not found. Please install one.
My downloaded audio is in .m4a format, is it because of this error? Is there a fix?
If I remember correctly, it was by design (iTunes). Should be easy to change to mp3 in the code.
I believe it says mp3 in code, here's the /bin/bash responsible for downloading:
# Audio
function assert_command_test {
local result=true;
cmd="$1"
command -v $cmd >/dev/null 2>&1 || {
result=false;
}
echo "$result"
}
uhome=$(printf "$HOME");
url="{query}";
if [ -z $url ]; then
echo "No url provided";
elif [ $(assert_command_test 'youtube-dl') = true ]; then
youtube-dl -q -o "~/Desktop/YT downloads/%(title)s.%(ext)s" "$url" --extract-audio --audio-format mp3;
else
./youtube-dl -q -o "~/Desktop/YT downloads/%(title)s.%(ext)s" "$url" --extract-audio --audio-format mp3;
fi
Am I missing something?
Yeah it says mp3. Very strange, definitely not missing anything. I wonder if running the script in terminal gives the same results.
I'm not that familiar with bash, but if you happen to get any ideas as to why this doesn't work, I'd love to hear it :) And yeah, thanks for otherwise awesome workflow!