Install YouTube-DL – A Command Line Video Download Tool for Linux
转载:http://www.tecmint.com/install-youtube-dl-command-line-video-download-tool/
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.
Recently, youtube-dl added video download support for 17 new websites: brightcove.com, auengine.com,RingTV, instagram.com, Jukebox, 3sat, CSpan, Statigr.am, traileraddict.com, hotnewhiphop.com, wat.tv, tu.tv,gamespot.com, tudou.com, Wimp.com, archive.org and break.com
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. It also has supports for user specific playlistdownloads, options to add custom or original title to the downloaded video file. proxy support and many more.
Install YouTube-DL in RHEL/CentOS and Fedora
The youtube-dl program can be installed by enabling epel repository under your systems. Once enabled, you can install using ‘yum‘ package manager tool as shown.
# yum install youtube-dl
Update: If you don’t wish to add any third party repository, you can still install it right away using curl or wgetcommand as shown.
# curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl OR # wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
Note: Your system must have curl or wget packages installed to fetch the recent version youtube-dl file. If you don’t have them, you may yum to get it.
After fetching the file, you need to set a executable permission on the script to execute properly.
chmod a+rx /usr/local/bin/youtube-dl
Install YouTube-DL in Ubuntu/Linux Mint and Debian
Ubuntu users can download and install latest youtube-dl version from the webupd8 PPA as shown.
$ sudo add-apt-repository ppa:nilarimogard/webupd8 $ sudo apt-get update $ sudo apt-get install youtube-dl
Update: Similarly, instead using any third party PPA, you can use curl or wget command to install latest version of youtube-dl script as shown.
$ sudo curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl OR sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
After downloading the script, set the executable permission.
$ sudo chmod a+rx /usr/local/bin/youtube-dl
Update YouTube-DL
Youtube-dl itself can be updated to the latest version using the following command.
# youtube-dl -U
Sample Output
Updating to version 2015.09.03 ... Updated youtube-dl. Restart youtube-dl to use the new 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.
# youtube-dl https://www.youtube.com/watch?v=iRYvuS9OxdA
Sample Output
[youtube] iRYvuS9OxdA: Downloading webpage [youtube] iRYvuS9OxdA: Downloading video info webpage [youtube] iRYvuS9OxdA: Extracting video information [youtube] iRYvuS9OxdA: Downloading js player new-en_US-vflCeB3p5 [youtube] iRYvuS9OxdA: Downloading DASH manifest [download] Destination: Amy Macdonald - This Is The Life-iRYvuS9OxdA.mp4 [download] 100% of 10.33MiB in 00:01
To list all available formats of video, use option “–list-formats” with the youtube-dl command.
# youtube-dl --list-formats https://www.youtube.com/watch?v=iRYvuS9OxdA
Sample Output
[youtube] vKtwZmhX0lw: Downloading webpage [youtube] vKtwZmhX0lw: Downloading video info webpage [youtube] vKtwZmhX0lw: Extracting video information [youtube] vKtwZmhX0lw: Downloading DASH manifest [youtube] vKtwZmhX0lw: Downloading DASH manifest [info] Available formats for vKtwZmhX0lw: format code extension resolution note 171 webm audio only DASH audio 113k , vorbis@128k (44100Hz), 1.86MiB 140 m4a audio only DASH audio 128k , m4a_dash container, aac @128k (44100Hz), 2.14MiB 141 m4a audio only DASH audio 255k , m4a_dash container, aac @256k (44100Hz), 4.30MiB 278 webm 180x144 DASH video 63k , webm container, vp9, 1fps, video only, 946.76KiB 160 mp4 180x144 DASH video 112k , avc1.4d400c, 15fps, video only, 1.86MiB 242 webm 300x240 DASH video 170k , vp9, 1fps, video only, 2.50MiB 133 mp4 300x240 DASH video 247k , avc1.4d400d, 25fps, video only, 4.11MiB 243 webm 400x320 DASH video 288k , vp9, 1fps, video only, 4.07MiB 13 3gp unknown small 17 3gp 176x144 small , mp4a.40.2, mp4v.20.3 36 3gp 320x240 small , mp4a.40.2, mp4v.20.3 5 flv 400x240 small 43 webm 640x360 medium , vorbis, vp8.0 18 mp4 640x360 medium , mp4a.40.2, avc1.42001E (best)
To download a preferred file format, use the option ‘-f’ (video format code). For example, I would like to download mp4 format, So I use format code as ‘18‘ as shown below.
# youtube-dl -f 18 https://www.youtube.com/watch?v=iRYvuS9OxdA
Sample Output
[youtube] iRYvuS9OxdA: Downloading webpage [youtube] iRYvuS9OxdA: Downloading video info webpage [youtube] iRYvuS9OxdA: Extracting video information [youtube] iRYvuS9OxdA: Downloading DASH manifest [download] Amy Macdonald - This Is The Life-iRYvuS9OxdA.mp4 has already been downloaded [download] 100% of 10.33MiB
To download a list of video files, create a file and place all the YouTube links that you wish to download.
# youtube-dl -a youtube_links.txt
Type the following command in a terminal to list all the avialable options.
# youtube-dl --help
For other distributions, youtube-dl can be downloaded from the youtube-dl download page.
Install YouTube-DL – A Command Line Video Download Tool for Linux相关推荐
- MacOs Big Sur Your Command Line Tools (CLT) does not support macOS 11.
MacOs 升级到11大版本,首先使用homebrew出了问题. 首先碰到是brew用不了的问题,rb脚本里报了个版本不支持的错误,解决方案 brew update-reset 然后安装一个 ...
- suse12中pip install xxx报错gcc: error: unrecognized command line option ‘-fstack-clash-protection’
我们在Linux中安装某些python的第三方包时,有时候需要gcc来进行协助编译安装(例如psutil.pycrypto等) 1.很不幸,最近在suse12中用pip install psutil时 ...
- xcode 安装 svn command line
记得以前的Xcode安装svn command line 是通过download那里.今天在新电脑上用svn发现没有安装 command line,于是百度了一下 才发现,用这样一个命令就搞定了 xc ...
- DevCon.exe (DevCon Command Line Utility)
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> 非常有趣的一个 ...
- NVIDIA/Apex安装时遇到 C++编译:unrecognized command line option ‘-std=c++14’ 错误解决
0.问题 编译安装apex的时候,报错C++编译:unrecognized command line option '-std=c++14',后面紧跟着ninja也没有编译成功.发现是编译器版本太老( ...
- [iOS越狱开发]安装command line tools for Xcodew
网上搜了篇文章,介绍iOS的越狱开发,其中提到了要给Xcode安装command line tools,以前从没听过这个工具,然后就google了下. 关于Xcode Command Line Too ...
- Xcode Command Line Tools命令
xcode-select使用说明 Usage: xcode-select [options]Print or change the path to the active developer direc ...
- Mac 之 Command Line Tools
喜欢通过终端访问更传统的Unix工具包的Mac用户(大部分是程序员),都会选择安装Xcode IDE的可选命令行工具子部分,也就是Command Line Tools. 从MacOS High Sie ...
- MAC 安装XCode和Command Line Tools
1.XCode下载 XCode下载地址:https://developer.apple.com/download/more/ 点击跳转链接.下载列表页如下所示: 文件比较大,需要耐心下载 2.Comm ...
- Calling JNI Functions with Java Object Arguments from the Command Line
When analyzing malware or penetration testing an app which uses a native library, it's helpful to is ...
最新文章
- MySQL_项目7: 各部门工资最高的员工(难度:中等)
- SpringBatch读文件(FlatFileItemReader)写据库(MyBatisBatchItemWriter)(四)
- Securing Spring Cloud Microservices With OAuth2
- phpstorm config include paths for swoole
- lastindexof方法_Java Vector lastIndexOf()方法与示例
- go map数据结构
- 控件绑定有序对象集合winform
- 官方中文版开源!快速入门PyTorch
- matplotlib 添加偏移量
- python圆柱体_python绘制圆柱体的方法
- Jupyter运行GitHub里的MXNet源代码
- 麒麟810相当于骁龙多少?
- 学习SQL:SQL Server数据透视表
- 历史上的今天:阿帕网退役;Quintus 收购 Mustang;同步电流磁芯存储器获得专利...
- 【编译原理笔记14】中间代码生成:布尔表达式的回填,控制流语句的回填,switch语句的翻译,过程调用语句的翻译
- python怎么用split字符串全部分开_python实现字符串完美拆分split()的方法
- 2022年流行的Java框架有哪些?
- 级数 p级数 q级数 调和级数为什么叫做“调和”级数 等比数列求和公式和等差数列求和 斜率:
- i7台式电脑配置推荐_教您2019推荐组装台式电脑最新配置清单
- 一文详解谷歌最新物联网操作系统 Android Things,话说还记得大明湖畔的Fuchsia吗?