From 7275535116d6b10c1e6df54c50ee872635f3c37e Mon Sep 17 00:00:00 2001 From: pukkandan Date: Mon, 15 Mar 2021 04:32:13 +0530 Subject: Split video by chapters (#158) * New options `--split-chapters` and `--no-split-chapters` * The output/path of the split files can be given using the key `chapter` * Additional keys `section_title`, `section_number`, `section_start`, `section_end` are available in the output template * Alias `--split-tracks` for parity with animelover/youtube-dl * `--sponskrub-cut` and `--split-chapter` cannot work together Closes: https://github.com/blackjack4494/yt-dlc/issues/277 https://github.com/ytdl-org/youtube-dl/issues/28438 https://github.com/ytdl-org/youtube-dl/issues/12907 https://github.com/ytdl-org/youtube-dl/issues/6480 https://github.com/ytdl-org/youtube-dl/pull/25005 Rewritten from the implementation by: femaref and Wattux https://github.com/Wattux/youtube-dl/tree/split-at-timestamps https://github.com/ytdl-org/youtube-dl/pull/25005 https://github.com/femaref/youtube-dl/tree/split-track --- yt_dlp/utils.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'yt_dlp/utils.py') diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 77f8c0f4d..a913b9814 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -4182,8 +4182,10 @@ def qualities(quality_ids): DEFAULT_OUTTMPL = { 'default': '%(title)s [%(id)s].%(ext)s', + 'chapter': '%(title)s - %(section_number)03d %(section_title)s [%(id)s].%(ext)s', } OUTTMPL_TYPES = { + 'chapter': None, 'subtitle': None, 'thumbnail': None, 'description': 'description', -- cgit v1.2.3