AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 674916
Accepted
K S Verma
K S Verma
Asked: 2015-09-17 09:26:44 +0800 CST2015-09-17 09:26:44 +0800 CST 2015-09-17 09:26:44 +0800 CST

如何在 linux 中下载 youtube 播放列表中的所有视频?[复制]

  • 772
这个问题在这里已经有了答案:
如何使用 youtube-dl 将播放列表下载为 mp3 格式? (7 个答案)
6 年前关闭。

我可以为此使用 youtube-dl 吗?我已经在 youtube-dl 的帮助下下载了 youtube 视频,但一个接一个。我的意思是说有什么命令可以下载特定播放列表中的所有视频吗?

video-streaming
  • 1 1 个回答
  • 16782 Views

1 个回答

  • Voted
  1. Best Answer
    pl_rock
    2015-09-17T09:43:02+08:002015-09-17T09:43:02+08:00

    更新的答案:

    使用以下命令下载播放列表:

    youtube-dl -i -o (location) http://www.youtube.com/playlist?list=XXXXXXXXXXX 
    

    在哪里

    -o, --output TEMPLATE   Output filename template, see the "OUTPUT TEMPLATE"
    -i, --ignore-errors              Continue on download errors, for example to
                                     skip unavailable videos in a playlist
    

    请参见输出模板

    例子:

    $ youtube-dl --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc
    youtube-dl test video ''_ä↭?.mp4    # All kinds of weird characters
    
    $ youtube-dl --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc --restrict-filenames
    youtube-dl_test_video_.mp4          # A simple file name
    
    # Download YouTube playlist videos in separate directory indexed by video order in a playlist
    $ youtube-dl -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re
    
    # Download all playlists of YouTube channel/user keeping each playlist in separate directory:
    $ youtube-dl -o '%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/user/TheLinuxFoundation/playlists
    
    # Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home
    $ youtube-dl -u user -p password -o '~/MyVideos/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/java-tutorial/
    
    # Download entire series season keeping each series and each season in separate directory under C:/MyVideos
    $ youtube-dl -o "C:/MyVideos/%(series)s/%(season_number)s - %(season)s/%(episode_number)s - %(episode)s.%(ext)s" http://videomore.ru/kino_v_detalayah/5_sezon/367617
    
    # Stream the video being downloaded to stdout
    $ youtube-dl -o - BaW_jenozKc
    

    默认情况下 youtube-dl 尝试下载最好的质量,但有时你可能想下载其他格式,所以使用命令:

    youtube-dl -i -o (location) -f mp4 http://www.youtube.com/playlist?list=XXXXXXXXXXX
    

    笔记:

    您会在现在不需要的选项-citk或旧答案中找到。-citw请参阅youtube-dl 常见问题解答。

    参考:

    • youtube-dl
    • phihag 的回答
    • 12

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve