#download #youtube #write #url #cli

bin+lib ytdl

用 Rust 编写的 youtube 下载、写入 CLI

6 个版本

使用旧的 Rust 2015

0.1.5 2017 年 9 月 2 日
0.1.4 2017 年 7 月 22 日

#362 in 视频

MIT 许可证

41KB
1K SLoC

ytdl

Build Status crate License

一个简单的用于下载 YouTube 视频的 CLI。

安装

使用 cargo。

cargo install ytdl

获取 最新版本

macos

wget https://github.com/cssivision/ytdl/releases/download/v0.1.4/ytdl
chmod +x ytdl

linux

wget https://github.com/cssivision/ytdl/releases/download/v0.1.4/ytdl-linux
chmod +x ytdl-linux

用法

示例

ytdl https://www.youtube.com/watch?v=GbWECt0M3CI
USAGE:
    ytdl [FLAGS] [OPTIONS] <url>

FLAGS:
    -a, --append          append to output file instead of overwriting
    -d, --debug           output debug log
    -u, --download-url    prints download url to stdout
    -h, --help            Prints help information
    -i, --info            only output info
    -j, --json            print info json to stdout
        --no-progress     write output to a file
    -s, --silent          only output error, also diables progressbar
    -V, --version         Prints version information

OPTIONS:
    -f, --filter <FILTER>...            filter available formats, syntax: val1 val2 val3
    -o, --output <FILE>                 write output to a file
    -r, --range <RANGE>                 download a specific range of bytes of the video, [start]-[end]
        --start-offset <STARTOFFSET>    offset the start of the video

ARGS:
    <url>    youtube video url, short url or video id

许可证

所有源代码均受 MIT 许可证 许可。

待办事项

  • 并发下载。

依赖项

~18–28MB
~458K SLoC