# Download and convert youtube videos

Introduction

youtube-dl

Install dependencies and youtube-dl python script

# apt-get install ffmpeg lame libavcodec-extra-53
# apt-get install youtube-dl

Download a list of videos and convert them to mp3 files

# echo "http://www.youtube.com/watch?v=6cz1MbifOtU
> http://www.youtube.com/watch?v=woy6vdMT40U
> http://www.youtube.com/watch?v=9B0vzmowxkU
> http://www.youtube.com/watch?v=HGJWhltJ2JA
> http://www.youtube.com/watch?v=epcn7YEO8M8
> http://www.youtube.com/watch?v=ark-1xpvt2A
> http://www.youtube.com/watch?v=bkGC-wo2t1o
> http://www.youtube.com/watch?v=7s2vHx2VE9Y
> http://www.youtube.com/watch?v=KstbKNpmy3A
> http://www.youtube.com/watch?v=nGUzPk6srTU
> http://www.youtube.com/watch?v=aejsavfztzI
> http://www.youtube.com/watch?v=8lMIPBAJWGQ
> http://www.youtube.com/watch?v=0btmw2E10n0
> http://www.youtube.com/watch?v=Iidnp3vgqFw
> http://www.youtube.com/watch?v=Mhk8IyWsgeM
> http://www.youtube.com/watch?v=oi0XJWWFZA4
> http://www.youtube.com/watch?v=WRBBCUGUwwQ
> http://www.youtube.com/watch?v=2YIoP4HgZjA
> http://www.youtube.com/watch?v=WXa0rNgNyfA
> http://www.youtube.com/watch?v=qpUNdnR7Sjw" | \
> xargs -I {} youtube-dl -t --extract-audio --audio-format mp3 {}
[youtube] Setting language
[youtube] 6cz1MbifOtU: Downloading video webpage
[youtube] 6cz1MbifOtU: Downloading video info webpage
[youtube] 6cz1MbifOtU: Extracting video information
[download] Destination: David_Guetta_DJ_MIX_a_Flaix_fm_Sessio_25_2_2012_1-6cz1MbifOtU.webm
[download]  42.9% of 25.63M at    1.76M/s ETA 00:08
...

No comments: