ytdl-patched

ytdl-patched

基于yt-dlp的多平台视频下载命令行工具

ytdl-patched是基于yt-dlp开发的命令行视频下载工具。它支持从YouTube等多个视频平台下载内容,并增加了长文件名转义、通用提取器增强和NicoNico弹幕下载等功能。该工具还新增了多个网站的提取器,扩展了下载范围。ytdl-patched保持与yt-dlp同步更新,同时提供更多定制选项,增强了视频下载的灵活性。

ytdl-patched视频下载YouTube命令行工具yt-dlpGithub开源项目
<!-- MANPAGE: BEGIN EXCLUDED SECTION --> <div align="center">

YTDL-PATCHED

A command-line program to download videos from YouTube and many other video platforms

</div> <!-- MANPAGE: END EXCLUDED SECTION -->

MIRRORS

<!-- MARKER BEGIN -->
ServiceTypeStatusNote
GitHub ActionsTestsRun tests
GitHub ActionsBuild and releaseBuild Patched YTDL
GitHub ActionsMerging commits from upstreamMerge upstreamThere's conflict if it fails
<!-- MARKER END -->

ytdl-patched is a youtube-dl fork based on yt-dlp.

<!-- MANPAGE: MOVE "USAGE AND OPTIONS" SECTION HERE --> <!-- MANPAGE: BEGIN EXCLUDED SECTION --> <!-- MANPAGE: END EXCLUDED SECTION -->

Disclaimer: ytdl-patched does exist for my use, so there's no absolute warranty for anything. Use yt-dlp if you don't like it.

NEW FEATURES

NEW FEATURES IN YTDL-PATCHED

The major new features from the latest release of yt-dlp are:

  • Long name escaping for Unix systems: If the filename of downloaded videos can get longer than 255 bytes (in system locale), it'll prevent from exceeding its length by splitting in 255 bytes each. Note that treating splitted names requires special scripts just for that.

  • Generic Extractor will not return at first website match: Generic Extractor collects matched websites and return it as playlist. It creates nested playlist and may cause infinite loop.

  • Generic Extractor Extended

    • Following URLs are resolved and redirect automatically to its destination.
      • Japanese BBS redirect: pinktower.com, jump.5ch.net, jump.megabbs.info
      • Pixiv redirect
        • Looking for test cases for char-mutated URLs
      • Firebase Dynamic Link: domains ending with .page.link
    • Self-hosted service support (Mastodon, PeerTube and Misskey)
      • For supported self-hosted services, ytdl-patched contains a huge list of instances. But you can opt-in for instance checking, in case of undiscovered instance. To opt-in, use these flags: --check-mastodon-instance, --check-peertube-instance, --check-misskey-instance
  • NicoNico comments as subtitles: Now you can download NicoNico comments as a subtitle.

    • No dependency required. Just use ytdl-patched.
    • Minimum flags: --sub-format ass --write-subs
    • To embed comments without problems: --sub-format ass --write-subs --embed-subs --remux-video mkv
  • New extractors: Following extractors have been added: (broken/imcomplete ones not listed here)

    • askmona and askmona3 (just scrapes embedded YouTube videos)
    • disneychris
    • dnatube
    • fc2:user (FC2 user-uploaded videos)
    • iwara:user (Iwara user-uploaded videos)
    • javhub
    • peing, ask.fm, marshmallow-qa, mottohomete (scrapes Q&A section and find video URLs in it)
    • mastodon, mastodon:user, mastodon:user:numeric_id
    • misskey, misskey:user
    • niconico:playlist, niconico:series, niconico:user
    • sharevideos
    • tokyomotion, tokyomotion:searches, tokyomotion:user, tokyomotion:user:favs
    • niconico:live (COMMENTS ARE NOT SUPPORTED)
    • 17live, 17live:clip (merged in yt-dlp)
    • AbemaTV and AbemaTVTitle (merged in yt-dlp)
    • NhkForSchoolBangumiIE, NhkForSchoolSubjectIE, NhkForSchoolProgramListIE (NHK for School) (merged in yt-dlp)
    • Radiko, RadikoRadio (does not have 24-hours limitation!) (merged in yt-dlp)
    • damtomo:video, damtomo:record (merged in yt-dlp)
    • fc2:live (merged in yt-dlp)
    • mirrativ, mirrativ:user (merged in yt-dlp)
    • mixch, mixch:archive (merged in yt-dlp)
    • openrec, openrec:capture (merged in yt-dlp)
    • pixiv:sketch, pixiv:sketch:user (merged in yt-dlp)
    • skeb (merged in yt-dlp)
    • voicy, voicy:channel (merged in yt-dlp)
    • whowatch (merged in yt-dlp)
  • New extractor arguments: Some extractor arguments are added. Check EXTRACTOR ARGUMENTS section for details.

  • Merging: MKV file is preferred for merging, but can be overriden using --merge-output-format. ytdl-patched may determine merge format from downloaded formats by using --merge-output-format auto.

  • Format debugger: You can debug -f FORMAT specs, by just adding -Fv. This doesn't work if specs passed to -f is malformed. You'll get DEBUG column with tokens in arguments, and list of unmatched tokens.

