From 45244889aee63c2652400f73728cbd5a9ba557a9 Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Fri, 10 Mar 2023 19:18:37 -0800 Subject: [PATCH] [FEATURE] `chunk_initial_download` preset (#532) --- docs/presets.rst | 21 +++++++++++++++++++ .../prebuilt_presets/helpers/common.yaml | 7 +++++++ 2 files changed, 28 insertions(+) diff --git a/docs/presets.rst b/docs/presets.rst index d0df18e8..28b46408 100644 --- a/docs/presets.rst +++ b/docs/presets.rst @@ -140,3 +140,24 @@ Add the following preset to download the best available video and audio quality, it into an MP4 container: * ``best_video_quality`` + +Chunk Initial Download +^^^^^^^^^^^^^^^^^^^^^^ + +If you are archiving a large channel, ``ytdl-sub`` will try pulling each video's metadata from +newest to oldest before starting any downloads. It is a long process and not ideal. A better method +is to chunk the process by using the following preset: + +* ``chunk_initial_download`` + +It will download videos starting from the oldest one, and only download 20 at a time. You can +change this number by setting: + +.. code-block:: yaml + + ytdl_options: + max_downloads: 30 # Desired number to download per invocation + +Once the entire channel is downloaded, remove this preset. Then it will pull metadata from newest to +oldest again, and stop pulling additional metadata once it reaches a video that has already been +downloaded. diff --git a/src/ytdl_sub/prebuilt_presets/helpers/common.yaml b/src/ytdl_sub/prebuilt_presets/helpers/common.yaml index c220b842..22e2d627 100644 --- a/src/ytdl_sub/prebuilt_presets/helpers/common.yaml +++ b/src/ytdl_sub/prebuilt_presets/helpers/common.yaml @@ -7,3 +7,10 @@ presets: format: "bestvideo+bestaudio/best" merge_output_format: "mp4" remux_video: "mp4" + + chunk_initial_download: + ytdl_options: + max_downloads: 20 + playlistreverse: True + break_on_existing: False + break_on_reject: True \ No newline at end of file