Welcome, Guest. Please login or register.
April 17, 2014, 08:56:18 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 623 times)
zvacet
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.

Code:
mkdir youtube

Go inside of the folder

Code:
cd youtube

and start to download with command (this is example)

Code:
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

Code:
ffmpeg -i ZwSGPCDpddc.flv stratus.mp3

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

Code:
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!
Logged
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!