Cron job cannot find ffprobe/avprobeor ffmpeg/avconv even though its installed

cron

I have a cronjob setup to run "/Users/admin/Scripts/youtubedl.sh"

Script:

cd "/Users/admin/Music/youtubedl-music"
/usr/local/bin/youtube-dl -o "%(title)s.%(ext)s" --download-archive .mydownloads -i -f bestaudio --extract-audio --audio-format mp3 https://youtube.page/here

Cron fails saying "ERROR: ffprobe/avprobe and ffmpeg/avconv not found. Please install one."

If I run it manually everything executes correctly, somehow its unable to find ffmpeg/avconv when running via cron. How can I correct this?

Best Answer

Specify the absolute path to the ffmpeg/avconv binary with the --ffmpeg-location option:

--ffmpeg-location PATH

Location of the ffmpeg/avconv binary; either the path to the binary or its containing directory.