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
. E.g. --extractor-args "youtube:player-client=tv,mweb;formats=incomplete" --extractor-args "twitter:api=syndication"
Note: In CLI, ARG
can use -
instead of _
; e.g. youtube:player-client"
becomes youtube:player_client"
YouTube Extractor Arguments
youtube
lang
: Prefer translated metadata (title
,description
etc) of this language code (case-sensitive). By default, the video primary language metadata is preferred, with a fallback toen
translated. See youtube/_base.py for the list of supported content language codesskip
: One or more ofhls
,dash
ortranslated_subs
to skip extraction of the m3u8 manifests, dash manifests and auto-translated subtitles respectivelyplayer_client
: Clients to extract video data from. The currently available clients areweb
,web_safari
,web_embedded
,web_music
,web_creator
,mweb
,ios
,android
,android_vr
,tv
,tv_simply
andtv_embedded
. By default,tv,ios,web
is used, ortv,web
is used when authenticating with cookies. Theweb_music
client is added formusic.youtube.com
URLs when logged-in cookies are used. Theweb_embedded
client is added for age-restricted videos but only works if the video is embeddable. Thetv_embedded
andweb_creator
clients are added for age-restricted videos if account age-verification is required. Some clients, such asweb
andweb_music
, require apo_token
for their formats to be downloadable. Some clients, such asweb_creator
, will only work with authentication. Not all clients support authentication via cookies. You can usedefault
for the default clients, or you can useall
for all clients (not recommended). You can prefix a client with-
to exclude it, e.g.youtube:player_client=default,-ios
player_skip
: Skip some network requests that are generally needed for robust extraction. One or more ofconfigs
(skip client configs),webpage
(skip initial webpage),js
(skip js player),initial_data
(skip initial data/next ep request). While these options can help reduce the number of requests needed or avoid some rate-limiting, they could cause issues such as missing formats or metadata. See #860 and #12826 for more detailswebpage_skip
: Skip extraction of embedded webpage data. One or both ofplayer_response
,initial_data
. These options are for testing purposes and don't skip any network requestsplayer_params
: YouTube player parameters to use for player requests. Will overwrite any default ones set by yt-dlp.player_js_variant
: The player javascript variant to use for signature and nsig deciphering. The known variants are:main
,tce
,tv
,tv_es6
,phone
,tablet
. Onlymain
is recommended as a possible workaround; the others are for debugging purposes. The default is to use what is prescribed by the site, and can be selected withactual
comment_sort
:top
ornew
(default) - choose comment sorting mode (on YouTube's side)max_comments
: Limit the amount of comments to gather. Comma-separated list of integers representingmax-comments,max-parents,max-replies,max-replies-per-thread
. Default isall,all,all,all
- E.g.
all,all,1000,10
will get a maximum of 1000 replies total, with up to 10 replies per thread.1000,all,100
will get a maximum of 1000 comments, with a maximum of 100 replies total
- E.g.
formats
: Change the types of formats to return.dashy
(convert HTTP to DASH),duplicate
(identical content but different URLs or protocol; includesdashy
),incomplete
(cannot be downloaded completely - live dash and post-live m3u8),missing_pot
(include formats that require a PO Token but are missing one)innertube_host
: Innertube API host to use for all API requests; e.g.studio.youtube.com
,youtubei.googleapis.com
. Note that cookies exported from one subdomain will not work on othersinnertube_key
: Innertube API key to use for all API requests. By default, no API key is usedraise_incomplete_data
:Incomplete Data Received
raises an error instead of reporting a warningdata_sync_id
: Overrides the account Data Sync ID used in Innertube API requests. This may be needed if you are using an account withyoutube:player_skip=webpage,configs
oryoutubetab:skip=webpage
visitor_data
: Overrides the Visitor Data used in Innertube API requests. This should be used withplayer_skip=webpage,configs
and without cookies. Note: this may have adverse effects if used improperly. If a session from a browser is wanted, you should pass cookies instead (which contain the Visitor ID)po_token
: Proof of Origin (PO) Token(s) to use. Comma seperated list of PO Tokens in the formatCLIENT.CONTEXT+PO_TOKEN
, e.g.youtube:po_token=web.gvs+XXX,web.player=XXX,web_safari.gvs+YYY
. Context can be any ofgvs
(Google Video Server URLs),player
(Innertube player request) orsubs
(Subtitles)pot_trace
: Enable debug logging for PO Token fetching. Eithertrue
orfalse
(default)fetch_pot
: Policy to use for fetching a PO Token from providers. One ofalways
(always try fetch a PO Token regardless if the client requires one for the given context),never
(never fetch a PO Token), orauto
(default; only fetch a PO Token if the client requires one for the given context)
youtubepot-webpo
bind_to_visitor_id
: Whether to use the Visitor ID instead of Visitor Data for caching WebPO tokens. Eithertrue
(default) orfalse
youtubetab (YouTube playlists, channels, feeds, etc.)
skip
: One or more ofwebpage
(skip initial webpage download),authcheck
(allow the download of playlists requiring authentication when no initial webpage is downloaded. This may cause unwanted behavior, see #1122 for more details)approximate_date
: Extract approximateupload_date
andtimestamp
in flat-playlist. This may cause date-based filters to be slightly off
Other Extractor Arguments
generic
fragment_query
: Passthrough any query in mpd/m3u8 manifest URLs to their fragments if no value is provided, or else apply the query string given asfragment_query=VALUE
. Note that if the stream has an HLS AES-128 key, then the query parameters will be passed to the key URI as well, unless thekey_query
extractor-arg is passed, or unless an external key URI is provided via thehls_key
extractor-arg. Does not apply to ffmpegvariant_query
: Passthrough the master m3u8 URL query to its variant playlist URLs if no value is provided, or else apply the query string given asvariant_query=VALUE
key_query
: Passthrough the master m3u8 URL query to its HLS AES-128 decryption key URI if no value is provided, or else apply the query string given askey_query=VALUE
. Note that this will have no effect if the key URI is provided via thehls_key
extractor-arg. Does not apply to ffmpeghls_key
: An HLS AES-128 key URI or key (as hex), and optionally the IV (as hex), in the form of(URI|KEY)[,IV]
; e.g.generic:hls_key=ABCDEF1234567980,0xFEDCBA0987654321
. Passing any of these values will force usage of the native HLS downloader and override the corresponding values found in the m3u8 playlistis_live
: Bypass live HLS detection and manually setlive_status
- a value offalse
will setnot_live
, any other value (or no value) will setis_live
impersonate
: Target(s) to try and impersonate with the initial webpage request; e.g.generic:impersonate=safari,chrome-110
. Usegeneric:impersonate
to impersonate any available target, and usegeneric:impersonate=false
to disable impersonation (default)
vikichannel
video_types
: Types of videos to download - one or more ofepisodes
,movies
,clips
,trailers
youtubewebarchive
check_all
: Try to check more at the cost of more requests. One or more ofthumbnails
,captures
gamejolt
comment_sort
:hot
(default),you
(cookies needed),top
,new
- choose comment sorting mode (on GameJolt's side)
hotstar
res
: resolution to ignore - one or more ofsd
,hd
,fhd
vcodec
: vcodec to ignore - one or more ofh264
,h265
,dvh265
dr
: dynamic range to ignore - one or more ofsdr
,hdr10
,dv
instagram
app_id
: The value of theX-IG-App-ID
header used for API requests. Default is the web app ID,936619743392459
niconicochannelplus
max_comments
: Maximum number of comments to extract - default is120
tiktok
api_hostname
: Hostname to use for mobile API calls, e.g.api22-normal-c-alisg.tiktokv.com
app_name
: Default app name to use with mobile API calls, e.g.trill
app_version
: Default app version to use with mobile API calls - should be set along withmanifest_app_version
, e.g.34.1.2
manifest_app_version
: Default numeric app version to use with mobile API calls, e.g.2023401020
aid
: Default app ID to use with mobile API calls, e.g.1180
app_info
: Enable mobile API extraction with one or more app info strings in the format of<iid>/[app_name]/[app_version]/[manifest_app_version]/[aid]
, whereiid
is the unique app install ID.iid
is the only required value; all other values and their/
separators can be omitted, e.g.tiktok:app_info=1234567890123456789
ortiktok:app_info=123,456/trill///1180,789//34.0.1/340001
device_id
: Enable mobile API extraction with a genuine device ID to be used with mobile API calls. Default is a random 19-digit string
rokfinchannel
tab
: Which tab to download - one ofnew
,top
,videos
,podcasts
,streams
,stacks
twitter
api
: Select one ofgraphql
(default),legacy
orsyndication
as the API for tweet extraction. Has no effect if logged in
stacommu, wrestleuniverse
device_id
: UUID value assigned by the website and used to enforce device limits for paid livestream content. Can be found in browser local storage
twitch
client_id
: Client ID value to be sent with GraphQL requests, e.g.twitch:client_id=kimne78kx3ncx6brgo4mv6wki5h1ko
nhkradirulive (NHK らじる★らじる LIVE)
area
: Which regional variation to extract. Valid areas are:sapporo
,sendai
,tokyo
,nagoya
,osaka
,hiroshima
,matsuyama
,fukuoka
. Defaults totokyo
nflplusreplay
type
: Type(s) of game replays to extract. Valid types are:full_game
,full_game_spanish
,condensed_game
andall_22
. You can useall
to extract all available replay types, which is the default
jiocinema
refresh_token
: TherefreshToken
UUID from browser local storage can be passed to extend the life of your login session when logging in withtoken
as username and theaccessToken
from browser local storage as password
jiosaavn
bitrate
: Audio bitrates to request. One or more of16
,32
,64
,128
,320
. Default is128,320
afreecatvlive
cdn
: One or more CDN IDs to use with the API call for stream URLs, e.g.gcp_cdn
,gs_cdn_pc_app
,gs_cdn_mobile_web
,gs_cdn_pc_web
soundcloud
formats
: Formats to request from the API. Requested values should be in the format of{protocol}_{codec}
, e.g.hls_opus,http_aac
. The*
character functions as a wildcard, e.g.*_mp3
, and can be passed by itself to request all formats. Known protocols includehttp
,hls
andhls-aes
; known codecs includeaac
,opus
andmp3
. Originaldownload
formats are always extracted. Default ishttp_aac,hls_aac,http_opus,hls_opus,http_mp3,hls_mp3
orfon (orf:on)
prefer_segments_playlist
: Prefer a playlist of program segments instead of a single complete video when available. If individual segments are desired, use--concat-playlist never --extractor-args "orfon:prefer_segments_playlist"
bilibili
prefer_multi_flv
: Prefer extracting flv formats over mp4 for older videos that still provide legacy formats
sonylivseries
sort_order
: Episode sort order for series extraction - one ofasc
(ascending, oldest first) ordesc
(descending, newest first). Default isasc
tver
backend
: Backend API to use for extraction - one ofstreaks
(default) orbrightcove
(deprecated)
vimeo
client
: Client to extract video data from. The currently available clients areandroid
,ios
, andweb
. Only one client can be used. Theweb
client is used by default. Theweb
client only works with account cookies or login credentials. Theandroid
andios
clients only work with previously cached OAuth tokensoriginal_format_policy
: Policy for when to try extracting original formats. One ofalways
,never
, orauto
. The defaultauto
policy tries to avoid exceeding the web client's API rate-limit by only making an extra request when Vimeo publicizes the video's downloadability
Note: These options may be changed/removed in the future without concern for backward compatibility