Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: YouTube-DL  (Read 3829 times)

0 Members and 1 Guest are viewing this topic.

Vinil

  • Guest
YouTube-DL
« on: December 17, 2013, 01:23:51 am »
youtube-dl is a Python based small command-line tool that allows to download videos from YouTube.com, Dailymotion, Google Video, Photobucket, Facebook, Yahoo, Metacafe, Depositfiles and few more similar sites. It written in pygtk and requires Python interpreter to run this program, it’s not platform restricted. It should run on any Unix, Windows or in Mac OS X based systems.

youtube-dl also allows to choose specific avialable video quality format to download or let the program itself automatically download higher quality video from the site.


YouTube-DL Installation

Open your terminal and run:

Quote
# wget http://youtube-dl.org/downloads/2013.02.02/youtube-dl -O /usr/local/bin/youtube-dl
# chmod a+x /usr/local/bin/youtube-dl


If you receive any certificate related error, try with the option '--no-check-certificate'.

Note: If you receive an error like: SyntaxError: invalid syntax.

Update 'python' to latest version


How to Use YouTube-DL to Download Videos

To download a video file, simply run the following command. Where “VIDEO_URL” is the url of the video that you want to download.


Code: [Select]
# youtube-dl http://www.youtube.com/watch?v=8qY3LoDP7Ew

[youtube] Setting language
[youtube] 8qY3LoDP7Ew: Downloading webpage
[youtube] 8qY3LoDP7Ew: Downloading video info webpage
[youtube] 8qY3LoDP7Ew: Extracting video information
[download] Destination: Akcent Love Stoned 2013( Official Music Video ) LYRICS.flv-8qY3LoDP7Ew.mp4
[download] 100% of 12.23MiB in 00:01


To download a video in availabe file formats, use option "--all-formats" with the command.

Code: [Select]
# youtube-dl http://www.youtube.com/watch?v=8qY3LoDP7Ew

[youtube] Setting language
[youtube] 8qY3LoDP7Ew: Downloading webpage
[youtube] 8qY3LoDP7Ew: Downloading video info webpage
[youtube] 8qY3LoDP7Ew: Extracting video information
Available formats:
37        :        mp4        [1080x1920]
46        :        webm       [1080x1920]
22        :        mp4        [720x1280]
45        :        webm       [720x1280]
35        :        flv        [480x854]
44        :        webm       [480x854]
34        :        flv        [360x640]
18        :        mp4        [360x640]
43        :        webm       [360x640]
5         :       flv        [240x400]
17        :        mp4        [144x176]


To download a preferred file format, use the option '-f' (video format code). For example, I would like to download flv format, So I use format code as '34' as shown below.


Code: [Select]
# youtube-dl -f 34 http://www.youtube.com/watch?v=8qY3LoDP7Ew

[youtube] Setting language
[youtube] 8qY3LoDP7Ew: Downloading webpage
[youtube] 8qY3LoDP7Ew: Downloading video info webpage
[youtube] 8qY3LoDP7Ew: Extracting video information
[download] Destination: Akcent Love Stoned 2013( Official Music Video ) LYRICS.flv-8qY3LoDP7Ew.flv
[download] 100% of 12.23MiB in 00:01


To download a list of video files, create a file and place all the YouTube links that you wish to download.

Code: [Select]
# youtube-dl -a youtube_links.txt

That's it. Now enjoy downloading your favourite videos.  ;D
« Last Edit: December 17, 2013, 01:49:38 am by Vinil »