All Projects → DzenanJupic → rustube

DzenanJupic / rustube

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 APACHE-LICENCE MIT MIT-LICENCE
A YouTube video downloader, originally inspired by pytube, written in Rust.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to rustube

Pully
A simple CLI and library for downloading high quality YouTube videos!
Stars: ✭ 153 (+86.59%)
Mutual labels:  youtube-downloader
Yturl
YouTube videos on the command line
Stars: ✭ 218 (+165.85%)
Mutual labels:  youtube-downloader
Laravel-Youtube-API
A way to add an API to your Laravel app that converts youtube video's to mp3/mp4 and returns a download/stream link and information.
Stars: ✭ 19 (-76.83%)
Mutual labels:  youtube-downloader
Gotube
A very simple command line tool for downloading YouTube videos.
Stars: ✭ 179 (+118.29%)
Mutual labels:  youtube-downloader
Node Ytdl Core
YouTube video downloader in javascript.
Stars: ✭ 3,004 (+3563.41%)
Mutual labels:  youtube-downloader
Youtubedl Android
youtube-dl for android
Stars: ✭ 235 (+186.59%)
Mutual labels:  youtube-downloader
Node Youtube Dl
youtube-dl driver for node
Stars: ✭ 1,692 (+1963.41%)
Mutual labels:  youtube-downloader
youtubly-android
An android app to download 📹 videos and 🎶 songs from youtube to phone internal storage. In a nutshell NewPipe for just audio.
Stars: ✭ 24 (-70.73%)
Mutual labels:  youtube-downloader
Videodownloader
A simple python script that will allow you to download youtube videos
Stars: ✭ 206 (+151.22%)
Mutual labels:  youtube-downloader
android-browser-downloader
🌎 Android Browser - Video Downloader - This repository is deprecated. Please check out new version of this project at: https://github.com/cuongpm/youtube-dl-android
Stars: ✭ 34 (-58.54%)
Mutual labels:  youtube-downloader
Youtube Downloader For Macos
Simple menu bar app to download YouTube movies on your Mac
Stars: ✭ 185 (+125.61%)
Mutual labels:  youtube-downloader
Youtag
iOS music player app that downloads music from the internet, even YouTube
Stars: ✭ 193 (+135.37%)
Mutual labels:  youtube-downloader
gropple
Server and bookmarklet to download files via youtube-dl directly from your browser. Cross platform single binary installation, web browser configurable.
Stars: ✭ 33 (-59.76%)
Mutual labels:  youtube-downloader
Downzemall
DownZemAll! is a download manager for Windows, MacOS and Linux
Stars: ✭ 157 (+91.46%)
Mutual labels:  youtube-downloader
ytdl
Get Direct [d]own[l]oad ⬇️⬇️ Links of any [y]ou[t]ube Video . Written in Rust, for personal use.
Stars: ✭ 25 (-69.51%)
Mutual labels:  youtube-downloader
Youtube Dl Gui
This repository contains code for a youtube-dl GUI written in PyQt.
Stars: ✭ 144 (+75.61%)
Mutual labels:  youtube-downloader
Candy
🍭 Cross-platform YouTube-downloader with playlist and channel support as well as build-in audio / video converter.
Stars: ✭ 229 (+179.27%)
Mutual labels:  youtube-downloader
easyYoutubeDL
A manager for automating download lists based on youtube-dl
Stars: ✭ 21 (-74.39%)
Mutual labels:  youtube-downloader
ytdx
Download audio from YouTube videos
Stars: ✭ 55 (-32.93%)
Mutual labels:  youtube-downloader
pymusicdl
Download songs based on song name/ YouTube playlist/ Spotify playlist /album
Stars: ✭ 41 (-50%)
Mutual labels:  youtube-downloader

rustube

crates.io docs.rs licence

build YT download


A complete (WIP), and easy to use YouTube downloader.

Note: 0.3.5 is a temporary fix to adapt to changes in the YouTube api (#38). Unfortunately this fix does not work for age restricted videos. We are working on a fix for that in #39.

Overview

Roadmap

  • download normal videos
  • download age restricted videos (no longer works since 0.3.5 due to a change in the YouTube API)
  • asynchronous API
  • blocking API
  • full video info deserialization
  • feature based opt-in deserialization of video info
  • CLI
  • testing suite
  • benchmarks
  • Python bindings
  • C / C++ bindings

Usage

rustube provides an extremely easy to use API. If you just want to download a video and don't care about any intermediate steps and any video information, this is all you need:

#[tokio::main]
async fn main() {
    let url = "https://www.youtube.com/watch?v=Edx9D2yaOGs&ab_channel=CollegeHumor";
    println!("downloaded video to {:?}", rustube::download_best_quality(&url).await.unwrap());
}

Of course, rustube has a lot more capabilities than just downloading videos. It also aims at deserializing the complete video information provided by YouTube (this is still WIP). So finding out the view count of a video is as simple as:

use rustube::{Id, VideoFetcher};

let id = Id::from_raw("https://www.youtube.com/watch?v=Edx9D2yaOGs&ab_channel=CollegeHumor").unwrap();
let descrambler = VideoFetcher::from_id(id.into_owned())
        .unwrap()
        .fetch()
        .await
        .unwrap();

let view_count = descrambler.video_details().view_count;
let title = descrambler.video_title();
println!("The video `{}` was viewed {} times.", title, view_count);

For more examples, an overview of the blocking API have a look at the API documentation.

CLI

rustube comes with a CLI, rustube-cli, so you can download your favorite YouTube videos without having to write a single line of code.

To install it, simply run

cargo install rustube-cli

After you successfully installed rustube-cli, you have access to the command rustube

A simple CLI for the rustube YouTube-downloader library.
For documentation and more information about rustube or the rustube-cli checkout
`https://github.com/DzenanJupic/rustube`.

For help with certain subcommands run `rustube <SUBCOMMAND> --help`.

USAGE:
    rustube <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    check       Checks if a video can be downloaded and fetches information about it
                This command is similar to fetch, in the way that it also fetches information
                about a video, but, other then fetch, will also decrypt all stream URLs.
                Therefore you can use the returned URLs for downloading the video. This of
                course means that the video has to be downloadable.
                By default this command will check for any streams that contain a video and an
                audio track. To specify other behavior, like checking for a stream with a
                particular quality, have a look at the subcommand help.
    download    Downloads a YouTube video
                By default, the Stream with the best quality and both a video, and an audio
                track will be downloaded. To specify other download behavior, have a look the
                the subcommand help.
    fetch       Fetches information about a YouTube video
                Fetching information does not require the video to actually be downloadable. So
                this also works when a video is, i.e., an offline stream. The downside is that
                you often don't have access to the stream URLs. Some videos come with pre-
                decrypted urls, in which case you can also use these to download the video, but
                if the video url is encrypted there's no way for you to download the video using
                only the returned information. To get decrypted URLs, have a look at `check`.
                For most use cases it's recommended to use `check` instead, since it gives you
                both more control and more information.
    help        Prints this message or the help of the given subcommand(s)

Contributing

rustube is still in a pretty early stage, and you are welcome to contribute to it! The goal is to utilize the speed, the type system, and the safety of Rust to make the fastest, most reliable, and most complete YouTube downloader out there.

This project is 100% open source. Any contribution submitted for inclusion in rustube by you, shall have both the MIT licence and the Apache-2.0 licence, and shall be licensed as MIT OR Apache-2.0, without any additional terms or conditions.

Licence

This project is licensed under the terms of the MIT licence or the Apache-2.0 licence, at your own choice.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].