Crates.io | rustypipe-downloader |
lib.rs | rustypipe-downloader |
version | 0.2.4 |
source | src |
created_at | 2024-08-18 01:30:05.247791 |
updated_at | 2024-11-10 14:07:32.412487 |
description | Downloader extension for RustyPipe |
homepage | |
repository | https://codeberg.org/ThetaDev/rustypipe |
max_upload_size | |
id | 1342214 |
size | 69,218 |
The downloader is a companion crate for RustyPipe that allows for easy and fast downloading of video and audio files.
indicatif
feature to use)audiotag
feature to use)For the downloader to work, you need to have ffmpeg installed on your system. If your
ffmpeg binary is located at a non-standard path, you can configure the location using
[DownloaderBuilder::ffmpeg
].
At first you have to instantiate and configure the downloader using either
[Downloader::new
] or the [DownloaderBuilder
].
Then you can build a new download query with a video ID, stream filter and destination path and finally download the video.
use rustypipe::param::StreamFilter;
use rustypipe_downloader::DownloaderBuilder;
let dl = DownloaderBuilder::new()
.audio_tag()
.crop_cover()
.build();
let filter_audio = StreamFilter::new().no_video();
dl.id("eRsGyueVLvQ").stream_filter(filter_audio).to_file("audio.opus").download().await;
let filter_video = StreamFilter::new().video_max_res(720);
dl.id("eRsGyueVLvQ").stream_filter(filter_video).to_file("video.mp4").download().await;