Welcome, Guest. Please login or register.
April 18, 2014, 10:54:42 AM
Home Help Search Calendar Login Register
Show unread posts since last visit.
News: Let Pardus-Anka become #1: Pardus-Anka Bug ReportPardus-Anka World Google+ | The Pardus wiki  | Visit Pardus-Anka official website  | Register as forum member?  Email the moderator!

+  Pardus Worldforum
|-+  General
| |-+  Tips and tricks
| | |-+  Download Youtube files and convert them to mp3 from CLI
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Download Youtube files and convert them to mp3 from CLI  (Read 624 times)
Pardus fellow craft
Posts: 97

View Profile
« on: November 19, 2011, 11:47:36 AM »

I know these days browsers have addon for this purpose but maybe someone will be interested in how to do it from CLI.
We need two packages to do this;ffmpeg & youtube-dl.
I don´t remember installing ffmpeg so it should be installed by default.Youtube-dl package efrom repository doesn´t work so you will have to read this to install new package version.Big thanks to a.palius and SW.I made request so I hope package from repo will be updated.
For start make folder in witch you will download files.Let name it youtube.

mkdir youtube

Go inside of the folder

cd youtube

and start to download with command (this is example)

youtube-dl -f 34 http://www.youtube.com/watch?v=ZwSGPCDpddc
It will take a while but when it is finished we will convert that file to mp3

ffmpeg -i ZwSGPCDpddc.flv stratus.mp3

after that we don´t need flv file so we will delete it

rm -f *flv

P.S. Number 34 in download command is number witch describes witch format you want to download.For full list of supported formats see http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs

That is it!
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!