Jump to content

Problem to start a Python script

Recommended Posts

12 minutes ago, deanishe said:


Never heard that before. Had to look it up. Quite a useful expression. Thanks!


I just dug out an old script that wraps youtube-dl. --ffmpeg-location /usr/local/bin/ffmpeg is likely the option you need.




/usr/local/bin/youtube-dl -f bestvideo+bestaudio --ffmpeg-location /usr/local/bin/ffmpeg -q -o "/path-where-files-are-stored/%(title)s.%(ext)s" "$url"; echo "Completed";

Edited by petebocken
Link to post

Glad I could help.


When you mentioned not being able to find ffmpeg, that definitely rang a bell. I remembered having the same issue when I tried to run my script from anywhere but a shell.

Edited by deanishe
Link to post

Even more fun.  Added another keyword in the workflow to only download the audio from the YouTube video and then drop it in the "Automatically Add to iTunes" folder. :D


/usr/local/bin/youtube-dl -f m4a --ffmpeg-location /usr/local/bin/ffmpeg -q -o "/Users/peter/Music/iTunes/iTunes Media/Automatically Add to iTunes/%(title)s.%(ext)s" "$url"; echo "Completed";


I could only get m4a working, the rest said the requested format not available.  M4A works in iTunes just fine.

Edited by petebocken
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...