alfred-youtube-workflow icon indicating copy to clipboard operation
alfred-youtube-workflow copied to clipboard

Audio download (mp3 convert) borken

Open willfarrell opened this issue 11 years ago • 5 comments

[ERROR: alfred.workflow.action.script] Code 1: ERROR: ffprobe or avprobe not found. Please install one.

willfarrell avatar May 07 '14 03:05 willfarrell

My downloaded audio is in .m4a format, is it because of this error? Is there a fix?

sashans13 avatar Mar 14 '15 11:03 sashans13

If I remember correctly, it was by design (iTunes). Should be easy to change to mp3 in the code.

willfarrell avatar Mar 18 '15 22:03 willfarrell

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?

sashans13 avatar Mar 18 '15 23:03 sashans13

Yeah it says mp3. Very strange, definitely not missing anything. I wonder if running the script in terminal gives the same results.

willfarrell avatar Mar 18 '15 23:03 willfarrell

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!

sashans13 avatar Mar 18 '15 23:03 sashans13