diff options
author | Sebastian Wallkötter <sebastian@wallkoetter.net> | 2022-07-12 15:51:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-12 19:21:41 +0530 |
commit | 0f44636597636cfa9065ee2fa4b7308b203c6a8e (patch) | |
tree | ea88db161570d68cbc73d20d27d88de0119210c6 | |
parent | 7a7eeb10053f2765803bb088ab968072dd09254c (diff) | |
download | hypervideo-pre-0f44636597636cfa9065ee2fa4b7308b203c6a8e.tar.lz hypervideo-pre-0f44636597636cfa9065ee2fa4b7308b203c6a8e.tar.xz hypervideo-pre-0f44636597636cfa9065ee2fa4b7308b203c6a8e.zip |
[docs] Improve docstring of `download_ranges` (#4340)
Authored by: FirefoxMetzger
-rw-r--r-- | yt_dlp/YoutubeDL.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index e812f4775..a52e8b668 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -430,13 +430,15 @@ class YoutubeDL: retry_sleep_functions: Dictionary of functions that takes the number of attempts as argument and returns the time to sleep in seconds. Allowed keys are 'http', 'fragment', 'file_access' - download_ranges: A function that gets called for every video with the signature - (info_dict, *, ydl) -> Iterable[Section]. - Only the returned sections will be downloaded. Each Section contains: + download_ranges: A callback function that gets called for every video with + the signature (info_dict, ydl) -> Iterable[Section]. + Only the returned sections will be downloaded. + Each Section is a dict with the following keys: * start_time: Start time of the section in seconds * end_time: End time of the section in seconds * title: Section title (Optional) * index: Section number (Optional) + force_keyframes_at_cuts: Re-encode the video when downloading ranges to get precise cuts The following parameters are not used by YoutubeDL itself, they are used by the downloader (see yt_dlp/downloader/common.py): |