Last active
March 24, 2020 10:11
-
-
Save anandijain/a4cb60d09028ac664b76ac9fa5f89235 to your computer and use it in GitHub Desktop.
youtube-dl + ffmpeg: url-> webm -> wav
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# requires youtube-dl and ffmpeg | |
# handy for musicians gathering samples | |
get_audio(){ | |
youtube-dl -f251 $1 -o - | ffmpeg -i pipe: -ac 2 -f wav $2 | |
} | |
# usage: get_audio "URL" "output.wav" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment