[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-283":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":30,"discoverSource":31},283,"youtube-dl","ytdl-org\u002Fyoutube-dl","ytdl-org","Command-line program to download videos from YouTube.com and other video sites","http:\u002F\u002Fytdl-org.github.io\u002Fyoutube-dl\u002F",null,"Python",140519,10676,2154,3630,0,2,49,216,26,94,"The Unlicense",false,"master",true,[],"2026-06-17 04:00:02","[![Build Status](https:\u002F\u002Fgithub.com\u002Fytdl-org\u002Fyoutube-dl\u002Fworkflows\u002FCI\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fytdl-org\u002Fyoutube-dl\u002Factions?query=workflow%3ACI)\n\n\nyoutube-dl - download videos from youtube.com or other video platforms\n\n- [INSTALLATION](#installation)\n- [DESCRIPTION](#description)\n- [OPTIONS](#options)\n- [CONFIGURATION](#configuration)\n- [OUTPUT TEMPLATE](#output-template)\n- [FORMAT SELECTION](#format-selection)\n- [VIDEO SELECTION](#video-selection)\n- [FAQ](#faq)\n- [DEVELOPER INSTRUCTIONS](#developer-instructions)\n- [EMBEDDING YOUTUBE-DL](#embedding-youtube-dl)\n- [BUGS](#bugs)\n- [COPYRIGHT](#copyright)\n\n# INSTALLATION\n\nTo install it right away for all UNIX users (Linux, macOS, etc.), type:\n\n    sudo curl -L https:\u002F\u002Fyt-dl.org\u002Fdownloads\u002Flatest\u002Fyoutube-dl -o \u002Fusr\u002Flocal\u002Fbin\u002Fyoutube-dl\n    sudo chmod a+rx \u002Fusr\u002Flocal\u002Fbin\u002Fyoutube-dl\n\nIf you do not have curl, you can alternatively use a recent wget:\n\n    sudo wget https:\u002F\u002Fyt-dl.org\u002Fdownloads\u002Flatest\u002Fyoutube-dl -O \u002Fusr\u002Flocal\u002Fbin\u002Fyoutube-dl\n    sudo chmod a+rx \u002Fusr\u002Flocal\u002Fbin\u002Fyoutube-dl\n\nWindows users can [download an .exe file](https:\u002F\u002Fyt-dl.org\u002Flatest\u002Fyoutube-dl.exe) and place it in any location on their [PATH](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FPATH_%28variable%29) except for `%SYSTEMROOT%\\System32` (e.g. **do not** put in `C:\\Windows\\System32`).\n\nYou can also use pip:\n\n    sudo -H pip install --upgrade youtube-dl\n\nThis command will update youtube-dl if you have already installed it. See the [pypi page](https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fyoutube_dl) for more information.\n\nmacOS users can install youtube-dl with [Homebrew](https:\u002F\u002Fbrew.sh\u002F):\n\n    brew install youtube-dl\n\nOr with [MacPorts](https:\u002F\u002Fwww.macports.org\u002F):\n\n    sudo port install youtube-dl\n\nAlternatively, refer to the [developer instructions](#developer-instructions) for how to check out and work with the git repository. For further options, including PGP signatures, see the [youtube-dl Download Page](https:\u002F\u002Fytdl-org.github.io\u002Fyoutube-dl\u002Fdownload.html).\n\n# DESCRIPTION\n**youtube-dl** is a command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.6, 2.7, or 3.2+, and it is not platform specific. It should work on your Unix box, on Windows or on macOS. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.\n\n    youtube-dl [OPTIONS] URL [URL...]\n\n# OPTIONS\n    -h, --help                           Print this help text and exit\n    --version                            Print program version and exit\n    -U, --update                         Update this program to latest version.\n                                         Make sure that you have sufficient\n                                         permissions (run with sudo if needed)\n    -i, --ignore-errors                  Continue on download errors, for\n                                         example to skip unavailable videos in a\n                                         playlist\n    --abort-on-error                     Abort downloading of further videos (in\n                                         the playlist or the command line) if an\n                                         error occurs\n    --dump-user-agent                    Display the current browser\n                                         identification\n    --list-extractors                    List all supported extractors\n    --extractor-descriptions             Output descriptions of all supported\n                                         extractors\n    --force-generic-extractor            Force extraction to use the generic\n                                         extractor\n    --default-search PREFIX              Use this prefix for unqualified URLs.\n                                         For example \"gvsearch2:\" downloads two\n                                         videos from google videos for youtube-\n                                         dl \"large apple\". Use the value \"auto\"\n                                         to let youtube-dl guess (\"auto_warning\"\n                                         to emit a warning when guessing).\n                                         \"error\" just throws an error. The\n                                         default value \"fixup_error\" repairs\n                                         broken URLs, but emits an error if this\n                                         is not possible instead of searching.\n    --ignore-config                      Do not read configuration files. When\n                                         given in the global configuration file\n                                         \u002Fetc\u002Fyoutube-dl.conf: Do not read the\n                                         user configuration in\n                                         ~\u002F.config\u002Fyoutube-dl\u002Fconfig\n                                         (%APPDATA%\u002Fyoutube-dl\u002Fconfig.txt on\n                                         Windows)\n    --config-location PATH               Location of the configuration file;\n                                         either the path to the config or its\n                                         containing directory.\n    --flat-playlist                      Do not extract the videos of a\n                                         playlist, only list them.\n    --mark-watched                       Mark videos watched (YouTube only)\n    --no-mark-watched                    Do not mark videos watched (YouTube\n                                         only)\n    --no-color                           Do not emit color codes in output\n\n## Network Options:\n    --proxy URL                          Use the specified HTTP\u002FHTTPS\u002FSOCKS\n                                         proxy. To enable SOCKS proxy, specify a\n                                         proper scheme. For example\n                                         socks5:\u002F\u002F127.0.0.1:1080\u002F. Pass in an\n                                         empty string (--proxy \"\") for direct\n                                         connection\n    --socket-timeout SECONDS             Time to wait before giving up, in\n                                         seconds\n    --source-address IP                  Client-side IP address to bind to\n    -4, --force-ipv4                     Make all connections via IPv4\n    -6, --force-ipv6                     Make all connections via IPv6\n\n## Geo Restriction:\n    --geo-verification-proxy URL         Use this proxy to verify the IP address\n                                         for some geo-restricted sites. The\n                                         default proxy specified by --proxy (or\n                                         none, if the option is not present) is\n                                         used for the actual downloading.\n    --geo-bypass                         Bypass geographic restriction via\n                                         faking X-Forwarded-For HTTP header\n    --no-geo-bypass                      Do not bypass geographic restriction\n                                         via faking X-Forwarded-For HTTP header\n    --geo-bypass-country CODE            Force bypass geographic restriction\n                                         with explicitly provided two-letter ISO\n                                         3166-2 country code\n    --geo-bypass-ip-block IP_BLOCK       Force bypass geographic restriction\n                                         with explicitly provided IP block in\n                                         CIDR notation\n\n## Video Selection:\n    --playlist-start NUMBER              Playlist video to start at (default is\n                                         1)\n    --playlist-end NUMBER                Playlist video to end at (default is\n                                         last)\n    --playlist-items ITEM_SPEC           Playlist video items to download.\n                                         Specify indices of the videos in the\n                                         playlist separated by commas like: \"--\n                                         playlist-items 1,2,5,8\" if you want to\n                                         download videos indexed 1, 2, 5, 8 in\n                                         the playlist. You can specify range: \"\n                                         --playlist-items 1-3,7,10-13\", it will\n                                         download the videos at index 1, 2, 3,\n                                         7, 10, 11, 12 and 13.\n    --match-title REGEX                  Download only matching titles (regex or\n                                         caseless sub-string)\n    --reject-title REGEX                 Skip download for matching titles\n                                         (regex or caseless sub-string)\n    --max-downloads NUMBER               Abort after downloading NUMBER files\n    --min-filesize SIZE                  Do not download any videos smaller than\n                                         SIZE (e.g. 50k or 44.6m)\n    --max-filesize SIZE                  Do not download any videos larger than\n                                         SIZE (e.g. 50k or 44.6m)\n    --date DATE                          Download only videos uploaded in this\n                                         date\n    --datebefore DATE                    Download only videos uploaded on or\n                                         before this date (i.e. inclusive)\n    --dateafter DATE                     Download only videos uploaded on or\n                                         after this date (i.e. inclusive)\n    --min-views COUNT                    Do not download any videos with less\n                                         than COUNT views\n    --max-views COUNT                    Do not download any videos with more\n                                         than COUNT views\n    --match-filter FILTER                Generic video filter. Specify any key\n                                         (see the \"OUTPUT TEMPLATE\" for a list\n                                         of available keys) to match if the key\n                                         is present, !key to check if the key is\n                                         not present, key > NUMBER (like\n                                         \"comment_count > 12\", also works with\n                                         >=, \u003C, \u003C=, !=, =) to compare against a\n                                         number, key = 'LITERAL' (like \"uploader\n                                         = 'Mike Smith'\", also works with !=) to\n                                         match against a string literal and & to\n                                         require multiple matches. Values which\n                                         are not known are excluded unless you\n                                         put a question mark (?) after the\n                                         operator. For example, to only match\n                                         videos that have been liked more than\n                                         100 times and disliked less than 50\n                                         times (or the dislike functionality is\n                                         not available at the given service),\n                                         but who also have a description, use\n                                         --match-filter \"like_count > 100 &\n                                         dislike_count \u003C? 50 & description\" .\n    --no-playlist                        Download only the video, if the URL\n                                         refers to a video and a playlist.\n    --yes-playlist                       Download the playlist, if the URL\n                                         refers to a video and a playlist.\n    --age-limit YEARS                    Download only videos suitable for the\n                                         given age\n    --download-archive FILE              Download only videos not listed in the\n                                         archive file. Record the IDs of all\n                                         downloaded videos in it.\n    --include-ads                        Download advertisements as well\n                                         (experimental)\n\n## Download Options:\n    -r, --limit-rate RATE                Maximum download rate in bytes per\n                                         second (e.g. 50K or 4.2M)\n    -R, --retries RETRIES                Number of retries (default is 10), or\n                                         \"infinite\".\n    --fragment-retries RETRIES           Number of retries for a fragment\n                                         (default is 10), or \"infinite\" (DASH,\n                                         hlsnative and ISM)\n    --skip-unavailable-fragments         Skip unavailable fragments (DASH,\n                                         hlsnative and ISM)\n    --abort-on-unavailable-fragment      Abort downloading when some fragment is\n                                         not available\n    --keep-fragments                     Keep downloaded fragments on disk after\n                                         downloading is finished; fragments are\n                                         erased by default\n    --buffer-size SIZE                   Size of download buffer (e.g. 1024 or\n                                         16K) (default is 1024)\n    --no-resize-buffer                   Do not automatically adjust the buffer\n                                         size. By default, the buffer size is\n                                         automatically resized from an initial\n                                         value of SIZE.\n    --http-chunk-size SIZE               Size of a chunk for chunk-based HTTP\n                                         downloading (e.g. 10485760 or 10M)\n                                         (default is disabled). May be useful\n                                         for bypassing bandwidth throttling\n                                         imposed by a webserver (experimental)\n    --playlist-reverse                   Download playlist videos in reverse\n                                         order\n    --playlist-random                    Download playlist videos in random\n                                         order\n    --xattr-set-filesize                 Set file xattribute ytdl.filesize with\n                                         expected file size\n    --hls-prefer-native                  Use the native HLS downloader instead\n                                         of ffmpeg\n    --hls-prefer-ffmpeg                  Use ffmpeg instead of the native HLS\n                                         downloader\n    --hls-use-mpegts                     Use the mpegts container for HLS\n                                         videos, allowing to play the video\n                                         while downloading (some players may not\n                                         be able to play it)\n    --external-downloader COMMAND        Use the specified external downloader.\n                                         Currently supports aria2c,avconv,axel,c\n                                         url,ffmpeg,httpie,wget\n    --external-downloader-args ARGS      Give these arguments to the external\n                                         downloader\n\n## Filesystem Options:\n    -a, --batch-file FILE                File containing URLs to download ('-'\n                                         for stdin), one URL per line. Lines\n                                         starting with '#', ';' or ']' are\n                                         considered as comments and ignored.\n    --id                                 Use only video ID in file name\n    -o, --output TEMPLATE                Output filename template, see the\n                                         \"OUTPUT TEMPLATE\" for all the info\n    --output-na-placeholder PLACEHOLDER  Placeholder value for unavailable meta\n                                         fields in output filename template\n                                         (default is \"NA\")\n    --autonumber-start NUMBER            Specify the start value for\n                                         %(autonumber)s (default is 1)\n    --restrict-filenames                 Restrict filenames to only ASCII\n                                         characters, and avoid \"&\" and spaces in\n                                         filenames\n    -w, --no-overwrites                  Do not overwrite files\n    -c, --continue                       Force resume of partially downloaded\n                                         files. By default, youtube-dl will\n                                         resume downloads if possible.\n    --no-continue                        Do not resume partially downloaded\n                                         files (restart from beginning)\n    --no-part                            Do not use .part files - write directly\n                                         into output file\n    --no-mtime                           Do not use the Last-modified header to\n                                         set the file modification time\n    --write-description                  Write video description to a\n                                         .description file\n    --write-info-json                    Write video metadata to a .info.json\n                                         file\n    --write-annotations                  Write video annotations to a\n                                         .annotations.xml file\n    --load-info-json FILE                JSON file containing the video\n                                         information (created with the \"--write-\n                                         info-json\" option)\n    --cookies FILE                       File to read cookies from and dump\n                                         cookie jar in\n    --cache-dir DIR                      Location in the filesystem where\n                                         youtube-dl can store some downloaded\n                                         information permanently. By default\n                                         $XDG_CACHE_HOME\u002Fyoutube-dl or\n                                         ~\u002F.cache\u002Fyoutube-dl . At the moment,\n                                         only YouTube player files (for videos\n                                         with obfuscated signatures) are cached,\n                                         but that may change.\n    --no-cache-dir                       Disable filesystem caching\n    --rm-cache-dir                       Delete all filesystem cache files\n\n## Thumbnail Options:\n    --write-thumbnail                    Write thumbnail image to disk\n    --write-all-thumbnails               Write all thumbnail image formats to\n                                         disk\n    --list-thumbnails                    Simulate and list all available\n                                         thumbnail formats\n\n## Verbosity \u002F Simulation Options:\n    -q, --quiet                          Activate quiet mode\n    --no-warnings                        Ignore warnings\n    -s, --simulate                       Do not download the video and do not\n                                         write anything to disk\n    --skip-download                      Do not download the video\n    -g, --get-url                        Simulate, quiet but print URL\n    -e, --get-title                      Simulate, quiet but print title\n    --get-id                             Simulate, quiet but print id\n    --get-thumbnail                      Simulate, quiet but print thumbnail URL\n    --get-description                    Simulate, quiet but print video\n                                         description\n    --get-duration                       Simulate, quiet but print video length\n    --get-filename                       Simulate, quiet but print output\n                                         filename\n    --get-format                         Simulate, quiet but print output format\n    -j, --dump-json                      Simulate, quiet but print JSON\n                                         information. See the \"OUTPUT TEMPLATE\"\n                                         for a description of available keys.\n    -J, --dump-single-json               Simulate, quiet but print JSON\n                                         information for each command-line\n                                         argument. If the URL refers to a\n                                         playlist, dump the whole playlist\n                                         information in a single line.\n    --print-json                         Be quiet and print the video\n                                         information as JSON (video is still\n                                         being downloaded).\n    --newline                            Output progress bar as new lines\n    --no-progress                        Do not print progress bar\n    --console-title                      Display progress in console titlebar\n    -v, --verbose                        Print various debugging information\n    --dump-pages                         Print downloaded pages encoded using\n                                         base64 to debug problems (very verbose)\n    --write-pages                        Write downloaded intermediary pages to\n                                         files in the current directory to debug\n                                         problems\n    --print-traffic                      Display sent and read HTTP traffic\n    -C, --call-home                      Contact the youtube-dl server for\n                                         debugging\n    --no-call-home                       Do NOT contact the youtube-dl server\n                                         for debugging\n\n## Workarounds:\n    --encoding ENCODING                  Force the specified encoding\n                                         (experimental)\n    --no-check-certificate               Suppress HTTPS certificate validation\n    --prefer-insecure                    Use an unencrypted connection to\n                                         retrieve information about the video.\n                                         (Currently supported only for YouTube)\n    --user-agent UA                      Specify a custom user agent\n    --referer URL                        Specify a custom referer, use if the\n                                         video access is restricted to one\n                                         domain\n    --add-header FIELD:VALUE             Specify a custom HTTP header and its\n                                         value, separated by a colon ':'. You\n                                         can use this option multiple times\n    --bidi-workaround                    Work around terminals that lack\n                                         bidirectional text support. Requires\n                                         bidiv or fribidi executable in PATH\n    --sleep-interval SECONDS             Number of seconds to sleep before each\n                                         download when used alone or a lower\n                                         bound of a range for randomized sleep\n                                         before each download (minimum possible\n                                         number of seconds to sleep) when used\n                                         along with --max-sleep-interval.\n    --max-sleep-interval SECONDS         Upper bound of a range for randomized\n                                         sleep before each download (maximum\n                                         possible number of seconds to sleep).\n                                         Must only be used along with --min-\n                                         sleep-interval.\n\n## Video Format Options:\n    -f, --format FORMAT                  Video format code, see the \"FORMAT\n                                         SELECTION\" for all the info\n    --all-formats                        Download all available video formats\n    --prefer-free-formats                Prefer free video formats unless a\n                                         specific one is requested\n    -F, --list-formats                   List all available formats of requested\n                                         videos\n    --youtube-skip-dash-manifest         Do not download the DASH manifests and\n                                         related data on YouTube videos\n    --merge-output-format FORMAT         If a merge is required (e.g.\n                                         bestvideo+bestaudio), output to given\n                                         container format. One of mkv, mp4, ogg,\n                                         webm, flv. Ignored if no merge is\n                                         required\n\n## Subtitle Options:\n    --write-sub                          Write subtitle file\n    --write-auto-sub                     Write automatically generated subtitle\n                                         file (YouTube only)\n    --all-subs                           Download all the available subtitles of\n                                         the video\n    --list-subs                          List all available subtitles for the\n                                         video\n    --sub-format FORMAT                  Subtitle format, accepts formats\n                                         preference, for example: \"srt\" or\n                                         \"ass\u002Fsrt\u002Fbest\"\n    --sub-lang LANGS                     Languages of the subtitles to download\n                                         (optional) separated by commas, use\n                                         --list-subs for available language tags\n\n## Authentication Options:\n    -u, --username USERNAME              Login with this account ID\n    -p, --password PASSWORD              Account password. If this option is\n                                         left out, youtube-dl will ask\n                                         interactively.\n    -2, --twofactor TWOFACTOR            Two-factor authentication code\n    -n, --netrc                          Use .netrc authentication data\n    --video-password PASSWORD            Video password (vimeo, youku)\n\n## Adobe Pass Options:\n    --ap-mso MSO                         Adobe Pass multiple-system operator (TV\n                                         provider) identifier, use --ap-list-mso\n                                         for a list of available MSOs\n    --ap-username USERNAME               Multiple-system operator account login\n    --ap-password PASSWORD               Multiple-system operator account\n                                         password. If this option is left out,\n                                         youtube-dl will ask interactively.\n    --ap-list-mso                        List all supported multiple-system\n                                         operators\n\n## Post-processing Options:\n    -x, --extract-audio                  Convert video files to audio-only files\n                                         (requires ffmpeg\u002Favconv and\n                                         ffprobe\u002Favprobe)\n    --audio-format FORMAT                Specify audio format: \"best\", \"aac\",\n                                         \"flac\", \"mp3\", \"m4a\", \"opus\", \"vorbis\",\n                                         or \"wav\"; \"best\" by default; No effect\n                                         without -x\n    --audio-quality QUALITY              Specify ffmpeg\u002Favconv audio quality,\n                                         insert a value between 0 (better) and 9\n                                         (worse) for VBR or a specific bitrate\n                                         like 128K (default 5)\n    --recode-video FORMAT                Encode the video to another format if\n                                         necessary (currently supported:\n                                         mp4|flv|ogg|webm|mkv|avi)\n    --postprocessor-args ARGS            Give these arguments to the\n                                         postprocessor\n    -k, --keep-video                     Keep the video file on disk after the\n                                         post-processing; the video is erased by\n                                         default\n    --no-post-overwrites                 Do not overwrite post-processed files;\n                                         the post-processed files are\n                                         overwritten by default\n    --embed-subs                         Embed subtitles in the video (only for\n                                         mp4, webm and mkv videos)\n    --embed-thumbnail                    Embed thumbnail in the audio as cover\n                                         art\n    --add-metadata                       Write metadata to the video file\n    --metadata-from-title FORMAT         Parse additional metadata like song\n                                         title \u002F artist from the video title.\n                                         The format syntax is the same as\n                                         --output. Regular expression with named\n                                         capture groups may also be used. The\n                                         parsed parameters replace existing\n                                         values. Example: --metadata-from-title\n                                         \"%(artist)s - %(title)s\" matches a\n                                         title like \"Coldplay - Paradise\".\n                                         Example (regex): --metadata-from-title\n                                         \"(?P\u003Cartist>.+?) - (?P\u003Ctitle>.+)\"\n    --xattrs                             Write metadata to the video file's\n                                         xattrs (using dublin core and xdg\n                                         standards)\n    --fixup POLICY                       Automatically correct known faults of\n                                         the file. One of never (do nothing),\n                                         warn (only emit a warning),\n                                         detect_or_warn (the default; fix file\n                                         if we can, warn otherwise)\n    --prefer-avconv                      Prefer avconv over ffmpeg for running\n                                         the postprocessors\n    --prefer-ffmpeg                      Prefer ffmpeg over avconv for running\n                                         the postprocessors (default)\n    --ffmpeg-location PATH               Location of the ffmpeg\u002Favconv binary;\n                                         either the path to the binary or its\n                                         containing directory.\n    --exec CMD                           Execute a command on the file after\n                                         downloading and post-processing,\n                                         similar to find's -exec syntax.\n                                         Example: --exec 'adb push {}\n                                         \u002Fsdcard\u002FMusic\u002F && rm {}'\n    --convert-subs FORMAT                Convert the subtitles to other format\n                                         (currently supported: srt|ass|vtt|lrc)\n\n# CONFIGURATION\n\nYou can configure youtube-dl by placing any supported command line option to a configuration file. On Linux and macOS, the system wide configuration file is located at `\u002Fetc\u002Fyoutube-dl.conf` and the user wide configuration file at `~\u002F.config\u002Fyoutube-dl\u002Fconfig`. On Windows, the user wide configuration file locations are `%APPDATA%\\youtube-dl\\config.txt` or `C:\\Users\\\u003Cuser name>\\youtube-dl.conf`. Note that by default configuration file may not exist so you may need to create it yourself.\n\nFor example, with the following configuration file youtube-dl will always extract the audio, not copy the mtime, use a proxy and save all videos under `Movies` directory in your home directory:\n```\n# Lines starting with # are comments\n\n# Always extract audio\n-x\n\n# Do not copy the mtime\n--no-mtime\n\n# Use this proxy\n--proxy 127.0.0.1:3128\n\n# Save all videos under Movies directory in your home directory\n-o ~\u002FMovies\u002F%(title)s.%(ext)s\n```\n\nNote that options in configuration file are just the same options aka switches used in regular command line calls thus there **must be no whitespace** after `-` or `--`, e.g. `-o` or `--proxy` but not `- o` or `-- proxy`.\n\nYou can use `--ignore-config` if you want to disable the configuration file for a particular youtube-dl run.\n\nYou can also use `--config-location` if you want to use custom configuration file for a particular youtube-dl run.\n\n### Authentication with `.netrc` file\n\nYou may also want to configure automatic credentials storage for extractors that support authentication (by providing login and password with `--username` and `--password`) in order not to pass credentials as command line arguments on every youtube-dl execution and prevent tracking plain text passwords in the shell command history. You can achieve this using a [`.netrc` file](https:\u002F\u002Fstackoverflow.com\u002Ftags\u002F.netrc\u002Finfo) on a per extractor basis. For that you will need to create a `.netrc` file in your `$HOME` and restrict permissions to read\u002Fwrite by only you:\n```\ntouch $HOME\u002F.netrc\nchmod a-rwx,u+rw $HOME\u002F.netrc\n```\nAfter that you can add credentials for an extractor in the following format, where *extractor* is the name of the extractor in lowercase:\n```\nmachine \u003Cextractor> login \u003Clogin> password \u003Cpassword>\n```\nFor example:\n```\nmachine youtube login myaccount@gmail.com password my_youtube_password\nmachine twitch login my_twitch_account_name password my_twitch_password\n```\nTo activate authentication with the `.netrc` file you should pass `--netrc` to youtube-dl or place it in the [configuration file](#configuration).\n\nOn Windows you may also need to setup the `%HOME%` environment variable manually. For example:\n```\nset HOME=%USERPROFILE%\n```\n\n# OUTPUT TEMPLATE\n\nThe `-o` option allows users to indicate a template for the output file names.\n\n**tl;dr:** [navigate me to examples](#output-template-examples).\n\nThe basic usage is not to set any template arguments when downloading a single file, like in `youtube-dl -o funny_video.flv \"https:\u002F\u002Fsome\u002Fvideo\"`. However, it may contain special sequences that will be replaced when downloading each video. The special sequences may be formatted according to [python string formatting operations](https:\u002F\u002Fdocs.python.org\u002F2\u002Flibrary\u002Fstdtypes.html#string-formatting). For example, `%(NAME)s` or `%(NAME)05d`. To clarify, that is a percent symbol followed by a name in parentheses, followed by formatting operations. Allowed names along with sequence type are:\n\n - `id` (string): Video identifier\n - `title` (string): Video title\n - `url` (string): Video URL\n - `ext` (string): Video filename extension\n - `alt_title` (string): A secondary title of the video\n - `display_id` (string): An alternative identifier for the video\n - `uploader` (string): Full name of the video uploader\n - `license` (string): License name the video is licensed under\n - `creator` (string): The creator of the video\n - `release_date` (string): The date (YYYYMMDD) when the video was released\n - `timestamp` (numeric): UNIX timestamp of the moment the video became available\n - `upload_date` (string): Video upload date (YYYYMMDD)\n - `uploader_id` (string): Nickname or id of the video uploader\n - `channel` (string): Full name of the channel the video is uploaded on\n - `channel_id` (string): Id of the channel\n - `location` (string): Physical location where the video was filmed\n - `duration` (numeric): Length of the video in seconds\n - `view_count` (numeric): How many users have watched the video on the platform\n - `like_count` (numeric): Number of positive ratings of the video\n - `dislike_count` (numeric): Number of negative ratings of the video\n - `repost_count` (numeric): Number of reposts of the video\n - `average_rating` (numeric): Average rating give by users, the scale used depends on the webpage\n - `comment_count` (numeric): Number of comments on the video\n - `age_limit` (numeric): Age restriction for the video (years)\n - `is_live` (boolean): Whether this video is a live stream or a fixed-length video\n - `start_time` (numeric): Time in seconds where the reproduction should start, as specified in the URL\n - `end_time` (numeric): Time in seconds where the reproduction should end, as specified in the URL\n - `format` (string): A human-readable description of the format\n - `format_id` (string): Format code specified by `--format`\n - `format_note` (string): Additional info about the format\n - `width` (numeric): Width of the video\n - `height` (numeric): Height of the video\n - `resolution` (string): Textual description of width and height\n - `tbr` (numeric): Average bitrate of audio and video in KBit\u002Fs\n - `abr` (numeric): Average audio bitrate in KBit\u002Fs\n - `acodec` (string): Name of the audio codec in use\n - `asr` (numeric): Audio sampling rate in Hertz\n - `vbr` (numeric): Average video bitrate in KBit\u002Fs\n - `fps` (numeric): Frame rate\n - `vcodec` (string): Name of the video codec in use\n - `container` (string): Name of the container format\n - `filesize` (numeric): The number of bytes, if known in advance\n - `filesize_approx` (numeric): An estimate for the number of bytes\n - `protocol` (string): The protocol that will be used for the actual download\n - `extractor` (string): Name of the extractor\n - `extractor_key` (string): Key name of the extractor\n - `epoch` (numeric): Unix epoch when creating the file\n - `autonumber` (numeric): Number that will be increased with each download, starting at `--autonumber-start`\n - `playlist` (string): Name or id of the playlist that contains the video\n - `playlist_index` (numeric): Index of the video in the playlist padded with leading zeros according to the total length of the playlist\n - `playlist_id` (string): Playlist identifier\n - `playlist_title` (string): Playlist title\n - `playlist_uploader` (string): Full name of the playlist uploader\n - `playlist_uploader_id` (string): Nickname or id of the playlist uploader\n\nAvailable for the video that belongs to some logical chapter or section:\n\n - `chapter` (string): Name or title of the chapter the video belongs to\n - `chapter_number` (numeric): Number of the chapter the video belongs to\n - `chapter_id` (string): Id of the chapter the video belongs to\n\nAvailable for the video that is an episode of some series or programme:\n\n - `series` (string): Title of the series or programme the video episode belongs to\n - `season` (string): Title of the season the video episode belongs to\n - `season_number` (numeric): Number of the season the video episode belongs to\n - `season_id` (string): Id of the season the video episode belongs to\n - `episode` (string): Title of the video episode\n - `episode_number` (numeric): Number of the video episode within a season\n - `episode_id` (string): Id of the video episode\n\nAvailable for the media that is a track or a part of a music album:\n\n - `track` (string): Title of the track\n - `track_number` (numeric): Number of the track within an album or a disc\n - `track_id` (string): Id of the track\n - `artist` (string): Artist(s) of the track\n - `genre` (string): Genre(s) of the track\n - `album` (string): Title of the album the track belongs to\n - `album_type` (string): Type of the album\n - `album_artist` (string): List of all artists appeared on the album\n - `disc_number` (numeric): Number of the disc or other physical medium the track belongs to\n - `release_year` (numeric): Year (YYYY) when the album was released\n\nEach aforementioned sequence when referenced in an output template will be replaced by the actual value corresponding to the sequence name. Note that some of the sequences are not guaranteed to be present since they depend on the metadata obtained by a particular extractor. Such sequences will be replaced with placeholder value provided with `--output-na-placeholder` (`NA` by default).\n\nFor example for `-o %(title)s-%(id)s.%(ext)s` and an mp4 video with title `youtube-dl test video` and id `BaW_jenozKcj`, this will result in a `youtube-dl test video-BaW_jenozKcj.mp4` file created in the current directory.\n\nFor numeric sequences you can use numeric related formatting, for example, `%(view_count)05d` will result in a string with view count padded with zeros up to 5 characters, like in `00042`.\n\nOutput templates can also contain arbitrary hierarchical path, e.g. `-o '%(playlist)s\u002F%(playlist_index)s - %(title)s.%(ext)s'` which will result in downloading each video in a directory corresponding to this path template. Any missing directory will be automatically created for you.\n\nTo use percent literals in an output template use `%%`. To output to stdout use `-o -`.\n\nThe current default template is `%(title)s-%(id)s.%(ext)s`.\n\nIn some cases, you don't want special characters such as 中, spaces, or &, such as when transferring the downloaded filename to a Windows system or the filename through an 8bit-unsafe channel. In these cases, add the `--restrict-filenames` flag to get a shorter title.\n\n#### Output template and Windows batch files\n\nIf you are using an output template inside a Windows batch file then you must escape plain percent characters (`%`) by doubling, so that `-o \"%(title)s-%(id)s.%(ext)s\"` should become `-o \"%%(title)s-%%(id)s.%%(ext)s\"`. However you should not touch `%`'s that are not plain characters, e.g. environment variables for expansion should stay intact: `-o \"C:\\%HOMEPATH%\\Desktop\\%%(title)s.%%(ext)s\"`.\n\n#### Output template examples\n\nNote that on Windows you may need to use double quotes instead of single.\n\n```bash\n$ youtube-dl --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc\nyoutube-dl test video ''_ä↭𝕐.mp4    # All kinds of weird characters\n\n$ youtube-dl --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc --restrict-filenames\nyoutube-dl_test_video_.mp4          # A simple file name\n\n# Download YouTube playlist videos in separate directory indexed by video order in a playlist\n$ youtube-dl -o '%(playlist)s\u002F%(playlist_index)s - %(title)s.%(ext)s' https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re\n\n# Download all playlists of YouTube channel\u002Fuser keeping each playlist in separate directory:\n$ youtube-dl -o '%(uploader)s\u002F%(playlist)s\u002F%(playlist_index)s - %(title)s.%(ext)s' https:\u002F\u002Fwww.youtube.com\u002Fuser\u002FTheLinuxFoundation\u002Fplaylists\n\n# Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home\n$ youtube-dl -u user -p password -o '~\u002FMyVideos\u002F%(playlist)s\u002F%(chapter_number)s - %(chapter)s\u002F%(title)s.%(ext)s' https:\u002F\u002Fwww.udemy.com\u002Fjava-tutorial\u002F\n\n# Download entire series season keeping each series and each season in separate directory under C:\u002FMyVideos\n$ youtube-dl -o \"C:\u002FMyVideos\u002F%(series)s\u002F%(season_number)s - %(season)s\u002F%(episode_number)s - %(episode)s.%(ext)s\" https:\u002F\u002Fvideomore.ru\u002Fkino_v_detalayah\u002F5_sezon\u002F367617\n\n# Stream the video being downloaded to stdout\n$ youtube-dl -o - BaW_jenozKc\n```\n\n# FORMAT SELECTION\n\nBy default youtube-dl tries to download the best available quality, i.e. if you want the best quality you **don't need** to pass any special options, youtube-dl will guess it for you by **default**.\n\nBut sometimes you may want to download in a different format, for example when you are on a slow or intermittent connection. The key mechanism for achieving this is so-called *format selection* based on which you can explicitly specify desired format, select formats based on some criterion or criteria, setup precedence and much more.\n\nThe general syntax for format selection is `--format FORMAT` or shorter `-f FORMAT` where `FORMAT` is a *selector expression*, i.e. an expression that describes format or formats you would like to download.\n\n**tl;dr:** [navigate me to examples](#format-selection-examples).\n\nThe simplest case is requesting a specific format, for example with `-f 22` you can download the format with format code equal to 22. You can get the list of available format codes for particular video using `--list-formats` or `-F`. Note that these format codes are extractor specific.\n\nYou can also use a file extension (currently `3gp`, `aac`, `flv`, `m4a`, `mp3`, `mp4`, `ogg`, `wav`, `webm` are supported) to download the best quality format of a particular file extension served as a single file, e.g. `-f webm` will download the best quality format with the `webm` extension served as a single file.\n\nYou can also use special names to select particular edge case formats:\n\n - `best`: Select the best quality format represented by a single file with video and audio.\n - `worst`: Select the worst quality format represented by a single file with video and audio.\n - `bestvideo`: Select the best quality video-only format (e.g. DASH video). May not be available.\n - `worstvideo`: Select the worst quality video-only format. May not be available.\n - `bestaudio`: Select the best quality audio only-format. May not be available.\n - `worstaudio`: Select the worst quality audio only-format. May not be available.\n\nFor example, to download the worst quality video-only format you can use `-f worstvideo`.\n\nIf you want to download multiple videos and they don't have the same formats available, you can specify the order of preference using slashes. Note that slash is left-associative, i.e. formats on the left hand side are preferred, for example `-f 22\u002F17\u002F18` will download format 22 if it's available, otherwise it will download format 17 if it's available, otherwise it will download format 18 if it's available, otherwise it will complain that no suitable formats are available for download.\n\nIf you want to download several formats of the same video use a comma as a separator, e.g. `-f 22,17,18` will download all these three formats, of course if they are available. Or a more sophisticated example combined with the precedence feature: `-f 136\u002F137\u002Fmp4\u002Fbestvideo,140\u002Fm4a\u002Fbestaudio`.\n\nYou can also filter the video formats by putting a condition in brackets, as in `-f \"best[height=720]\"` (or `-f \"[filesize>10M]\"`).\n\nThe following numeric meta fields can be used with comparisons `\u003C`, `\u003C=`, `>`, `>=`, `=` (equals), `!=` (not equals):\n\n - `filesize`: The number of bytes, if known in advance\n - `width`: Width of the video, if known\n - `height`: Height of the video, if known\n - `tbr`: Average bitrate of audio and video in KBit\u002Fs\n - `abr`: Average audio bitrate in KBit\u002Fs\n - `vbr`: Average video bitrate in KBit\u002Fs\n - `asr`: Audio sampling rate in Hertz\n - `fps`: Frame rate\n\nAlso filtering work for comparisons `=` (equals), `^=` (starts with), `$=` (ends with), `*=` (contains) and following string meta fields:\n\n - `ext`: File extension\n - `acodec`: Name of the audio codec in use\n - `vcodec`: Name of the video codec in use\n - `container`: Name of the container format\n - `protocol`: The protocol that will be used for the actual download, lower-case (`http`, `https`, `rtsp`, `rtmp`, `rtmpe`, `mms`, `f4m`, `ism`, `http_dash_segments`, `m3u8`, or `m3u8_native`)\n - `format_id`: A short description of the format\n - `language`: Language code\n\nAny string comparison may be prefixed with negation `!` in order to produce an opposite comparison, e.g. `!*=` (does not contain).\n\nNote that none of the aforementioned meta fields are guaranteed to be present since this solely depends on the metadata obtained by particular extractor, i.e. the metadata offered by the video hoster.\n\nFormats for which the value is not known are excluded unless you put a question mark (`?`) after the operator. You can combine format filters, so `-f \"[height \u003C=? 720][tbr>500]\"` selects up to 720p videos (or videos where the height is not known) with a bitrate of at least 500 KBit\u002Fs.\n\nYou can merge the video and audio of two formats into a single file using `-f \u003Cvideo-format>+\u003Caudio-format>` (requires ffmpeg or avconv installed), for example `-f bestvideo+bestaudio` will download the best video-only format, the best audio-only format and mux them together with ffmpeg\u002Favconv.\n\nFormat selectors can also be grouped using parentheses, for example if you want to download the best mp4 and webm formats with a height lower than 480 you can use `-f '(mp4,webm)[height\u003C480]'`.\n\nSince the end of April 2015 and version 2015.04.26, youtube-dl uses `-f bestvideo+bestaudio\u002Fbest` as the default format selection (see [#5447](https:\u002F\u002Fgithub.com\u002Fytdl-org\u002Fyoutube-dl\u002Fissues\u002F5447), [#5456](https:\u002F\u002Fgithub.com\u002Fytdl-org\u002Fyoutube-dl\u002Fissues\u002F5456)). If ffmpeg or avconv are installed this results in downloading `bestvideo` and `bestaudio` separately and muxing them together into a single file giving the best overall quality available. Otherwise it falls back to `best` and results in downloading the best available quality served as a single file. `best` is also needed for videos that don't come from YouTube because they don't provide the audio and video in two different files. If you want to only download some DASH formats (for example if you are not interested in getting videos with a resolution higher than 1080p), you can add `-f bestvideo[height\u003C=?1080]+bestaudio\u002Fbest` to your configuration file. Note that if you use youtube-dl to stream to `stdout` (and most likely to pipe it to your media player then), i.e. you explicitly specify output template as `-o -`, youtube-dl still uses `-f best` format selection in order to start content delivery immediately to your player and not to wait until `bestvideo` and `bestaudio` are downloaded and muxed.\n\nIf you want to preserve the old format selection behavior (prior to youtube-dl 2015.04.26), i.e. you want to download the best available quality media served as a single file, you should explicitly specify your choice with `-f best`. You may want to add it to the [configuration file](#configuration) in order not to type it every time you run youtube-dl.\n\n#### Format selection examples\n\nNote that on Windows you may need to use double quotes instead of single.\n\n```bash\n# Download best mp4 format available or any other best if no mp4 available\n$ youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]\u002Fbest[ext=mp4]\u002Fbest'\n\n# Download best format available but no better than 480p\n$ youtube-dl -f 'bestvideo[height\u003C=480]+bestaudio\u002Fbest[height\u003C=480]'\n\n# Download best video only format but no bigger than 50 MB\n$ youtube-dl -f 'best[filesize\u003C50M]'\n\n# Download best format available via direct link over HTTP\u002FHTTPS protocol\n$ youtube-dl -f '(bestvideo+bestaudio\u002Fbest)[protocol^=http]'\n\n# Download the best video format and the best audio format without merging them\n$ youtube-dl -f 'bestvideo,bestaudio' -o '%(title)s.f%(format_id)s.%(ext)s'\n```\nNote that in the last example, an output template is recommended as bestvideo and bestaudio may have the same file name.\n\n\n# VIDEO SELECTION\n\nVideos can be filtered by their upload date using the options `--date`, `--datebefore` or `--dateafter`. They accept dates in two formats:\n\n - Absolute dates: Dates in the format `YYYYMMDD`.\n - Relative dates: Dates in the format `(now|today)[+-][0-9](day|week|month|year)(s)?`\n\nExamples:\n\n```bash\n# Download only the videos uploaded in the last 6 months\n$ youtube-dl --dateafter now-6months\n\n# Download only the videos uploaded on January 1, 1970\n$ youtube-dl --date 19700101\n\n$ # Download only the videos uploaded in the 200x decade\n$ youtube-dl --dateafter 20000101 --datebefore 20091231\n```\n\n# FAQ\n\n### How do I update youtube-dl?\n\nIf you've followed [our manual installation instructions](https:\u002F\u002Fytdl-org.github.io\u002Fyoutube-dl\u002Fdownload.html), you can simply run `youtube-dl -U` (or, on Linux, `sudo youtube-dl -U`).\n\nIf you have used pip, a simple `sudo pip install -U youtube-dl` is sufficient to update.\n\nIf you have installed youtube-dl using a package manager like *apt-get* or *yum*, use the standard system update mechanism to update. Note that distribution packages are often outdated. As a rule of thumb, youtube-dl releases at least once a month, and often weekly or even daily. Simply go to https:\u002F\u002Fyt-dl.org to find out the current version. Unfortunately, there is nothing we youtube-dl developers can do if your distribution serves a really outdated version. You can (and should) complain to your distribution in their bugtracker or support forum.\n\nAs a last resort, you can also uninstall the version installed by your package manager and follow our manual installation instructions. For that, remove the distribution's package, with a line like\n\n    sudo apt-get remove -y youtube-dl\n\nAfterwards, simply follow [our manual installation instructions](https:\u002F\u002Fytdl-org.github.io\u002Fyoutube-dl\u002Fdownload.html):\n\n```\nsudo wget https:\u002F\u002Fyt-dl.org\u002Fdownloads\u002Flatest\u002Fyoutube-dl -O \u002Fusr\u002Flocal\u002Fbin\u002Fyoutube-dl\nsudo chmod a+rx \u002Fusr\u002Flocal\u002Fbin\u002Fyoutube-dl\nhash -r\n```\n\nAgain, from then on you'll be able to update with `sudo youtube-dl -U`.\n\n### youtube-dl is extremely slow to start on Windows\n\nAdd a file exclusion for `youtube-dl.exe` in Windows Defender settings.\n\n### I'm getting an error `Unable to extract OpenGraph title` on YouTube playlists\n\nYouTube changed their playlist format in March 2014 and later on, so you'll need at least youtube-dl 2014.07.25 to download all YouTube videos.\n\nIf you have installed youtube-dl with a package manager, pip, setup.py or a tarball, please use that to update. Note that Ubuntu packages do not seem to get updated anymore. Since we are not affiliated with Ubuntu, there is little we can do. Feel free to [report bugs](https:\u002F\u002Fbugs.launchpad.net\u002Fubuntu\u002F+source\u002Fyoutube-dl\u002F+filebug) to the [Ubuntu packaging people](mailto:ubuntu-motu@lists.ubuntu.com?subject=outdated%20version%20of%20youtube-dl) - all they have to do is update the package to a somewhat recent version. See above for a way to update.\n\n### I'm getting an error when trying to use output template: `error: using output template conflicts with using title, video ID or auto number`\n\nMake sure you are not using `-o` with any of these options `-t`, `--title`, `--id`, `-A` or `--auto-number` set in command line or in a configuration file. Remove the latter if any.\n\n### Do I always have to pass `-citw`?\n\nBy default, youtube-dl intends to have the best options (incidentally, if you have a convincing case that these should be different, [please file an issue where you explain that](https:\u002F\u002Fyt-dl.org\u002Fbug)). Therefore, it is unnecessary and sometimes harmful to copy long option strings from webpages. In particular, the only option out of `-citw` that is regularly useful is `-i`.\n\n### Can you please put the `-b` option back?\n\nMost people asking this question are not aware that youtube-dl now defaults to downloading the highest available quality as reported by YouTube, which will be 1080p or 720p in some cases, so you no longer need the `-b` option. For some specific videos, maybe YouTube does not report them to be available in a specific high quality format you're interested in. In that case, simply request it with the `-f` option and youtube-dl will try to download it.\n\n### I get HTTP error 402 when trying to download a video. What's this?\n\nApparently YouTube requires you to pass a CAPTCHA test if you download too much. We're [considering to provide a way to let you solve the CAPTCHA](https:\u002F\u002Fgithub.com\u002Fytdl-org\u002Fyoutube-dl\u002Fissues\u002F154), but at the moment, your best course of action is pointing a web browser to the youtube URL, solving the CAPTCHA, and restart youtube-dl.\n\n### Do I need any other programs?\n\nyoutube-dl works fine on its own on most sites. However, if you want to convert video\u002Faudio, you'll need [avconv](https:\u002F\u002Flibav.org\u002F) or [ffmpeg](https:\u002F\u002Fwww.ffmpeg.org\u002F). On some sites - most notably YouTube - videos can be retrieved in a higher quality format without sound. youtube-dl will detect whether avconv\u002Fffmpeg is present and automatically pick the best option.\n\nVideos or video formats streamed via RTMP protocol can only be downloaded when [rtmpdump](https:\u002F\u002Frtmpdump.mplayerhq.hu\u002F) is installed. Downloading MMS and RTSP videos requires either [mplayer](https:\u002F\u002Fmplayerhq.hu\u002F) or [mpv](https:\u002F\u002Fmpv.io\u002F) to be installed.\n\n### I have downloaded a video but how can I play it?\n\nOnce the video is fully downloaded, use any video player, such as [mpv](https:\u002F\u002Fmpv.io\u002F), [vlc](https:\u002F\u002Fwww.videolan.org\u002F) or [mplayer](https:\u002F\u002Fwww.mplayerhq.hu\u002F).\n\n### I extracted a video URL with `-g`, but it does not play on another machine \u002F in my web browser.\n\nIt depends a lot on the service. In many cases, requests for the video (to download\u002Fplay it) must come from the same IP address and with the same cookies and\u002For HTTP headers. Use the `--cookies` option to write the required cookies into a file, and advise your downloader to read cookies from that file. Some sites also require a common user agent to be used, use `--dump-user-agent` to see the one in use by youtube-dl. You can also get necessary cookies and HTTP headers from JSON output obtained with `--dump-json`.\n\nIt may be beneficial to use IPv6; in some cases, the restrictions are only applied to IPv4. Some services (sometimes only for a subset of videos) do not restrict the video URL by IP address, cookie, or user-agent, but these are the exception rather than the rule.\n\nPlease bear in mind that some URL protocols are **not** supported by browsers out of the box, including RTMP. If you are using `-g`, your own downloader must support these as well.\n\nIf you want to play the video on a machine that is not running youtube-dl, you can relay the video content from the machine that runs youtube-dl. You can use `-o -` to let youtube-dl stream a video to stdout, or simply allow the player to download the files written by youtube-dl in turn.\n\n### ERROR: no fmt_url_map or conn information found in video info\n\nYouTube has switched to a new video info format in July 2011 which is not supported by old versions of youtube-dl. See [above](#how-do-i-update-youtube-dl) for how to update youtube-dl.\n\n### ERROR: unable to download video\n\nYouTube requires an additional signature since September 2012 which is not supported by old versions of youtube-dl. See [above](#how-do-i-update-youtube-dl) for how to update youtube-dl.\n\n### Video URL contains an ampersand and I'm getting some strange output `[1] 2839` or `'v' is not recognized as an internal or external command`\n\nThat's actually the output from your shell. Since ampersand is one of the special shell characters it's interpreted by the shell preventing you from passing the whole URL to youtube-dl. To disable your shell from interpreting the ampersands (or any other special characters) you have to either put the whole URL in quotes or escape them with a backslash (which approach will work depends on your shell).\n\nFor example if your URL is https:\u002F\u002Fwww.youtube.com\u002Fwatch?t=4&v=BaW_jenozKc you should end up with following command:\n\n```youtube-dl 'https:\u002F\u002Fwww.youtube.com\u002Fwatch?t=4&v=BaW_jenozKc'```\n\nor\n\n```youtube-dl https:\u002F\u002Fwww.youtube.com\u002Fwatch?t=4\\&v=BaW_jenozKc```\n\nFor Windows you have to use the double quotes:\n\n```youtube-dl \"https:\u002F\u002Fwww.youtube.com\u002Fwatch?t=4&v=BaW_jenozKc\"```\n\n### ExtractorError: Could not find JS function u'OF'\n\nIn February 2015, the new YouTube player contained a character sequence in a string that was misinterpreted by old versions of youtube-dl. See [above](#how-do-i-update-youtube-dl) for how to update youtube-dl.\n\n### HTTP Error 429: Too Many Requests or 402: Payment Required\n\nThese two error codes indicate that the service is blocking your IP address because of overuse. Usually this is a soft block meaning that you can gain access again after solving CAPTCHA. Just open a browser and solve a CAPTCHA the service suggests you and after that [pass cookies](#how-do-i-pass-cookies-to-youtube-dl) to youtube-dl. Note that if your machine has multiple external IPs then you should also pass exactly the same IP you've used for solving CAPTCHA with [`--source-address`](#network-options). Also you may need to pass a `User-Agent` HTTP header of your browser with [`--user-agent`](#workarounds).\n\nIf this is not the case (no CAPTCHA suggested to solve by the service) then you can contact the service and ask them to unblock your IP address, or - if you have acquired a whitelisted IP address already - use the [`--proxy` or `--source-address` options](#network-options) to select another IP address.\n\n### SyntaxError: Non-ASCII character\n\nThe error\n\n    File \"youtube-dl\", line 2\n    SyntaxError: Non-ASCII character '\\x93' ...\n\nmeans you're using an outdated version of Python. Please update to Python 2.6 or 2.7.\n\n### What is this binary file? Where has the code gone?\n\nSince June 2012 ([#342](https:\u002F\u002Fgithub.com\u002Fytdl-org\u002Fyoutube-dl\u002Fissues\u002F342)) youtube-dl is packed as an executable zipfile, simply unzip it (might need renaming to `youtube-dl.zip` first on some systems) or clone the git repository, as laid out above. If you modify the code, you can run it by executing the `__main__.py` file. To recompile the executable, run `make youtube-dl`.\n\n### The exe throws an error due to missing `MSVCR100.dll`\n\nTo run the exe you need to install first the [Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package (x86)](https:\u002F\u002Fdownload.microsoft.com\u002Fdownload\u002F1\u002F6\u002F5\u002F165255E7-1014-4D0A-B094-B6A430A6BFFC\u002Fvcredist_x86.exe).\n\n### On Windows, how should I set up ffmpeg and youtube-dl? Where should I put the exe files?\n\nIf you put youtube-dl and ffmpeg in the same directory that you're running the command from, it will work, but that's rather cumbersome.\n\nTo make a different directory work - either for ffmpeg, or for youtube-dl, or for both - simply create the directory (say, `C:\\bin`, or `C:\\Users\\\u003CUser name>\\bin`), put all the executables directly in there, and then [set your PATH environment variable](https:\u002F\u002Fwww.java.com\u002Fen\u002Fdownload\u002Fhelp\u002Fpath.xml) to include that directory.\n\nFrom then on, after restarting your shell, you will be able to access both youtube-dl and ffmpeg (and youtube-dl will be able to find ffmpeg) by simply typing `youtube-dl` or `ffmpeg`, no matter what directory you're in.\n\n### How do I put downloads into a specific folder?\n\nUse the `-o` to specify an [output template](#output-template), for example `-o \"\u002Fhome\u002Fuser\u002Fvideos\u002F%(title)s-%(id)s.%(ext)s\"`. If you want this for all of your downloads, put the option into your [configuration file](#configuration).\n\n### How do I download a video starting with a `-`?\n\nEither prepend `https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=` or separate the ID from the options with `--`:\n\n    youtube-dl -- -wNyEUrxzFU\n    youtube-dl \"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=-wNyEUrxzFU\"\n\n### How do I pass cookies to youtube-dl?\n\nUse the `--cookies` option, for example `--cookies \u002Fpath\u002Fto\u002Fcookies\u002Ffile.txt`.\n\nIn order to extract cookies from browser use any conforming browser extension for exporting cookies. For example, [Get cookies.txt LOCALLY](https:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fget-cookiestxt-locally\u002Fcclelndahbckbenkjhflpdbgdldlbecc) (for Chrome) or [cookies.txt](https:\u002F\u002Faddons.mozilla.org\u002Fen-US\u002Ffirefox\u002Faddon\u002Fcookies-txt\u002F) (for Firefox).\n\nNote that the cookies file must be in Mozilla\u002FNetscape format and the first line of the cookies file must be either `# HTTP Cookie File` or `# Netscape HTTP Cookie File`. Make sure you have correct [newline format](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FNewline) in the cookies file and convert newlines if necessary to correspond with your OS, namely `CRLF` (`\\r\\n`) for Windows and `LF` (`\\n`) for Unix and Unix-like systems (Linux, macOS, etc.). `HTTP Error 400: Bad Request` when using `--cookies` is a good sign of invalid newline format.\n\nPassing cookies to youtube-dl is a good way to workaround login when a particular extractor does not implement it explicitly. Another use case is working around [CAPTCHA](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCAPTCHA) some websites require you to solve in particular cases in order to get access (e.g. YouTube, CloudFlare).\n\n### How do I stream directly to media player?\n\nYou will first need to tell youtube-dl to stream media to stdout with `-o -`, and also tell your media player to read from stdin (it must be capable of this for streaming) and then pipe former to latter. For example, streaming to [vlc](https:\u002F\u002Fwww.videolan.org\u002F) can be achieved with:\n\n    youtube-dl -o - \"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=BaW_jenozKcj\" | vlc -\n\n### How do I download only new videos from a playlist?\n\nUse download-archive feature. With this feature you should initially download the complete playlist with `--download-archive \u002Fpath\u002Fto\u002Fdownload\u002Farchive\u002Ffile.txt` that will record identifiers of all the videos in a special file. Each subsequent run with the same `--download-archive` will download only new videos and skip all videos that have been downloaded before. Note that only successful downloads are recorded in the file.\n\nFor example, at first,\n\n    youtube-dl --download-archive archive.txt \"https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re\"\n\nwill download the complete `PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re` playlist and create a file `archive.txt`. Each subsequent run will only download new videos if any:\n\n    youtube-dl --download-archive archive.txt \"https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re\"\n\n### Should I add `--hls-prefer-native` into my config?\n\nWhen youtube-d","youtube-dl 是一个用于从 YouTube.com 和其他视频网站下载视频的命令行程序。该项目使用 Python 编写，支持多种操作系统如 Unix、Windows 和 macOS，并且能够通过简单的命令行选项来选择视频质量、格式以及输出文件名等。此外，youtube-dl 还提供了自动更新功能以确保用户可以使用最新版本。适合需要批量下载在线视频内容或进行视频备份的个人及开发者使用。","2026-06-17 02:33:16","top_all"]