[docs] Fix some mistakes and improve doc

pull/646/head
pukkandan 3 years ago
parent b868936cd6
commit 3448870205
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

@ -317,7 +317,7 @@
* Add `html5=1` param to `get_video_info` page requests by [coletdjnz](https://github.com/coletdjnz) * Add `html5=1` param to `get_video_info` page requests by [coletdjnz](https://github.com/coletdjnz)
* Better message when login required * Better message when login required
* **Add option `--print`**: to print any field/template * **Add option `--print`**: to print any field/template
* Deprecates: `--get-description`, `--get-duration`, `--get-filename`, `--get-format`, `--get-id`, `--get-thumbnail`, `--get-title`, `--get-url` * Makes redundant: `--get-description`, `--get-duration`, `--get-filename`, `--get-format`, `--get-id`, `--get-thumbnail`, `--get-title`, `--get-url`
* Field `additional_urls` to download additional videos from metadata using [`--parse-metadata`](https://github.com/yt-dlp/yt-dlp#modifying-metadata) * Field `additional_urls` to download additional videos from metadata using [`--parse-metadata`](https://github.com/yt-dlp/yt-dlp#modifying-metadata)
* Merge youtube-dl: Upto [commit/dfbbe29](https://github.com/ytdl-org/youtube-dl/commit/dfbbe2902fc67f0f93ee47a8077c148055c67a9b) * Merge youtube-dl: Upto [commit/dfbbe29](https://github.com/ytdl-org/youtube-dl/commit/dfbbe2902fc67f0f93ee47a8077c148055c67a9b)
* Write thumbnail of playlist and add `pl_thumbnail` outtmpl key * Write thumbnail of playlist and add `pl_thumbnail` outtmpl key

@ -240,10 +240,10 @@ Then simply run `make`. You can also run `make yt-dlp` instead to compile only t
(default) (Alias: --no-abort-on-error) (default) (Alias: --no-abort-on-error)
--abort-on-error Abort downloading of further videos if an --abort-on-error Abort downloading of further videos if an
error occurs (Alias: --no-ignore-errors) error occurs (Alias: --no-ignore-errors)
--dump-user-agent Display the current browser identification --dump-user-agent Display the current user-agent and exit
--list-extractors List all supported extractors --list-extractors List all supported extractors and exit
--extractor-descriptions Output descriptions of all supported --extractor-descriptions Output descriptions of all supported
extractors extractors and exit
--force-generic-extractor Force extraction to use the generic --force-generic-extractor Force extraction to use the generic
extractor extractor
--default-search PREFIX Use this prefix for unqualified URLs. For --default-search PREFIX Use this prefix for unqualified URLs. For
@ -551,8 +551,8 @@ Then simply run `make`. You can also run `make yt-dlp` instead to compile only t
--no-write-thumbnail Do not write thumbnail image to disk --no-write-thumbnail Do not write thumbnail image to disk
(default) (default)
--write-all-thumbnails Write all thumbnail image formats to disk --write-all-thumbnails Write all thumbnail image formats to disk
--list-thumbnails Simulate and list all available thumbnail --list-thumbnails List available thumbnails of each video.
formats Simulate unless --no-simulate is used
## Internet Shortcut Options: ## Internet Shortcut Options:
--write-link Write an internet shortcut file, depending --write-link Write an internet shortcut file, depending
@ -564,30 +564,34 @@ Then simply run `make`. You can also run `make yt-dlp` instead to compile only t
--write-desktop-link Write a .desktop Linux internet shortcut --write-desktop-link Write a .desktop Linux internet shortcut
## Verbosity and Simulation Options: ## Verbosity and Simulation Options:
-q, --quiet Activate quiet mode -q, --quiet Activate quiet mode. If used with
--verbose, print the log to stderr
--no-warnings Ignore warnings --no-warnings Ignore warnings
-s, --simulate Do not download the video and do not write -s, --simulate Do not download the video and do not write
anything to disk anything to disk
--no-simulate Download the video even if printing/listing
options are used
--ignore-no-formats-error Ignore "No video formats" error. Usefull --ignore-no-formats-error Ignore "No video formats" error. Usefull
for extracting metadata even if the video for extracting metadata even if the videos
is not actually available for download are not actually available for download
(experimental) (experimental)
--no-ignore-no-formats-error Throw error when no downloadable video --no-ignore-no-formats-error Throw error when no downloadable video
formats are found (default) formats are found (default)
--skip-download Do not download the video but write all --skip-download Do not download the video but write all
related files (Alias: --no-download) related files (Alias: --no-download)
-O, --print TEMPLATE Simulate, quiet but print the given fields. -O, --print TEMPLATE Quiet, but print the given fields for each
Either a field name or similar formatting video. Simulate unless --no-simulate is
as the output template can be used used. Either a field name or same syntax as
-j, --dump-json Simulate, quiet but print JSON information. the output template can be used
See "OUTPUT TEMPLATE" for a description of -j, --dump-json Quiet, but print JSON information for each
available keys video. Simulate unless --no-simulate is
-J, --dump-single-json Simulate, quiet but print JSON information used. See "OUTPUT TEMPLATE" for a
for each command-line argument. If the URL description of available keys
refers to a playlist, dump the whole -J, --dump-single-json Quiet, but print JSON information for each
playlist information in a single line url or infojson passed. Simulate unless
--print-json Be quiet and print the video information as --no-simulate is used. If the URL refers to
JSON (video is still being downloaded) a playlist, the whole playlist information
is dumped in a single line
--force-write-archive Force download archive entries to be --force-write-archive Force download archive entries to be
written as far as no errors occur, even if written as far as no errors occur, even if
-s or another simulation option is used -s or another simulation option is used
@ -658,8 +662,8 @@ Then simply run `make`. You can also run `make yt-dlp` instead to compile only t
actually downloadable actually downloadable
--no-check-formats Do not check that the formats selected are --no-check-formats Do not check that the formats selected are
actually downloadable actually downloadable
-F, --list-formats List all available formats of requested -F, --list-formats List available formats of each video.
videos Simulate unless --no-simulate is used
--merge-output-format FORMAT If a merge is required (e.g. --merge-output-format FORMAT If a merge is required (e.g.
bestvideo+bestaudio), output to given bestvideo+bestaudio), output to given
container format. One of mkv, mp4, ogg, container format. One of mkv, mp4, ogg,
@ -677,7 +681,8 @@ Then simply run `make`. You can also run `make yt-dlp` instead to compile only t
(Alias: --write-automatic-subs) (Alias: --write-automatic-subs)
--no-write-auto-subs Do not write auto-generated subtitles --no-write-auto-subs Do not write auto-generated subtitles
(default) (Alias: --no-write-automatic-subs) (default) (Alias: --no-write-automatic-subs)
--list-subs List all available subtitles for the video --list-subs List available subtitles of each video.
Simulate unless --no-simulate is used
--sub-format FORMAT Subtitle format, accepts formats --sub-format FORMAT Subtitle format, accepts formats
preference, for example: "srt" or preference, for example: "srt" or
"ass/srt/best" "ass/srt/best"
@ -712,7 +717,7 @@ Then simply run `make`. You can also run `make yt-dlp` instead to compile only t
--audio-format FORMAT Specify audio format to convert the audio --audio-format FORMAT Specify audio format to convert the audio
to when -x is used. Currently supported to when -x is used. Currently supported
formats are: best (default) or one of formats are: best (default) or one of
aac|flac|mp3|m4a|opus|vorbis|wav best|aac|flac|mp3|m4a|opus|vorbis|wav
--audio-quality QUALITY Specify ffmpeg audio quality, insert a --audio-quality QUALITY Specify ffmpeg audio quality, insert a
value between 0 (better) and 9 (worse) for value between 0 (better) and 9 (worse) for
VBR or a specific bitrate like 128K VBR or a specific bitrate like 128K
@ -784,17 +789,22 @@ Then simply run `make`. You can also run `make yt-dlp` instead to compile only t
path to the binary or its containing path to the binary or its containing
directory directory
--exec CMD Execute a command on the file after --exec CMD Execute a command on the file after
downloading and post-processing. Similar downloading and post-processing. Same
syntax to the output template can be used syntax as the output template can be used
to pass any field as arguments to the to pass any field as arguments to the
command. An additional field "filepath" command. An additional field "filepath"
that contains the final path of the that contains the final path of the
downloaded file is also available. If no downloaded file is also available. If no
fields are passed, %(filepath)q is appended fields are passed, %(filepath)q is appended
to the end of the command to the end of the command. This option can
be used multiple times
--no-exec Remove any previously defined --exec
--exec-before-download CMD Execute a command before the actual --exec-before-download CMD Execute a command before the actual
download. The syntax is the same as --exec download. The syntax is the same as --exec
but "filepath" is not available but "filepath" is not available. This
option can be used multiple times
--no-exec-before-download Remove any previously defined
--exec-before-download
--convert-subs FORMAT Convert the subtitles to another format --convert-subs FORMAT Convert the subtitles to another format
(currently supported: srt|vtt|ass|lrc) (currently supported: srt|vtt|ass|lrc)
(Alias: --convert-subtitles) (Alias: --convert-subtitles)
@ -1374,7 +1384,7 @@ $ yt-dlp --parse-metadata 'description:(?s)(?P<meta_comment>.+)' --add-metadata
# EXTRACTOR ARGUMENTS # EXTRACTOR ARGUMENTS
Some extractors accept additional arguments which can be passed using `--extractor-args KEY:ARGS`. `ARGS` is a `;` (semicolon) seperated string of `ARG=VAL1,VAL2`. Eg: `--extractor-args "youtube:skip=dash,hls;player_client=android" --extractor-args "funimation:version=uncut"` Some extractors accept additional arguments which can be passed using `--extractor-args KEY:ARGS`. `ARGS` is a `;` (semicolon) seperated 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:
* **youtube** * **youtube**
@ -1383,8 +1393,8 @@ The following extractors use this feature:
* `player_skip`: `configs` - skip any requests for client configs and use defaults * `player_skip`: `configs` - skip any requests for client configs and use defaults
* `include_live_dash`: Include live dash formats (These formats don't download properly) * `include_live_dash`: Include live dash formats (These formats don't download properly)
* `comment_sort`: `top` or `new` (default) - choose comment sorting mode (on YouTube's side). * `comment_sort`: `top` or `new` (default) - choose comment sorting mode (on YouTube's side).
* `max_comments`: maximum amount of comments to download (default all). * `max_comments`: Maximum amount of comments to download (default all).
* `max_comment_depth`: maximum depth for nested comments. YouTube supports depths 1 or 2 (default). * `max_comment_depth`: Maximum depth for nested comments. YouTube supports depths 1 or 2 (default).
* **funimation** * **funimation**
* `language`: Languages to extract. Eg: `funimation:language=english,japanese` * `language`: Languages to extract. Eg: `funimation:language=english,japanese`
@ -1443,7 +1453,7 @@ While these options still work, their use is not recommended since there are oth
#### Developer options #### Developer options
These options are not intended to be used by the end-user These options are not intended to be used by the end-user
--test For testing extractors --test Download only part of video for testing extractors
--youtube-print-sig-code For testing youtube signatures --youtube-print-sig-code For testing youtube signatures

@ -220,7 +220,7 @@ class YoutubeDL(object):
'temp' and the keys of OUTTMPL_TYPES (in utils.py) 'temp' and the keys of OUTTMPL_TYPES (in utils.py)
outtmpl: Dictionary of templates for output names. Allowed keys outtmpl: Dictionary of templates for output names. Allowed keys
are 'default' and the keys of OUTTMPL_TYPES (in utils.py). are 'default' and the keys of OUTTMPL_TYPES (in utils.py).
A string a also accepted for backward compatibility For compatibility with youtube-dl, a single string can also be used
outtmpl_na_placeholder: Placeholder for unavailable meta fields. outtmpl_na_placeholder: Placeholder for unavailable meta fields.
restrictfilenames: Do not allow "&" and spaces in file names restrictfilenames: Do not allow "&" and spaces in file names
trim_file_name: Limit length of filename (extension excluded) trim_file_name: Limit length of filename (extension excluded)
@ -234,6 +234,8 @@ class YoutubeDL(object):
overwrites: Overwrite all video and metadata files if True, overwrites: Overwrite all video and metadata files if True,
overwrite only non-video files if None overwrite only non-video files if None
and don't overwrite any file if False and don't overwrite any file if False
For compatibility with youtube-dl,
"nooverwrites" may also be used instead
playliststart: Playlist item to start at. playliststart: Playlist item to start at.
playlistend: Playlist item to end at. playlistend: Playlist item to end at.
playlist_items: Specific indices of playlist to download. playlist_items: Specific indices of playlist to download.
@ -246,7 +248,7 @@ class YoutubeDL(object):
writedescription: Write the video description to a .description file writedescription: Write the video description to a .description file
writeinfojson: Write the video description to a .info.json file writeinfojson: Write the video description to a .info.json file
clean_infojson: Remove private fields from the infojson clean_infojson: Remove private fields from the infojson
writecomments: Extract video comments. This will not be written to disk getcomments: Extract video comments. This will not be written to disk
unless writeinfojson is also given unless writeinfojson is also given
writeannotations: Write the video annotations to a .annotations.xml file writeannotations: Write the video annotations to a .annotations.xml file
writethumbnail: Write the thumbnail image to a file writethumbnail: Write the thumbnail image to a file
@ -424,6 +426,8 @@ class YoutubeDL(object):
postprocessor/executable. The dict can also have "PP+EXE" keys postprocessor/executable. The dict can also have "PP+EXE" keys
which are used when the given exe is used by the given PP. which are used when the given exe is used by the given PP.
Use 'default' as the name for arguments to passed to all PP Use 'default' as the name for arguments to passed to all PP
For compatibility with youtube-dl, a single list of args
can also be used
The following options are used by the extractors: The following options are used by the extractors:
extractor_retries: Number of times to retry for known errors extractor_retries: Number of times to retry for known errors

@ -47,8 +47,11 @@ class FileDownloader(object):
min_filesize: Skip files smaller than this size min_filesize: Skip files smaller than this size
max_filesize: Skip files larger than this size max_filesize: Skip files larger than this size
xattr_set_filesize: Set ytdl.filesize user xattribute with expected size. xattr_set_filesize: Set ytdl.filesize user xattribute with expected size.
external_downloader_args: A list of additional command-line arguments for the external_downloader_args: A dictionary of downloader keys (in lower case)
external downloader. and a list of additional command-line arguments for the
executable. Use 'default' as the name for arguments to be
passed to all downloaders. For compatibility with youtube-dl,
a single list of args can also be used
hls_use_mpegts: Use the mpegts container for HLS videos. hls_use_mpegts: Use the mpegts container for HLS videos.
http_chunk_size: Size of a chunk for chunk-based HTTP downloading. May be http_chunk_size: Size of a chunk for chunk-based HTTP downloading. May be
useful for bypassing bandwidth throttling imposed by useful for bypassing bandwidth throttling imposed by

@ -190,7 +190,7 @@ def parseOpts(overrideArguments=None):
general.add_option( general.add_option(
'--dump-user-agent', '--dump-user-agent',
action='store_true', dest='dump_user_agent', default=False, action='store_true', dest='dump_user_agent', default=False,
help='Display the current browser identification and exit') help='Display the current user-agent and exit')
general.add_option( general.add_option(
'--list-extractors', '--list-extractors',
action='store_true', dest='list_extractors', default=False, action='store_true', dest='list_extractors', default=False,
@ -223,12 +223,6 @@ def parseOpts(overrideArguments=None):
'--flat-playlist', '--flat-playlist',
action='store_const', dest='extract_flat', const='in_playlist', default=False, action='store_const', dest='extract_flat', const='in_playlist', default=False,
help='Do not extract the videos of a playlist, only list them') help='Do not extract the videos of a playlist, only list them')
general.add_option(
'--flat-videos',
action='store_true', dest='extract_flat',
# help='Do not resolve the video urls')
# doesn't work
help=optparse.SUPPRESS_HELP)
general.add_option( general.add_option(
'--no-flat-playlist', '--no-flat-playlist',
action='store_false', dest='extract_flat', action='store_false', dest='extract_flat',
@ -781,7 +775,7 @@ def parseOpts(overrideArguments=None):
verbosity.add_option( verbosity.add_option(
'-q', '--quiet', '-q', '--quiet',
action='store_true', dest='quiet', default=False, action='store_true', dest='quiet', default=False,
help='Activate quiet mode') help='Activate quiet mode. If used with --verbose, print the log to stderr')
verbosity.add_option( verbosity.add_option(
'--no-warnings', '--no-warnings',
dest='no_warnings', action='store_true', default=False, dest='no_warnings', action='store_true', default=False,
@ -799,7 +793,7 @@ def parseOpts(overrideArguments=None):
action='store_true', dest='ignore_no_formats_error', default=False, action='store_true', dest='ignore_no_formats_error', default=False,
help=( help=(
'Ignore "No video formats" error. Usefull for extracting metadata ' 'Ignore "No video formats" error. Usefull for extracting metadata '
'even if the video is not actually available for download (experimental)')) 'even if the videos are not actually available for download (experimental)'))
verbosity.add_option( verbosity.add_option(
'--no-ignore-no-formats-error', '--no-ignore-no-formats-error',
action='store_false', dest='ignore_no_formats_error', action='store_false', dest='ignore_no_formats_error',
@ -1282,7 +1276,7 @@ def parseOpts(overrideArguments=None):
callback=_list_from_options_callback, callback_kwargs={'delim': None}, callback=_list_from_options_callback, callback_kwargs={'delim': None},
help=( help=(
'Execute a command on the file after downloading and post-processing. ' 'Execute a command on the file after downloading and post-processing. '
'Similar syntax to the output template can be used to pass any field as arguments to the command. ' 'Same syntax as the output template can be used to pass any field as arguments to the command. '
'An additional field "filepath" that contains the final path of the downloaded file is also available. ' 'An additional field "filepath" that contains the final path of the downloaded file is also available. '
'If no fields are passed, %(filepath)q is appended to the end of the command. ' 'If no fields are passed, %(filepath)q is appended to the end of the command. '
'This option can be used multiple times')) 'This option can be used multiple times'))

Loading…
Cancel
Save