linux convert youtube to mp3


#aptitude install youtube-dl ffmpeg libmp3lame

a simple bash script called youtube

#!/bin/bash
x=/tmp/youtube-dl-$RANDOM-$RANDOM.flv
youtube-dl --output=$x --format=18 "http://www.youtube.com/watch?v=$1"
echo "convert flv to mp3"
ffmpeg -i $x -acodec libmp3lame -ac 2 -ab 128k -vn -y "/home/paragasu/mp3/youtube/$2"
rm $x
echo "done"

the fun begin

$youtube linkname fileoutput.mp3


more

Advertisements

Published by

paragasu

Different. In a good way

One thought on “linux convert youtube to mp3”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s