GOALS

  • keep merging with yt-dlp/yt-dlp
  • implement miscellaneous extractors as possible
  • make -U work (yes, really works)
  • do anything best

NOT TO DO

  • don't change very much from yt-dlp

NEW FEATURES IN YT-DLP

  • Merged with youtube-dl v2021.12.17+ commit/2dd6c6e (exceptions) and youtube-dlc v2020.11.11-3+ commit/f9401f2: You get all the features and patches of youtube-dlc in addition to the latest youtube-dl

  • SponsorBlock Integration: You can mark/remove sponsor sections in YouTube videos by utilizing the SponsorBlock API

  • Format Sorting: The default format sorting options have been changed so that higher resolution and better codecs will be now preferred instead of simply using larger bitrate. Furthermore, you can now specify the sort order using -S. This allows for much easier format selection than what is possible by simply using --format (examples)

  • Merged with animelover1984/youtube-dl: You get most of the features and improvements from animelover1984/youtube-dl including --write-comments, BiliBiliSearch, BilibiliChannel, Embedding thumbnail in mp4/ogg/opus, playlist infojson etc. Note that NicoNico livestreams are not available. See #31 for details.

  • YouTube improvements:

    • Supports Clips, Stories (ytstories:<channel UCID>), Search (including filters)*, YouTube Music Search, Channel-specific search, Search prefixes (ytsearch:, ytsearchdate:)*, Mixes, and Feeds (:ytfav, :ytwatchlater, :ytsubs, :ythistory, :ytrec, :ytnotif)
    • Fix for n-sig based throttling *
    • Supports some (but not all) age-gated content without cookies
    • Download livestreams from the start using --live-from-start (experimental)
    • 255kbps audio is extracted (if available) from YouTube Music when premium cookies are given
    • Channel URLs download all uploads of the channel, including shorts and live
  • Cookies from browser: Cookies can be automatically extracted from all major web browsers using --cookies-from-browser BROWSER[+KEYRING][:PROFILE][::CONTAINER]

  • Download time range: Videos can be downloaded partially based on either timestamps or chapters using --download-sections

  • Split video by chapters: Videos can be split into multiple files based on chapters using --split-chapters

  • Multi-threaded fragment downloads: Download multiple fragments of m3u8/mpd videos in parallel. Use --concurrent-fragments (-N) option to set the number of threads used

  • Aria2c with HLS/DASH: You can use aria2c as the external downloader for DASH(mpd) and HLS(m3u8) formats

  • New and fixed extractors: Many new extractors have been added and a lot of existing ones have been fixed. See the changelog or the list of supported sites

  • New MSOs: Philo, Spectrum, SlingTV, Cablevision, RCN etc.

  • Subtitle extraction from manifests: Subtitles can be extracted from streaming media manifests. See commit/be6202f for details

  • Multiple paths and output templates: You can give different output templates and download paths for different types of files. You can also set a temporary path where intermediary files are downloaded to using --paths (-P)

  • Portable Configuration: Configuration files are automatically loaded from the home and root directories. See CONFIGURATION for details

  • Output template improvements: Output templates can now have date-time formatting, numeric offsets, object traversal etc. See output template for details. Even more advanced operations can also be done with the help of --parse-metadata and --replace-in-metadata

  • Other new options: Many new options have been added such as --alias, --print, --concat-playlist, --wait-for-video, --retry-sleep, --sleep-requests, --convert-thumbnails, --force-download-archive, --force-overwrites, --break-match-filter etc

  • Improvements: Regex and other operators in --format/--match-filter, multiple --postprocessor-args and --downloader-args, faster archive checking, more format selection options, merge multi-video/audio, multiple --config-locations, --exec at different stages, etc

  • Plugins: Extractors and PostProcessors can be loaded from an external file. See plugins for details

  • Self updater: The releases can be updated using yt-dlp -U, and downgraded using --update-to if required

  • Nightly builds: Automated nightly builds can be used with --update-to nightly

