该镜像封装了ytdl-org/youtube-dl,可以通过调用docker创建临时容器下载youtube视频,下载完后删除容器。
使用方法
1 |
docker run -it --rm -v ~/downloads:/downloads minirplus/youtube-dl https://www.youtube.com/watch?v=EJr3uAQwGek |
其中, docker run -it --rm -v ~/downloads:/downloads minirplus/youtube-dl 是容器创建命令,其中的 -v ~/downloads:/downloads 是设定本地下载目录,后面的 https://www.youtube.com/watch?v=EJr3uAQwGek 是所需下载的youtube视频地址。
下载过程中,会自动输出下载状态
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=EJr3uAQwGek'] [debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8 [debug] youtube-dl version 2021.06.06 [debug] Python version 3.9.7 (CPython) - Linux-5.10.0-0.bpo.5-amd64-x86_64-with-glibc2.31 [debug] exe versions: none [debug] Proxy map: {} [youtube] EJr3uAQwGek: Downloading webpage [debug] Default format spec: best/bestvideo+bestaudio [debug] Invoking downloader on 'https://r2---sn-i3b7knse.googlevideo.com/videoplayback?expire=1632347209&ei=6U9LYaVjg5CVBIKkqKgG&ip=47.243.164.149&id=o-AOTiEl05JPiD5_WMeQY02SiKFtHWUi09izRmAAgpkYB9&itag=22&source=youtube&requiressl=yes&mh=OH&mm=31%2C26&mn=sn-i3b7knse%2Csn-un57sn7s&ms=au%2Conr&mv=m&mvi=2&pl=16&initcwndbps=753750&vprv=1&mime=video%2Fmp4&ns=DWLStrRkTf-RQl8lOGT8NMAG&ratebypass=yes&dur=100.704&lmt=1615563989724755&mt=1632325501&fvip=2&fexp=24001373%2C24007246&beids=9466587&c=WEB&txp=5432434&n=haW58YA26DbX0HUg&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRAIgSy3-QlbLrJBb_PNr6KBoO3bsjtbz0FRKspxuPXy_locCIEWbaAXzZQ9ArwuGzdtSE4XPFurnaN8mS3oBJqTiHv6a&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgBfZEQzq9ETDpCptTEtKpbm0yYXjc4GnY-RmFo0HkWpsCIQD0hX3fQUfDxhuRNl6NFaGsebdEncILLrF8M0h11Ri92w%3D%3D' [download] 2021 LG OLED 8K l Redwoods 8K HDR 60fps-EJr3uAQwGek.mp4 has already been downloaded [download] 100% of 35.85MiB |
下载完成后,容器会自动删除,下载的视频可以在~/downloads目录中查看。
There are no comments yet