2011. március 20., vasárnap

Youtube to mp3 download - Potoc method

Hi!

I often see the problem that people cannot download from youtube to mp3 under windows.

I've got a method that you can download under Linux! (I use Ubuntu)

This method provides you that you can download from youtube to mp3 with 192kbps bitrate.
You need Firefox, with Easy Youtube Video Downloader plugin, ffmpeg, lame, mencoder.
Install the Firefox plugin under Tools-->Extensions(or Add-ons I don't know exactly)

then open a terminal and type this: sudo apt-get install ffmpeg mencoder lame

Type your password and let the apt-get install this stuff.

How it works?

Open a YouTube video. You can see the extension's button under the video screen. Click on it and download the video in .mp4 into your desktop. Then run my script using sh youtube.sh command. It'll rip the audio into a 192 kbps bitrate mp3.
The script


#!/bin/bash
mv /home/potoc/Desktop/*.mp4 /home/potoc
for i in *.mp4
do
newname=`echo "$i" | sed 's/.mp4/.mp3/'`
ffmpeg -i "$i" temp.wav
lame -h -b 192 "temp.wav" "$newname"
rm temp.wav
done
mv *.mp3 /media/Potoc/YouTube
rm /home/potoc/*.mp4
echo "MP3 file can be found in /media/Potoc/YouTube directory."
echo "##########  Potoc modified script  ##########"


Please, copy this text into a text editor(for ex. gedit) then save it to your home directory with youtube.sh name. Then give execution rights to the script with the chmod a+x youtube.sh command. Replace my directory names with yours.

So the complete method:
(1) Download the video in mp4 with the Firefox extension.
(2) Open a terminal, then type sh youtube.sh
(3) Enjoy =)

PS: This technique can be used under Windows, but you will have to convert mp4 to mp3 with an other application.

Nincsenek megjegyzések:

Megjegyzés küldése