Skip to content

Instantly share code, notes, and snippets.

@arunasank
Last active August 29, 2015 14:27
Show Gist options
  • Save arunasank/302e7e7a460a3ec14047 to your computer and use it in GitHub Desktop.
Save arunasank/302e7e7a460a3ec14047 to your computer and use it in GitHub Desktop.
AIR audio extraction script
#!/bin/bash
# youtube-dl-playlist-to-mp3
#
# Utility to download Youtube playlist videos and ripp off their audio into mp3
#
# @author Angel Docampo
# @license WTFPL version 2
echo "This script is useful when you want to download and rip a complete Youtuble playlist into mp3"
echo "Enter a name for the playlist"
read -r NAME
echo "Enter the Youtube playlist URL to begin the process (e.g: http://www.youtube.com/playlist?list=PL3DFF2F30C0A04640 ):"
read PL
mkdir "$NAME" && cd "$NAME"
youtube-dl -o '%(stitle)s.%(ext)s' $PL
//AIR videos are mostly downloaded as webm - so extract only the ogg portion
for file in *.webm; do ffmpeg -i ./"$file" -vn -acodec copy ./"$file.ogg" ; done
echo "Conversion finished!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment