parent
4476d2c764
commit
59a7a13ef9
4 changed files with 26 additions and 22 deletions
|
@ -105,7 +105,7 @@ Only post features that you (or an incapacitated friend you can personally talk
|
||||||
|
|
||||||
### Is your question about yt-dlp?
|
### Is your question about yt-dlp?
|
||||||
|
|
||||||
Some bug reports are completely unrelated to yt-dlp and relate to a different, or even the reporter's own, application. Please make sure that you are actually using yt-dlp. If you are using a UI for yt-dlp, report the bug to the maintainer of the actual application providing the UI. On the other hand, if your UI for yt-dlp fails in some way you believe is related to yt-dlp, by all means, go ahead and report the bug.
|
Some bug reports are completely unrelated to yt-dlp and relate to a different, or even the reporter's own, application. Please make sure that you are actually using yt-dlp. If you are using a UI for yt-dlp, report the bug to the maintainer of the actual application providing the UI. In general, if you are unable to provide the verbose log, you should not be opening the issue here.
|
||||||
|
|
||||||
If the issue is with `youtube-dl` (the upstream fork of yt-dlp) and not with yt-dlp, the issue should be raised in the youtube-dl project.
|
If the issue is with `youtube-dl` (the upstream fork of yt-dlp) and not with yt-dlp, the issue should be raised in the youtube-dl project.
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ By sharing an account with anyone, you agree to bear all risks associated with i
|
||||||
|
|
||||||
While these steps won't necessarily ensure that no misuse of the account takes place, these are still some good practices to follow.
|
While these steps won't necessarily ensure that no misuse of the account takes place, these are still some good practices to follow.
|
||||||
|
|
||||||
- Look for people with `Member` or `Contributor` tag on their messages.
|
- Look for people with `Member` (maintainers of the project) or `Contributor` (people who have previously contributed code) tag on their messages.
|
||||||
- Change the password before sharing the account to something random (use [this](https://passwordsgenerator.net/) if you don't have a random password generator).
|
- Change the password before sharing the account to something random (use [this](https://passwordsgenerator.net/) if you don't have a random password generator).
|
||||||
- Change the password after receiving the account back.
|
- Change the password after receiving the account back.
|
||||||
|
|
||||||
|
|
38
README.md
38
README.md
|
@ -184,14 +184,14 @@ You can install the [PyPI package](https://pypi.org/project/yt-dlp) with:
|
||||||
python3 -m pip install -U yt-dlp
|
python3 -m pip install -U yt-dlp
|
||||||
```
|
```
|
||||||
|
|
||||||
On some systems (like Termux), it is not possible to install pycryptodomex. In that case, install without dependancies:
|
You can also install without any dependencies using:
|
||||||
```
|
```
|
||||||
python3 -m pip install --no-deps -U yt-dlp
|
python3 -m pip install --no-deps -U yt-dlp
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also install the master branch with:
|
You can also install the master branch with:
|
||||||
```
|
```
|
||||||
python3 -m pip3 install -U https://github.com/yt-dlp/yt-dlp/archive/master.zip
|
python3 -m pip3 install --force-reinstall https://github.com/yt-dlp/yt-dlp/archive/master.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that on some systems, you may need to use `py` or `python` instead of `python3`
|
Note that on some systems, you may need to use `py` or `python` instead of `python3`
|
||||||
|
@ -283,6 +283,8 @@ Then simply run `make`. You can also run `make yt-dlp` instead to compile only t
|
||||||
|
|
||||||
**Note**: In either platform, `devscripts/update-version.py` can be used to automatically update the version number
|
**Note**: In either platform, `devscripts/update-version.py` can be used to automatically update the version number
|
||||||
|
|
||||||
|
You can also fork the project on github and push it to a release branch in your fork for the [build workflow](https://github.com/yt-dlp/yt-dlp/blob/master/.github/workflows/build.yml) to automatically make a release for you
|
||||||
|
|
||||||
# USAGE AND OPTIONS
|
# USAGE AND OPTIONS
|
||||||
|
|
||||||
yt-dlp [OPTIONS] [--] URL [URL...]
|
yt-dlp [OPTIONS] [--] URL [URL...]
|
||||||
|
@ -1245,19 +1247,19 @@ You can also use a file extension (currently `3gp`, `aac`, `flv`, `m4a`, `mp3`,
|
||||||
|
|
||||||
You can also use special names to select particular edge case formats:
|
You can also use special names to select particular edge case formats:
|
||||||
|
|
||||||
- `all`: Select all formats
|
- `all`: Select **all formats** separately
|
||||||
- `mergeall`: Select and merge all formats (Must be used with `--audio-multistreams`, `--video-multistreams` or both)
|
- `mergeall`: Select and **merge all formats** (Must be used with `--audio-multistreams`, `--video-multistreams` or both)
|
||||||
- `b*`, `best*`: Select the best quality format irrespective of whether it contains video or audio
|
- `b*`, `best*`: Select the best quality format that **contains either** a video or an audio
|
||||||
- `w*`, `worst*`: Select the worst quality format irrespective of whether it contains video or audio
|
- `b`, `best`: Select the best quality format that **contains both** video and audio. Equivalent to `best*[vcodec!=none][acodec!=none]`
|
||||||
- `b`, `best`: Select the best quality format that contains both video and audio. Equivalent to `best*[vcodec!=none][acodec!=none]`
|
- `bv`, `bestvideo`: Select the best quality **video-only** format. Equivalent to `best*[acodec=none]`
|
||||||
|
- `bv*`, `bestvideo*`: Select the best quality format that **contains video**. It may also contain audio. Equivalent to `best*[vcodec!=none]`
|
||||||
|
- `ba`, `bestaudio`: Select the best quality **audio-only** format. Equivalent to `best*[vcodec=none]`
|
||||||
|
- `ba*`, `bestaudio*`: Select the best quality format that **contains audio**. It may also contain video. Equivalent to `best*[acodec!=none]`
|
||||||
|
- `w*`, `worst*`: Select the worst quality format that contains either a video or an audio
|
||||||
- `w`, `worst`: Select the worst quality format that contains both video and audio. Equivalent to `worst*[vcodec!=none][acodec!=none]`
|
- `w`, `worst`: Select the worst quality format that contains both video and audio. Equivalent to `worst*[vcodec!=none][acodec!=none]`
|
||||||
- `bv`, `bestvideo`: Select the best quality video-only format. Equivalent to `best*[acodec=none]`
|
|
||||||
- `wv`, `worstvideo`: Select the worst quality video-only format. Equivalent to `worst*[acodec=none]`
|
- `wv`, `worstvideo`: Select the worst quality video-only format. Equivalent to `worst*[acodec=none]`
|
||||||
- `bv*`, `bestvideo*`: Select the best quality format that contains video. It may also contain audio. Equivalent to `best*[vcodec!=none]`
|
|
||||||
- `wv*`, `worstvideo*`: Select the worst quality format that contains video. It may also contain audio. Equivalent to `worst*[vcodec!=none]`
|
- `wv*`, `worstvideo*`: Select the worst quality format that contains video. It may also contain audio. Equivalent to `worst*[vcodec!=none]`
|
||||||
- `ba`, `bestaudio`: Select the best quality audio-only format. Equivalent to `best*[vcodec=none]`
|
|
||||||
- `wa`, `worstaudio`: Select the worst quality audio-only format. Equivalent to `worst*[vcodec=none]`
|
- `wa`, `worstaudio`: Select the worst quality audio-only format. Equivalent to `worst*[vcodec=none]`
|
||||||
- `ba*`, `bestaudio*`: Select the best quality format that contains audio. It may also contain video. Equivalent to `best*[acodec!=none]`
|
|
||||||
- `wa*`, `worstaudio*`: Select the worst quality format that contains audio. It may also contain video. Equivalent to `worst*[acodec!=none]`
|
- `wa*`, `worstaudio*`: Select the worst quality format that contains audio. It may also contain video. Equivalent to `worst*[acodec!=none]`
|
||||||
|
|
||||||
For example, to download the worst quality video-only format you can use `-f worstvideo`. It is however recommended not to use `worst` and related options. When your format selector is `worst`, the format which is worst in all respects is selected. Most of the time, what you actually want is the video with the smallest filesize instead. So it is generally better to use `-f best -S +size,+br,+res,+fps` instead of `-f worst`. See [sorting formats](#sorting-formats) for more details.
|
For example, to download the worst quality video-only format you can use `-f worstvideo`. It is however recommended not to use `worst` and related options. When your format selector is `worst`, the format which is worst in all respects is selected. Most of the time, what you actually want is the video with the smallest filesize instead. So it is generally better to use `-f best -S +size,+br,+res,+fps` instead of `-f worst`. See [sorting formats](#sorting-formats) for more details.
|
||||||
|
@ -1539,7 +1541,7 @@ $ yt-dlp --replace-in-metadata 'title,uploader' '[ _]' '-'
|
||||||
|
|
||||||
# EXTRACTOR ARGUMENTS
|
# EXTRACTOR ARGUMENTS
|
||||||
|
|
||||||
Some extractors accept additional arguments which can be passed using `--extractor-args KEY:ARGS`. `ARGS` is a `;` (semicolon) separated string of `ARG=VAL1,VAL2`. Eg: `--extractor-args "youtube:player_client=android_agegate,web;include_live_dash" --extractor-args "funimation:version=uncut"`
|
Some extractors accept additional arguments which can be passed using `--extractor-args KEY:ARGS`. `ARGS` is a `;` (semicolon) separated string of `ARG=VAL1,VAL2`. Eg: `--extractor-args "youtube:player-client=android_agegate,web;include_live_dash" --extractor-args "funimation:version=uncut"`
|
||||||
|
|
||||||
The following extractors use this feature:
|
The following extractors use this feature:
|
||||||
|
|
||||||
|
@ -1592,10 +1594,10 @@ Your program should avoid parsing the normal stdout since they may change in fut
|
||||||
From a Python program, you can embed yt-dlp in a more powerful fashion, like this:
|
From a Python program, you can embed yt-dlp in a more powerful fashion, like this:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import yt_dlp
|
from yt_dlp import YoutubeDL
|
||||||
|
|
||||||
ydl_opts = {}
|
ydl_opts = {}
|
||||||
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
with YoutubeDL(ydl_opts) as ydl:
|
||||||
ydl.download(['https://www.youtube.com/watch?v=BaW_jenozKc'])
|
ydl.download(['https://www.youtube.com/watch?v=BaW_jenozKc'])
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1605,9 +1607,7 @@ Here's a more complete example of a program that outputs only errors (and a shor
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import json
|
import json
|
||||||
|
|
||||||
import yt_dlp
|
import yt_dlp
|
||||||
from yt_dlp.postprocessor.common import PostProcessor
|
|
||||||
|
|
||||||
|
|
||||||
class MyLogger:
|
class MyLogger:
|
||||||
|
@ -1629,7 +1629,7 @@ class MyLogger:
|
||||||
print(msg)
|
print(msg)
|
||||||
|
|
||||||
|
|
||||||
class MyCustomPP(PostProcessor):
|
class MyCustomPP(yt_dlp.postprocessor.PostProcessor):
|
||||||
def run(self, info):
|
def run(self, info):
|
||||||
self.to_screen('Doing stuff')
|
self.to_screen('Doing stuff')
|
||||||
return [], info
|
return [], info
|
||||||
|
@ -1651,6 +1651,10 @@ ydl_opts = {
|
||||||
'progress_hooks': [my_hook],
|
'progress_hooks': [my_hook],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Add custom headers
|
||||||
|
yt_dlp.utils.std_headers.update({'Referer': 'https://www.google.com'})
|
||||||
|
|
||||||
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
||||||
ydl.add_post_processor(MyCustomPP())
|
ydl.add_post_processor(MyCustomPP())
|
||||||
info = ydl.extract_info('https://www.youtube.com/watch?v=BaW_jenozKc')
|
info = ydl.extract_info('https://www.youtube.com/watch?v=BaW_jenozKc')
|
||||||
|
|
|
@ -374,8 +374,7 @@ class YoutubeDL(object):
|
||||||
(with status "started" and "finished") if the processing is successful.
|
(with status "started" and "finished") if the processing is successful.
|
||||||
merge_output_format: Extension to use when merging formats.
|
merge_output_format: Extension to use when merging formats.
|
||||||
final_ext: Expected final extension; used to detect when the file was
|
final_ext: Expected final extension; used to detect when the file was
|
||||||
already downloaded and converted. "merge_output_format" is
|
already downloaded and converted
|
||||||
replaced by this extension when given
|
|
||||||
fixup: Automatically correct known faults of the file.
|
fixup: Automatically correct known faults of the file.
|
||||||
One of:
|
One of:
|
||||||
- "never": do nothing
|
- "never": do nothing
|
||||||
|
@ -441,7 +440,7 @@ class YoutubeDL(object):
|
||||||
nopart, updatetime, buffersize, ratelimit, throttledratelimit, min_filesize,
|
nopart, updatetime, buffersize, ratelimit, throttledratelimit, min_filesize,
|
||||||
max_filesize, test, noresizebuffer, retries, fragment_retries, continuedl,
|
max_filesize, test, noresizebuffer, retries, fragment_retries, continuedl,
|
||||||
noprogress, xattr_set_filesize, hls_use_mpegts, http_chunk_size,
|
noprogress, xattr_set_filesize, hls_use_mpegts, http_chunk_size,
|
||||||
external_downloader_args.
|
external_downloader_args, concurrent_fragment_downloads.
|
||||||
|
|
||||||
The following options are used by the post processors:
|
The following options are used by the post processors:
|
||||||
prefer_ffmpeg: If False, use avconv instead of ffmpeg if both are available,
|
prefer_ffmpeg: If False, use avconv instead of ffmpeg if both are available,
|
||||||
|
|
|
@ -48,6 +48,7 @@ class FragmentFD(FileDownloader):
|
||||||
Skip unavailable fragments (DASH and hlsnative only)
|
Skip unavailable fragments (DASH and hlsnative only)
|
||||||
keep_fragments: Keep downloaded fragments on disk after downloading is
|
keep_fragments: Keep downloaded fragments on disk after downloading is
|
||||||
finished
|
finished
|
||||||
|
concurrent_fragment_downloads: The number of threads to use for native hls and dash downloads
|
||||||
_no_ytdl_file: Don't use .ytdl file
|
_no_ytdl_file: Don't use .ytdl file
|
||||||
|
|
||||||
For each incomplete fragment download yt-dlp keeps on disk a special
|
For each incomplete fragment download yt-dlp keeps on disk a special
|
||||||
|
|
Loading…
Reference in a new issue