#youtube #video #music #api-bindings #audio-stream

rustypipe-downloader

Downloader extension for RustyPipe

6 releases

new 0.2.5 Dec 13, 2024
0.2.4 Nov 10, 2024
0.2.3 Oct 28, 2024
0.2.1 Sep 10, 2024
0.2.0 Aug 18, 2024

#174 in Multimedia

Download history 18/week @ 2024-08-19 179/week @ 2024-09-09 49/week @ 2024-09-16 42/week @ 2024-09-23 43/week @ 2024-09-30 103/week @ 2024-10-07 64/week @ 2024-10-14 5/week @ 2024-10-21 162/week @ 2024-10-28 70/week @ 2024-11-04 116/week @ 2024-11-11 9/week @ 2024-11-18 14/week @ 2024-12-02

200 downloads per month
Used in rustypipe-cli

GPL-3.0 license

1MB
27K SLoC

RustyPipe Downloader

Current crates.io version License Docs CI status

The downloader is a companion crate for RustyPipe that allows for easy and fast downloading of video and audio files.

Features

  • Fast download of streams, bypassing YouTube's throttling
  • Join video and audio streams using ffmpeg
  • Indicatif support to show download progress bars (enable indicatif feature to use)
  • Tag audio files with title, album, artist, date, description and album cover (enable audiotag feature to use)
  • Album covers are automatically cropped using smartcrop to ensure they are square

How 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;

Dependencies

~16–36MB
~629K SLoC