{"id":954,"date":"2012-11-29T14:49:13","date_gmt":"2012-11-29T06:49:13","guid":{"rendered":"http:\/\/blog.hoyo.idv.tw\/?p=954"},"modified":"2021-07-30T22:13:16","modified_gmt":"2021-07-30T14:13:16","slug":"youtube-%e4%b8%8b%e8%bc%89%e7%a5%9e%e5%85%b5-youtube-dl","status":"publish","type":"post","link":"https:\/\/blog.hoyo.idv.tw\/?p=954","title":{"rendered":"youtube-dl - Youtube \u4e0b\u8f09\u795e\u5175"},"content":{"rendered":"<p>--<\/p>\n<h2>\u5b98\u7db2<\/h2>\n<ul>\n<li><a href=\"http:\/\/yt-dl.org\/\" target=\"_blank\" rel=\"noopener\">youtube-dl downloads<\/a><\/li>\n<li><a href=\"http:\/\/rg3.github.com\/youtube-dl\/\" target=\"_blank\" rel=\"noopener\">youtube-dl<\/a><\/li>\n<\/ul>\n<pre class=\"\">youtube-dl is a small command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.x (x being at least 6), and it is not platform specific. It should work in your Unix box, in Windows or in Mac OS X. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.<\/pre>\n<p>\u7bc4\u4f8b\uff1a\u6700\u4f73\u97f3\u3001\u756b\u8cea<\/p>\n<ul>\n<li><a class=\"question-hyperlink\" href=\"https:\/\/stackoverflow.com\/questions\/31631535\/youtube-dl-dash-video-and-audio-in-highest-quality-without-human-intervention\" target=\"_blank\" rel=\"noopener\">youtube-dl DASH video and audio in highest quality without human intervention<\/a><\/li>\n<\/ul>\n<pre class=\"lang:default decode:true brush: bash; gutter: true \">youtube-dl -f bestvideo+bestaudio\/best https:\/\/www.youtube.com\/watch?v=NUOCr3MMe3A<\/pre>\n<p>\u73fe\u5728 Youtube \u8996\u8a0a\u3001\u97f3\u8a0a\u90fd\u662f\u5206\u958b\u7684\uff0cyoutube-dl \u6703\u81ea\u52d5\u5408\u4f75\uff0c\u524d\u63d0\u662f\u53ef\u4ee5\u57f7\u884c ffmpeg\uff0c\u6700\u7c21\u55ae\u7684\u6700\u6cd5\u662f\u5c07 ffmpeg \u8907\u88fd\u5230 youtube-dl \u76f8\u540c\u8def\u5f91\u4e0b<\/p>\n<p>--<\/p>\n<h2>\u5e38\u7528\u6307\u4ee4\u53c3\u6578\u8aaa\u660e<\/h2>\n<ul>\n<li>-U \u5347\u7d1a\uff0c\u6bcf\u6b21\u4f7f\u7528\u524d\u6700\u597d\u5148\u4f7f\u7528 -U \u6aa2\u67e5\u662f\u5426\u6709\u65b0\u7248\u672c<\/li>\n<li>-t \u4e0b\u8f09\u7684\u6a94\u6848\u4f7f\u7528\u7db2\u9801\u6a19\u984c\u547d\u540d &lt;title&gt;xxx&lt;\/title&gt;<\/li>\n<li>-c \u4e0d\u7ba1\u932f\u8aa4\uff0c\u7e7c\u7e8c\u57f7\u884c<\/li>\n<li>-i \u5ffd\u7565\u932f\u8aa4<\/li>\n<\/ul>\n<p>youtube-dl \u53ef\u4ee5\u76f4\u63a5\u4e1f\u64ad\u653e\u6e05\u55ae\u7db2\u5740\uff0c\u4ed6\u6703\u4e0b\u8f09\u6574\u500b\u6e05\u55ae\u5f71\u7247<\/p>\n<pre class=\"nums:false lang:default decode:true brush: bash; gutter: true\"># youtube-dl -ct \"http:\/\/www.youtube.com\/watch?v=dKDqR5IR0UU&amp;list=PLE3BEC72FE55FDB0F\"<\/pre>\n<p>youtube-dl \u751a\u81f3\u53ef\u4ee5\u4e1f\u4f7f\u7528\u8005\u7db2\u5740\uff0c\u4ed6\u6703\u4e0b\u8f09\u6574\u500b\u4f7f\u7528\u8005\u5f71\u7247<\/p>\n<pre class=\"nums:false lang:default decode:true\"># youtube-dl -ct \"http:\/\/www.youtube.com\/user\/dan201\/videos?flow=grid&amp;view=1\"<\/pre>\n<p>\u6ce8\u610f\uff1a\u4ee5\u4e0a\u7bc4\u4f8b\u6307\u4ee4\u8acb\u659f\u914c\u983b\u5bec\u53ca\u786c\u789f\u7a7a\u9593\u4f7f\u7528<\/p>\n<p>\u266a \u5ffd\u7565\u932f\u8aa4\u53ef\u518d\u52a0\u4e0a i \u53c3\u6578\u5373\u53ef<\/p>\n<h2>\u53ea\u6311\u9078\u7b26\u5408\u689d\u4ef6\u00a0--match-title<\/h2>\n<p>\u53ea\u6293\u6a19\u984c\u70ba\u00a0\u91d1\u5934\u8111 \u7684\u5f71\u7247<\/p>\n<pre class=\"nums:false lang:default decode:true\">youtube-dl -cti --match-title \"\u91d1\u5934\u8111\" \"http:\/\/www.youtube.com\/user\/LiveTvTaiwan\/videos\"\r\n<\/pre>\n<p class=\"nums:false lang:default decode:true \">--<\/p>\n<h2 class=\"nums:false lang:default decode:true \">\u4e0b\u8f09 audio<\/h2>\n<p>\u4f7f\u7528 -F \u5217\u51fa\u53ef\u4e0b\u8f09\u683c\u5f0f\uff0c\u7136\u5f8c\u4f7f\u7528 -f xxx \u6307\u5b9a Bit rate \u6700\u9ad8\u7684\u4e0b\u8f09\u5373\u53ef<\/p>\n<pre class=\"nums:false lang:default decode:true\">&gt;youtube-dl.exe -F https:\/\/www.youtube.com\/watch?v=RmuL-BPFi2Q\r\n[youtube] RmuL-BPFi2Q: Downloading webpage\r\n[youtube] RmuL-BPFi2Q: Downloading player 3c3086a1\r\n[info] Available formats for RmuL-BPFi2Q:\r\nformat code  extension  resolution note\r\n249          webm       audio only tiny   51k , webm_dash container, opus @ 51k (48000Hz), 1.51MiB\r\n250          webm       audio only tiny   67k , webm_dash container, opus @ 67k (48000Hz), 2.00MiB\r\n140          m4a        audio only tiny  129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 3.81MiB\r\n251          webm       audio only tiny  133k , webm_dash container, opus @133k (48000Hz), 3.94MiB\r\n... \u4e0b\u7565\uff0c\u5168\u90e8\u90fd\u662f\u8996\u8a0a<\/pre>\n<p>\u7136\u5f8c\u5c31\u53ef\u4ee5\u6307\u5b9a\u4e0b\u8f09<\/p>\n<pre class=\"lang:default decode:true  \">&gt;youtube-dl.exe -f 251 https:\/\/www.youtube.com\/watch?v=RmuL-BPFi2Q<\/pre>\n<p class=\"nums:false lang:default decode:true \">--<\/p>\n<h2>\u5e38\u7528\u53c3\u6578<\/h2>\n<pre class=\"lang:default decode:true\">&gt; youtube-dl -cki -f best --no-part --no-check-certificate \"\"<\/pre>\n<ul>\n<li>-cki \u5f37\u5236\u6062\u5fa9\u4e0b\u8f09\u3001\u5ffd\u7565\u932f\u8aa4\u3001<\/li>\n<li>-f best \u53ef\u4ee5\u4e0b\u8f09\u7684\u6700\u4f73\u756b\u8cea<\/li>\n<li>--no-check-certificate \u4e0d\u6aa2\u67e5\u8a8d\u8b49\u8b49\u66f8<\/li>\n<li>-F\u00a0 --list-formats \u5217\u51fa\u8acb\u6c42\u7684\u6240\u6709\u53ef\u7528\u683c\u5f0f<\/li>\n<li>-f --format \u4e0b\u8f09\u683c\u5f0f\u4ee3\u78bc (format code \u8a73\u898b -F)<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true\">format code  extension  resolution note\r\n249          webm       audio only tiny   50k , webm_dash container, opus @ 50k (48000Hz), 10.18MiB\r\n250          webm       audio only tiny   65k , webm_dash container, opus @ 65k (48000Hz), 13.41MiB\r\n140          m4a        audio only tiny  129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 26.34MiB\r\n251          webm       audio only tiny  130k , webm_dash container, opus @130k (48000Hz), 26.46MiB\r\n278          webm       256x144    144p   89k , webm_dash container, vp9@  89k, 30fps, video only, 18.26MiB\r\n160          mp4        256x144    144p  101k , mp4_dash container, avc1.4d400c@ 101k, 30fps, video only, 20.63MiB\r\n394          mp4        256x144    144p  115k , mp4_dash container, av01.0.00M.08@ 115k, 30fps, video only, 23.53MiB\r\n242          webm       426x240    240p  190k , webm_dash container, vp9@ 190k, 30fps, video only, 38.65MiB\r\n133          mp4        426x240    240p  219k , mp4_dash container, avc1.4d4015@ 219k, 30fps, video only, 44.61MiB\r\n395          mp4        426x240    240p  279k , mp4_dash container, av01.0.00M.08@ 279k, 30fps, video only, 56.89MiB\r\n243          webm       640x360    360p  403k , webm_dash container, vp9@ 403k, 30fps, video only, 82.17MiB\r\n396          mp4        640x360    360p  474k , mp4_dash container, av01.0.01M.08@ 474k, 30fps, video only, 96.61MiB\r\n134          mp4        640x360    360p  489k , mp4_dash container, avc1.4d401e@ 489k, 30fps, video only, 99.48MiB\r\n244          webm       854x480    480p  716k , webm_dash container, vp9@ 716k, 30fps, video only, 145.68MiB\r\n135          mp4        854x480    480p  789k , mp4_dash container, avc1.4d401f@ 789k, 30fps, video only, 160.53MiB\r\n397          mp4        854x480    480p  808k , mp4_dash container, av01.0.04M.08@ 808k, 30fps, video only, 164.52MiB\r\n136          mp4        1280x720   720p 1223k , mp4_dash container, avc1.4d401f@1223k, 30fps, video only, 248.89MiB\r\n247          webm       1280x720   720p 1401k , webm_dash container, vp9@1401k, 30fps, video only, 285.11MiB\r\n398          mp4        1280x720   720p 1613k , mp4_dash container, av01.0.05M.08@1613k, 30fps, video only, 328.18MiB\r\n399          mp4        1920x1080  1080p 2330k , mp4_dash container, av01.0.08M.08@2330k, 30fps, video only, 474.17MiB\r\n248          webm       1920x1080  1080p 2429k , webm_dash container, vp9@2429k, 30fps, video only, 494.29MiB\r\n137          mp4        1920x1080  1080p 3340k , mp4_dash container, avc1.640028@3340k, 30fps, video only, 679.57MiB\r\n18           mp4        640x360    360p  706k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 143.69MiB (best)<\/pre>\n<p>--<\/p>\n<h2>Audio Only<\/h2>\n<ul>\n<li><a class=\"question-hyperlink\" href=\"https:\/\/askubuntu.com\/questions\/423508\/can-i-directly-download-audio-using-youtube-dl\" target=\"_blank\" rel=\"noopener\">Can I directly download audio using youtube-dl?<\/a><\/li>\n<\/ul>\n<p>\u5148\u4f7f\u7528 -F \u67e5\u8a62\u662f\u5426\u6709\u7d14\u97f3\u6e90\u7684\u683c\u5f0f\uff0c\u5982\u679c\u6709\u4f7f\u7528 -f \u6307\u5b9a\u683c\u5f0f\u4e0b\u8f09<\/p>\n<pre class=\"lang:default decode:true \">&gt; youtube-dl -F http:\/\/www.youtube.com\/watch?v=xxxxxx\r\n&gt; youtube-dl -f 140 http:\/\/www.youtube.com\/watch?v=xxxxx<\/pre>\n<p>--<\/p>\n<h2>\u65e9\u671f\u9650\u5236\u6d41\u91cf\u932f\u8aa4<\/h2>\n<p>\u5674\u4e86 HTTP Error 402 : Payment Required\u00a0\u7684\u932f\u8aa4\uff0c<\/p>\n<pre class=\"lang:default decode:true brush: bash; gutter: true\">ERROR: content too short (expected 291225570 bytes and served 188742968)\r\nERROR: unable to download video info webpage: HTTP Error 402: Payment Required<\/pre>\n<p>\u627e\u4e00\u53f0 Windows \u9032\u5165 youtube \u5c31\u53ef\u4ee5\u770b\u5230\uff1a<\/p>\n<p><a href=\"https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2012\/11\/\u5716\u7247-021.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\"><img loading=\"lazy\" class=\"alignnone wp-image-988 size-medium\" title=\"\" src=\"https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2012\/11\/\u5716\u7247-021-300x142.png\" alt=\"\" width=\"300\" height=\"142\" srcset=\"https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2012\/11\/\u5716\u7247-021-300x142.png 300w, https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2012\/11\/\u5716\u7247-021-500x237.png 500w, https:\/\/blog.hoyo.idv.tw\/wp-content\/uploads\/2012\/11\/\u5716\u7247-021.png 861w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>--<\/p>\n<h2>--help<\/h2>\n<pre class=\"lang:default decode:true\">Usage: youtube-dl [OPTIONS] URL [URL...]\r\n\r\nOptions:\r\n  General Options:\r\n    -h, --help                           Print this help text and exit\r\n    --version                            Print program version and exit\r\n    -U, --update                         Update this program to latest version.\r\n                                         Make sure that you have sufficient\r\n                                         permissions (run with sudo if needed)\r\n    -i, --ignore-errors                  Continue on download errors, for\r\n                                         example to skip unavailable videos in a\r\n                                         playlist\r\n    --abort-on-error                     Abort downloading of further videos (in\r\n                                         the playlist or the command line) if an\r\n                                         error occurs\r\n    --dump-user-agent                    Display the current browser\r\n                                         identification\r\n    --list-extractors                    List all supported extractors\r\n    --extractor-descriptions             Output descriptions of all supported\r\n                                         extractors\r\n    --force-generic-extractor            Force extraction to use the generic\r\n                                         extractor\r\n    --default-search PREFIX              Use this prefix for unqualified URLs.\r\n                                         For example \"gvsearch2:\" downloads two\r\n                                         videos from google videos for youtube-\r\n                                         dl \"large apple\". Use the value \"auto\"\r\n                                         to let youtube-dl guess (\"auto_warning\"\r\n                                         to emit a warning when guessing).\r\n                                         \"error\" just throws an error. The\r\n                                         default value \"fixup_error\" repairs\r\n                                         broken URLs, but emits an error if this\r\n                                         is not possible instead of searching.\r\n    --ignore-config                      Do not read configuration files. When\r\n                                         given in the global configuration file\r\n                                         \/etc\/youtube-dl.conf: Do not read the\r\n                                         user configuration in ~\/.config\r\n                                         \/youtube-dl\/config (%APPDATA%\/youtube-\r\n                                         dl\/config.txt on Windows)\r\n    --config-location PATH               Location of the configuration file;\r\n                                         either the path to the config or its\r\n                                         containing directory.\r\n    --flat-playlist                      Do not extract the videos of a\r\n                                         playlist, only list them.\r\n    --mark-watched                       Mark videos watched (YouTube only)\r\n    --no-mark-watched                    Do not mark videos watched (YouTube\r\n                                         only)\r\n    --no-color                           Do not emit color codes in output\r\n\r\n  Network Options:\r\n    --proxy URL                          Use the specified HTTP\/HTTPS\/SOCKS\r\n                                         proxy. To enable SOCKS proxy, specify a\r\n                                         proper scheme. For example\r\n                                         socks5:\/\/127.0.0.1:1080\/. Pass in an\r\n                                         empty string (--proxy \"\") for direct\r\n                                         connection\r\n    --socket-timeout SECONDS             Time to wait before giving up, in\r\n                                         seconds\r\n    --source-address IP                  Client-side IP address to bind to\r\n    -4, --force-ipv4                     Make all connections via IPv4\r\n    -6, --force-ipv6                     Make all connections via IPv6\r\n\r\n  Geo Restriction:\r\n    --geo-verification-proxy URL         Use this proxy to verify the IP address\r\n                                         for some geo-restricted sites. The\r\n                                         default proxy specified by --proxy (or\r\n                                         none, if the option is not present) is\r\n                                         used for the actual downloading.\r\n    --geo-bypass                         Bypass geographic restriction via\r\n                                         faking X-Forwarded-For HTTP header\r\n    --no-geo-bypass                      Do not bypass geographic restriction\r\n                                         via faking X-Forwarded-For HTTP header\r\n    --geo-bypass-country CODE            Force bypass geographic restriction\r\n                                         with explicitly provided two-letter ISO\r\n                                         3166-2 country code\r\n    --geo-bypass-ip-block IP_BLOCK       Force bypass geographic restriction\r\n                                         with explicitly provided IP block in\r\n                                         CIDR notation\r\n\r\n  Video Selection:\r\n    --playlist-start NUMBER              Playlist video to start at (default is\r\n                                         1)\r\n    --playlist-end NUMBER                Playlist video to end at (default is\r\n                                         last)\r\n    --playlist-items ITEM_SPEC           Playlist video items to download.\r\n                                         Specify indices of the videos in the\r\n                                         playlist separated by commas like:\r\n                                         \"--playlist-items 1,2,5,8\" if you want\r\n                                         to download videos indexed 1, 2, 5, 8\r\n                                         in the playlist. You can specify range:\r\n                                         \"--playlist-items 1-3,7,10-13\", it will\r\n                                         download the videos at index 1, 2, 3,\r\n                                         7, 10, 11, 12 and 13.\r\n    --match-title REGEX                  Download only matching titles (regex or\r\n                                         caseless sub-string)\r\n    --reject-title REGEX                 Skip download for matching titles\r\n                                         (regex or caseless sub-string)\r\n    --max-downloads NUMBER               Abort after downloading NUMBER files\r\n    --min-filesize SIZE                  Do not download any videos smaller than\r\n                                         SIZE (e.g. 50k or 44.6m)\r\n    --max-filesize SIZE                  Do not download any videos larger than\r\n                                         SIZE (e.g. 50k or 44.6m)\r\n    --date DATE                          Download only videos uploaded in this\r\n                                         date\r\n    --datebefore DATE                    Download only videos uploaded on or\r\n                                         before this date (i.e. inclusive)\r\n    --dateafter DATE                     Download only videos uploaded on or\r\n                                         after this date (i.e. inclusive)\r\n    --min-views COUNT                    Do not download any videos with less\r\n                                         than COUNT views\r\n    --max-views COUNT                    Do not download any videos with more\r\n                                         than COUNT views\r\n    --match-filter FILTER                Generic video filter. Specify any key\r\n                                         (see the \"OUTPUT TEMPLATE\" for a list\r\n                                         of available keys) to match if the key\r\n                                         is present, !key to check if the key is\r\n                                         not present, key &gt; NUMBER (like\r\n                                         \"comment_count &gt; 12\", also works with\r\n                                         &gt;=, &lt;, &lt;=, !=, =) to compare against a\r\n                                         number, key = 'LITERAL' (like \"uploader\r\n                                         = 'Mike Smith'\", also works with !=) to\r\n                                         match against a string literal and &amp; to\r\n                                         require multiple matches. Values which\r\n                                         are not known are excluded unless you\r\n                                         put a question mark (?) after the\r\n                                         operator. For example, to only match\r\n                                         videos that have been liked more than\r\n                                         100 times and disliked less than 50\r\n                                         times (or the dislike functionality is\r\n                                         not available at the given service),\r\n                                         but who also have a description, use\r\n                                         --match-filter \"like_count &gt; 100 &amp;\r\n                                         dislike_count &lt;? 50 &amp; description\" .\r\n    --no-playlist                        Download only the video, if the URL\r\n                                         refers to a video and a playlist.\r\n    --yes-playlist                       Download the playlist, if the URL\r\n                                         refers to a video and a playlist.\r\n    --age-limit YEARS                    Download only videos suitable for the\r\n                                         given age\r\n    --download-archive FILE              Download only videos not listed in the\r\n                                         archive file. Record the IDs of all\r\n                                         downloaded videos in it.\r\n    --include-ads                        Download advertisements as well\r\n                                         (experimental)\r\n\r\n  Download Options:\r\n    -r, --limit-rate RATE                Maximum download rate in bytes per\r\n                                         second (e.g. 50K or 4.2M)\r\n    -R, --retries RETRIES                Number of retries (default is 10), or\r\n                                         \"infinite\".\r\n    --fragment-retries RETRIES           Number of retries for a fragment\r\n                                         (default is 10), or \"infinite\" (DASH,\r\n                                         hlsnative and ISM)\r\n    --skip-unavailable-fragments         Skip unavailable fragments (DASH,\r\n                                         hlsnative and ISM)\r\n    --abort-on-unavailable-fragment      Abort downloading when some fragment is\r\n                                         not available\r\n    --keep-fragments                     Keep downloaded fragments on disk after\r\n                                         downloading is finished; fragments are\r\n                                         erased by default\r\n    --buffer-size SIZE                   Size of download buffer (e.g. 1024 or\r\n                                         16K) (default is 1024)\r\n    --no-resize-buffer                   Do not automatically adjust the buffer\r\n                                         size. By default, the buffer size is\r\n                                         automatically resized from an initial\r\n                                         value of SIZE.\r\n    --http-chunk-size SIZE               Size of a chunk for chunk-based HTTP\r\n                                         downloading (e.g. 10485760 or 10M)\r\n                                         (default is disabled). May be useful\r\n                                         for bypassing bandwidth throttling\r\n                                         imposed by a webserver (experimental)\r\n    --playlist-reverse                   Download playlist videos in reverse\r\n                                         order\r\n    --playlist-random                    Download playlist videos in random\r\n                                         order\r\n    --xattr-set-filesize                 Set file xattribute ytdl.filesize with\r\n                                         expected file size\r\n    --hls-prefer-native                  Use the native HLS downloader instead\r\n                                         of ffmpeg\r\n    --hls-prefer-ffmpeg                  Use ffmpeg instead of the native HLS\r\n                                         downloader\r\n    --hls-use-mpegts                     Use the mpegts container for HLS\r\n                                         videos, allowing to play the video\r\n                                         while downloading (some players may not\r\n                                         be able to play it)\r\n    --external-downloader COMMAND        Use the specified external downloader.\r\n                                         Currently supports aria2c,avconv,axel,c\r\n                                         url,ffmpeg,httpie,wget\r\n    --external-downloader-args ARGS      Give these arguments to the external\r\n                                         downloader\r\n\r\n  Filesystem Options:\r\n    -a, --batch-file FILE                File containing URLs to download ('-'\r\n                                         for stdin), one URL per line. Lines\r\n                                         starting with '#', ';' or ']' are\r\n                                         considered as comments and ignored.\r\n    --id                                 Use only video ID in file name\r\n    -o, --output TEMPLATE                Output filename template, see the\r\n                                         \"OUTPUT TEMPLATE\" for all the info\r\n    --output-na-placeholder PLACEHOLDER  Placeholder value for unavailable meta\r\n                                         fields in output filename template\r\n                                         (default is \"NA\")\r\n    --autonumber-start NUMBER            Specify the start value for\r\n                                         %(autonumber)s (default is 1)\r\n    --restrict-filenames                 Restrict filenames to only ASCII\r\n                                         characters, and avoid \"&amp;\" and spaces in\r\n                                         filenames\r\n    -w, --no-overwrites                  Do not overwrite files\r\n    -c, --continue                       Force resume of partially downloaded\r\n                                         files. By default, youtube-dl will\r\n                                         resume downloads if possible.\r\n    --no-continue                        Do not resume partially downloaded\r\n                                         files (restart from beginning)\r\n    --no-part                            Do not use .part files - write directly\r\n                                         into output file\r\n    --no-mtime                           Do not use the Last-modified header to\r\n                                         set the file modification time\r\n    --write-description                  Write video description to a\r\n                                         .description file\r\n    --write-info-json                    Write video metadata to a .info.json\r\n                                         file\r\n    --write-annotations                  Write video annotations to a\r\n                                         .annotations.xml file\r\n    --load-info-json FILE                JSON file containing the video\r\n                                         information (created with the \"--write-\r\n                                         info-json\" option)\r\n    --cookies FILE                       File to read cookies from and dump\r\n                                         cookie jar in\r\n    --cache-dir DIR                      Location in the filesystem where\r\n                                         youtube-dl can store some downloaded\r\n                                         information permanently. By default\r\n                                         $XDG_CACHE_HOME\/youtube-dl or ~\/.cache\r\n                                         \/youtube-dl . At the moment, only\r\n                                         YouTube player files (for videos with\r\n                                         obfuscated signatures) are cached, but\r\n                                         that may change.\r\n    --no-cache-dir                       Disable filesystem caching\r\n    --rm-cache-dir                       Delete all filesystem cache files\r\n\r\n  Thumbnail images:\r\n    --write-thumbnail                    Write thumbnail image to disk\r\n    --write-all-thumbnails               Write all thumbnail image formats to\r\n                                         disk\r\n    --list-thumbnails                    Simulate and list all available\r\n                                         thumbnail formats\r\n\r\n  Verbosity \/ Simulation Options:\r\n    -q, --quiet                          Activate quiet mode\r\n    --no-warnings                        Ignore warnings\r\n    -s, --simulate                       Do not download the video and do not\r\n                                         write anything to disk\r\n    --skip-download                      Do not download the video\r\n    -g, --get-url                        Simulate, quiet but print URL\r\n    -e, --get-title                      Simulate, quiet but print title\r\n    --get-id                             Simulate, quiet but print id\r\n    --get-thumbnail                      Simulate, quiet but print thumbnail URL\r\n    --get-description                    Simulate, quiet but print video\r\n                                         description\r\n    --get-duration                       Simulate, quiet but print video length\r\n    --get-filename                       Simulate, quiet but print output\r\n                                         filename\r\n    --get-format                         Simulate, quiet but print output format\r\n    -j, --dump-json                      Simulate, quiet but print JSON\r\n                                         information. See the \"OUTPUT TEMPLATE\"\r\n                                         for a description of available keys.\r\n    -J, --dump-single-json               Simulate, quiet but print JSON\r\n                                         information for each command-line\r\n                                         argument. If the URL refers to a\r\n                                         playlist, dump the whole playlist\r\n                                         information in a single line.\r\n    --print-json                         Be quiet and print the video\r\n                                         information as JSON (video is still\r\n                                         being downloaded).\r\n    --newline                            Output progress bar as new lines\r\n    --no-progress                        Do not print progress bar\r\n    --console-title                      Display progress in console titlebar\r\n    -v, --verbose                        Print various debugging information\r\n    --dump-pages                         Print downloaded pages encoded using\r\n                                         base64 to debug problems (very verbose)\r\n    --write-pages                        Write downloaded intermediary pages to\r\n                                         files in the current directory to debug\r\n                                         problems\r\n    --print-traffic                      Display sent and read HTTP traffic\r\n    -C, --call-home                      Contact the youtube-dl server for\r\n                                         debugging\r\n    --no-call-home                       Do NOT contact the youtube-dl server\r\n                                         for debugging\r\n\r\n  Workarounds:\r\n    --encoding ENCODING                  Force the specified encoding\r\n                                         (experimental)\r\n    --no-check-certificate               Suppress HTTPS certificate validation\r\n    --prefer-insecure                    Use an unencrypted connection to\r\n                                         retrieve information about the video.\r\n                                         (Currently supported only for YouTube)\r\n    --user-agent UA                      Specify a custom user agent\r\n    --referer URL                        Specify a custom referer, use if the\r\n                                         video access is restricted to one\r\n                                         domain\r\n    --add-header FIELD:VALUE             Specify a custom HTTP header and its\r\n                                         value, separated by a colon ':'. You\r\n                                         can use this option multiple times\r\n    --bidi-workaround                    Work around terminals that lack\r\n                                         bidirectional text support. Requires\r\n                                         bidiv or fribidi executable in PATH\r\n    --sleep-interval SECONDS             Number of seconds to sleep before each\r\n                                         download when used alone or a lower\r\n                                         bound of a range for randomized sleep\r\n                                         before each download (minimum possible\r\n                                         number of seconds to sleep) when used\r\n                                         along with --max-sleep-interval.\r\n    --max-sleep-interval SECONDS         Upper bound of a range for randomized\r\n                                         sleep before each download (maximum\r\n                                         possible number of seconds to sleep).\r\n                                         Must only be used along with --min-\r\n                                         sleep-interval.\r\n\r\n  Video Format Options:\r\n    -f, --format FORMAT                  Video format code, see the \"FORMAT\r\n                                         SELECTION\" for all the info\r\n    --all-formats                        Download all available video formats\r\n    --prefer-free-formats                Prefer free video formats unless a\r\n                                         specific one is requested\r\n    -F, --list-formats                   List all available formats of requested\r\n                                         videos\r\n    --youtube-skip-dash-manifest         Do not download the DASH manifests and\r\n                                         related data on YouTube videos\r\n    --merge-output-format FORMAT         If a merge is required (e.g.\r\n                                         bestvideo+bestaudio), output to given\r\n                                         container format. One of mkv, mp4, ogg,\r\n                                         webm, flv. Ignored if no merge is\r\n                                         required\r\n\r\n  Subtitle Options:\r\n    --write-sub                          Write subtitle file\r\n    --write-auto-sub                     Write automatically generated subtitle\r\n                                         file (YouTube only)\r\n    --all-subs                           Download all the available subtitles of\r\n                                         the video\r\n    --list-subs                          List all available subtitles for the\r\n                                         video\r\n    --sub-format FORMAT                  Subtitle format, accepts formats\r\n                                         preference, for example: \"srt\" or\r\n                                         \"ass\/srt\/best\"\r\n    --sub-lang LANGS                     Languages of the subtitles to download\r\n                                         (optional) separated by commas, use\r\n                                         --list-subs for available language tags\r\n\r\n  Authentication Options:\r\n    -u, --username USERNAME              Login with this account ID\r\n    -p, --password PASSWORD              Account password. If this option is\r\n                                         left out, youtube-dl will ask\r\n                                         interactively.\r\n    -2, --twofactor TWOFACTOR            Two-factor authentication code\r\n    -n, --netrc                          Use .netrc authentication data\r\n    --video-password PASSWORD            Video password (vimeo, youku)\r\n\r\n  Adobe Pass Options:\r\n    --ap-mso MSO                         Adobe Pass multiple-system operator (TV\r\n                                         provider) identifier, use --ap-list-mso\r\n                                         for a list of available MSOs\r\n    --ap-username USERNAME               Multiple-system operator account login\r\n    --ap-password PASSWORD               Multiple-system operator account\r\n                                         password. If this option is left out,\r\n                                         youtube-dl will ask interactively.\r\n    --ap-list-mso                        List all supported multiple-system\r\n                                         operators\r\n\r\n  Post-processing Options:\r\n    -x, --extract-audio                  Convert video files to audio-only files\r\n                                         (requires ffmpeg\/avconv and\r\n                                         ffprobe\/avprobe)\r\n    --audio-format FORMAT                Specify audio format: \"best\", \"aac\",\r\n                                         \"flac\", \"mp3\", \"m4a\", \"opus\", \"vorbis\",\r\n                                         or \"wav\"; \"best\" by default; No effect\r\n                                         without -x\r\n    --audio-quality QUALITY              Specify ffmpeg\/avconv audio quality,\r\n                                         insert a value between 0 (better) and 9\r\n                                         (worse) for VBR or a specific bitrate\r\n                                         like 128K (default 5)\r\n    --recode-video FORMAT                Encode the video to another format if\r\n                                         necessary (currently supported:\r\n                                         mp4|flv|ogg|webm|mkv|avi)\r\n    --postprocessor-args ARGS            Give these arguments to the\r\n                                         postprocessor\r\n    -k, --keep-video                     Keep the video file on disk after the\r\n                                         post-processing; the video is erased by\r\n                                         default\r\n    --no-post-overwrites                 Do not overwrite post-processed files;\r\n                                         the post-processed files are\r\n                                         overwritten by default\r\n    --embed-subs                         Embed subtitles in the video (only for\r\n                                         mp4, webm and mkv videos)\r\n    --embed-thumbnail                    Embed thumbnail in the audio as cover\r\n                                         art\r\n    --add-metadata                       Write metadata to the video file\r\n    --metadata-from-title FORMAT         Parse additional metadata like song\r\n                                         title \/ artist from the video title.\r\n                                         The format syntax is the same as\r\n                                         --output. Regular expression with named\r\n                                         capture groups may also be used. The\r\n                                         parsed parameters replace existing\r\n                                         values. Example: --metadata-from-title\r\n                                         \"%(artist)s - %(title)s\" matches a\r\n                                         title like \"Coldplay - Paradise\".\r\n                                         Example (regex): --metadata-from-title\r\n                                         \"(?P&lt;artist&gt;.+?) - (?P&lt;title&gt;.+)\"\r\n    --xattrs                             Write metadata to the video file's\r\n                                         xattrs (using dublin core and xdg\r\n                                         standards)\r\n    --fixup POLICY                       Automatically correct known faults of\r\n                                         the file. One of never (do nothing),\r\n                                         warn (only emit a warning),\r\n                                         detect_or_warn (the default; fix file\r\n                                         if we can, warn otherwise)\r\n    --prefer-avconv                      Prefer avconv over ffmpeg for running\r\n                                         the postprocessors\r\n    --prefer-ffmpeg                      Prefer ffmpeg over avconv for running\r\n                                         the postprocessors (default)\r\n    --ffmpeg-location PATH               Location of the ffmpeg\/avconv binary;\r\n                                         either the path to the binary or its\r\n                                         containing directory.\r\n    --exec CMD                           Execute a command on the file after\r\n                                         downloading and post-processing,\r\n                                         similar to find's -exec syntax.\r\n                                         Example: --exec 'adb push {}\r\n                                         \/sdcard\/Music\/ &amp;&amp; rm {}'\r\n    --convert-subs FORMAT                Convert the subtitles to other format\r\n                                         (currently supported: srt|ass|vtt|lrc)<\/pre>\n<p>--<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"954\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;1,509&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>-- \u5b98\u7db2 youtube-d...<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p class=\"pvc_stats all \" data-element-id=\"954\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> &nbsp;1,509&nbsp;total views<\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[31],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/954"}],"collection":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=954"}],"version-history":[{"count":36,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/954\/revisions"}],"predecessor-version":[{"id":8639,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/954\/revisions\/8639"}],"wp:attachment":[{"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hoyo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}