diff options
author | shirt <2660574+shirt-dev@users.noreply.github.com> | 2021-03-12 23:46:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-13 10:16:58 +0530 |
commit | 4cf1e5d2f9a145de9749e90a1d244350c82ef610 (patch) | |
tree | 93d59b346da0b2882057a8c4ea1ec8dc0b34b158 /yt_dlp/options.py | |
parent | 0a473f2f0fd2629f009edb8bf127c4eed1738bf6 (diff) | |
download | hypervideo-pre-4cf1e5d2f9a145de9749e90a1d244350c82ef610.tar.lz hypervideo-pre-4cf1e5d2f9a145de9749e90a1d244350c82ef610.tar.xz hypervideo-pre-4cf1e5d2f9a145de9749e90a1d244350c82ef610.zip |
Native concurrent downloading of fragments (#166)
* Option `--concurrent-fragments` (`-N`) to set the number of threads
Related: #165
Known issues:
* When receiving Ctrl+C, the process will exit only after finishing the currently downloading fragments
* The download progress shows the speed of only one thread
Authored by shirt-dev
Diffstat (limited to 'yt_dlp/options.py')
-rw-r--r-- | yt_dlp/options.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/yt_dlp/options.py b/yt_dlp/options.py index adef0e0a8..1e995b490 100644 --- a/yt_dlp/options.py +++ b/yt_dlp/options.py @@ -559,6 +559,10 @@ def parseOpts(overrideArguments=None): downloader = optparse.OptionGroup(parser, 'Download Options') downloader.add_option( + '-N', '--concurrent-fragments', + dest='concurrent_fragment_downloads', metavar='N', default=1, type=int, + help='Number of fragments to download concurrently (default is %default)') + downloader.add_option( '-r', '--limit-rate', '--rate-limit', dest='ratelimit', metavar='RATE', help='Maximum download rate in bytes per second (e.g. 50K or 4.2M)') |