This Applescript can be run in Qlab. A Pro licence (Audio/Video/Lighting) is required to run script cues. It is, of course, possible to run this via script editor.
The script will prompt the user for a youtube link and using youtube-dl and FFmpeg the audio will be extracted and downloaded to your downloads folder as a .wav
Installation
Use Homebrew to install FFmpeg and youtube-dl
- ⌘ + Space bar to open spotlight
- Type “Terminal” and open terminal
- Install Homebrew with the command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Install youtube-dl with…
brew install youtube-dl
- Install FFMpeg with…
brew install ffmpeg –with-libvpx
In Qlab, Create a script cue with the following…
-- Rough and ready script by Matt Royston-Bishop 17/07/2020
-- www.mattroystonbishop.com
-- Rip Youtube audio to wav using youtube-dl
-- No error checking. Link must be correct. i.e https://www.youtube.com/watch?v=Jn7uAsLWXpk
-- Installation Instructions
-- To install youtube-dl and FFmpeg use Brew https://brew.sh/
-- Open Terminal
-- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
-- Install youtube-dl with...
-- brew install youtube-dl
-- Install FFMpeg with...
-- brew install ffmpeg --with-libvpx
-- Ask for link
display dialog "Youtube Link" default answer ""
set the YoutubeLink to the text returned of the result
--
set thePath to quoted form of YoutubeLink
set downloadsPath to "Macintosh HD:Users:macuser:Downloads:" -- Where is your downloads folder
set theDialogText to "WAV file will be in Downloads Folder. I to Import"
-- Run process
do shell script "cd \"$HOME/Downloads\"; /usr/local/bin/youtube-dl -x --audio-format wav --no-warnings --ffmpeg-location /usr/local/bin/ffmpeg " & thePath
-- Display confirmation dialog
display dialog theDialogText
My full Qlab 4 template which contains this script along with other workflow and timesaving scripts can be found at mattroystonbishop.com/downloads/Qlab
Tagged #Qlab, #Applescript.