See changelog or commits for the full list of changes

Features marked with a * have been back-ported to youtube-dl

Differences in default behavior

Some of yt-dlp's default options are different from that of youtube-dl and youtube-dlc: (Some of them also be reverted in ytdl-patched)

编辑推荐精选

音述AI

音述AI

全球首个AI音乐社区

音述AI是全球首个AI音乐社区,致力让每个人都能用音乐表达自我。音述AI提供零门槛AI创作工具,独创GETI法则帮助用户精准定义音乐风格,AI润色功能支持自动优化作品质感。音述AI支持交流讨论、二次创作与价值变现。针对中文用户的语言习惯与文化背景进行专门优化,支持国风融合、C-pop等本土音乐标签,让技术更好地承载人文表达。

QoderWork

QoderWork

阿里Qoder团队推出的桌面端AI智能体

QoderWork 是阿里推出的本地优先桌面 AI 智能体,适配 macOS14+/Windows10+,以自然语言交互实现文件管理、数据分析、AI 视觉生成、浏览器自动化等办公任务,自主拆解执行复杂工作流,数据本地运行零上传,技能市场可无限扩展,是高效的 Agentic 生产力办公助手。

lynote.ai

lynote.ai

一站式搞定所有学习需求

不再被海量信息淹没,开始真正理解知识。Lynote 可摘要 YouTube 视频、PDF、文章等内容。即时创建笔记,检测 AI 内容并下载资料,将您的学习效率提升 10 倍。

AniShort

AniShort

为AI短剧协作而生

专为AI短剧协作而生的AniShort正式发布,深度重构AI短剧全流程生产模式,整合创意策划、制作执行、实时协作、在线审片、资产复用等全链路功能,独创无限画布、双轨并行工业化工作流与Ani智能体助手,集成多款主流AI大模型,破解素材零散、版本混乱、沟通低效等行业痛点,助力3人团队效率提升800%,打造标准化、可追溯的AI短剧量产体系,是AI短剧团队协同创作、提升制作效率的核心工具。

seedancetwo2.0

seedancetwo2.0

能听懂你表达的视频模型

Seedance two是基于seedance2.0的中国大模型,支持图像、视频、音频、文本四种模态输入,表达方式更丰富,生成也更可控。

nano-banana纳米香蕉中文站

nano-banana纳米香蕉中文站

国内直接访问,限时3折

输入简单文字,生成想要的图片,纳米香蕉中文站基于 Google 模型的 AI 图片生成网站,支持文字生图、图生图。官网价格限时3折活动

扣子-AI办公

扣子-AI办公

职场AI,就用扣子

AI办公助手,复杂任务高效处理。办公效率低?扣子空间AI助手支持播客生成、PPT制作、网页开发及报告写作,覆盖科研、商业、舆情等领域的专家Agent 7x24小时响应,生活工作无缝切换,提升50%效率!

堆友

堆友

多风格AI绘画神器

堆友平台由阿里巴巴设计团队创建,作为一款AI驱动的设计工具,专为设计师提供一站式增长服务。功能覆盖海量3D素材、AI绘画、实时渲染以及专业抠图,显著提升设计品质和效率。平台不仅提供工具,还是一个促进创意交流和个人发展的空间,界面友好,适合所有级别的设计师和创意工作者。

图像生成AI工具AI反应堆AI工具箱AI绘画GOAI艺术字堆友相机AI图像热门
码上飞

码上飞

零代码AI应用开发平台

零代码AI应用开发平台,用户只需一句话简单描述需求,AI能自动生成小程序、APP或H5网页应用,无需编写代码。

Vora

Vora

免费创建高清无水印Sora视频

Vora是一个免费创建高清无水印Sora视频的AI工具

下拉加载更多