aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-03-15 04:32:13 +0530
committerGitHub <noreply@github.com>2021-03-15 04:32:13 +0530
commit7275535116d6b10c1e6df54c50ee872635f3c37e (patch)
tree95812b591ce8e471b4749d076cd155a48f5205de /yt_dlp/utils.py
parenta1c5d2ca6419f199a856bc111ac63b76947768b3 (diff)
downloadhypervideo-pre-7275535116d6b10c1e6df54c50ee872635f3c37e.tar.lz
hypervideo-pre-7275535116d6b10c1e6df54c50ee872635f3c37e.tar.xz
hypervideo-pre-7275535116d6b10c1e6df54c50ee872635f3c37e.zip
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
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r--yt_dlp/utils.py2
1 files changed, 2 insertions, 0 deletions
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',