Welcome on DoYourself.org

Have an tutorial and wanna public it ?

On this website you can add any type of tutorials , but first you must have an account . To create one just complete right inputs with your dates.

Members Login

Lost your password?

Not member yet? Sign-up!

Security Code

YouTube, FFMPEG, and MP3 Conversion

Posted by CarcaBot on Sunday, 08.23.09 @ 16:50pm  •  Filled under Ffmpeg  • No comments  •   •  Views (197)  

Yesterday I published a quick post about a basic MPEG -> FLV video conversion method using FFMPEG. Today I want to share another great usage of FFMPEG: stripping a video’s audio and creating an MP3. As an added bonus, I’ll be ripping the audio from a great YouTube video using youtube-dl, a python script with loads of options for downloading YouTube videos.

The youtube-dl Shell Script

01.#command
02.davidwalsh83$ youtube-dl.py http://www.youtube.com/watch?v=tlWpnLdPwvk
03. 
04.#output
05.[youtube] Setting language
06.[youtube] tlWpnLdPwvk: Downloading video webpage
07.[youtube] tlWpnLdPwvk: Extracting video information
08.[youtube] tlWpnLdPwvk: URL: http://www.youtube.com/get_video?video_id=tlWpnLdPwvk&;t=vjVQa1PpcFMZ4TkTSYXamGxmLZq-ot2l8Jx-HiNAf0I=&el=detailpage&ps=
09.[download] Destination: tlWpnLdPwvk.flv
10.[download] 100.0% of 18.78M at   53.98k/s ETA 00:00

The initial install of youtube-dl was tough but only because I’m not well-versed with the permissions side of Unix. I eventually figured it out but if you have trouble installing youtube-dl or simply want to use its advanced options, check out youtube-dl’s documentation. youtube-dl also provides an option to read a text file with a list of videos and will do a batch download. Note: youtube-dl allows you to set an output file name but it didn’t appear to be working. If you’d like a more simple method, Mark Sanborn wrote a great post on ripping YouTube videos using wget.

The FFMPEG Shell Script

1.davidwalsh83$ ffmpeg -i tlWpnLdPwvk.flv RodStewartMaggieMay.mp3

As I did with youtube-dl, I chose the most basic usage of FFMPEG. FFMPEG’s documentation provides you a list of all of the possible conversion options if you need them.

Use the video player above to listen to the result. The video I chose is a live version of Maggie May by Rod Stewart recorded at Royal Albert Hall in the Knightsbridge area of the City of Westminster, London, England. The video is from Rod’s One Night Only DVD which I HIGHLY recommend. This is the best version of Maggie May that exists (my opinion but, as you know, when is my opinion not correct?) Enjoy!

 

(0) Comments for “Ffmpeg: youtube ffmpeg and mp3 conversion”

      Liked this post? Please help us to promote it!


    Leave a Reply