{"id":14979789,"url":"https://github.com/mithronn/rusty_ytdl","last_synced_at":"2025-04-05T20:06:18.426Z","repository":{"id":142494651,"uuid":"570930807","full_name":"Mithronn/rusty_ytdl","owner":"Mithronn","description":"A Rust library for Youtube video searcher and downloader","archived":false,"fork":false,"pushed_at":"2024-10-07T21:25:30.000Z","size":440,"stargazers_count":99,"open_issues_count":6,"forks_count":19,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-18T23:28:30.883Z","etag":null,"topics":["rust","youtube","youtube-dl","youtube-downloader","youtube-search"],"latest_commit_sha":null,"homepage":"https://docs.rs/rusty_ytdl","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mithronn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-26T15:43:34.000Z","updated_at":"2024-10-18T17:15:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"e8cb48c2-612b-46e3-ac81-83a9405048b2","html_url":"https://github.com/Mithronn/rusty_ytdl","commit_stats":{"total_commits":81,"total_committers":7,"mean_commits":"11.571428571428571","dds":0.2098765432098766,"last_synced_commit":"af7e85e0e6618ccd3d6081fbae18c757a8ec82ad"},"previous_names":["mithronn/rusty-ytdl"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mithronn%2Frusty_ytdl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mithronn%2Frusty_ytdl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mithronn%2Frusty_ytdl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mithronn%2Frusty_ytdl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mithronn","download_url":"https://codeload.github.com/Mithronn/rusty_ytdl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393569,"owners_count":20931812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","youtube","youtube-dl","youtube-downloader","youtube-search"],"created_at":"2024-09-24T14:00:41.348Z","updated_at":"2025-04-05T20:06:18.354Z","avatar_url":"https://github.com/Mithronn.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cdiv align=\"center\"\u003e rusty_ytdl \u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![crates.io](https://img.shields.io/crates/v/rusty_ytdl.svg?style=for-the-badge\u0026logo=rust)](https://crates.io/crates/rusty_ytdl)\n[![Released API docs](https://img.shields.io/badge/docs.rs-rusty__ytdl-C36241?style=for-the-badge\u0026logo=docs.rs)](https://docs.rs/rusty_ytdl)\n\n\u003c/div\u003e\n\nYoutube searching and downloading module written with **pure Rust**.\nDownload videos **blazing-fast** without getting stuck on Youtube download speed (Downloads 20MB video files in just 10 seconds!)\n\n## Overview\n\n- [Roadmap](#roadmap)\n- [Features](#features)\n- [Usage](#usage)\n- [Limitations](#limitations)\n\n## Roadmap\n\n- [ ] benchmarks\n\n## Features\n\n- Download live and non-live videos\n- Search with query (Video, Playlist, Channel)\n- Blocking and asynchronous API\n- Proxy, IPv6, and cookie support on request\n- Built-in FFmpeg audio and video filter apply support (Non-live videos only) [Example](examples/download_with_ffmpeg.rs)\n- [CLI](https://crates.io/crates/rusty_ytdl-cli)\n\n# Usage\n\n```rust,ignore\nuse rusty_ytdl::Video;\n\n#[tokio::main]\nasync fn main() {\n  let video_url = \"https://www.youtube.com/watch?v=FZ8BxMU3BYc\"; // FZ8BxMU3BYc works too!\n  let video = Video::new(url).unwrap();\n\n  let stream = video.stream().await.unwrap();\n\n  while let Some(chunk) = stream.chunk().await.unwrap() {\n    // Do what you want with chunks\n    println!(\"{:#?}\", chunk);\n  }\n\n  // Or direct download to path\n  let path = std::path::Path::new(r\"test.mp3\");\n\n  video.download(path).await.unwrap();\n\n  //\n  // Or with options\n  //\n\n  let video_options = VideoOptions {\n    quality: VideoQuality::Lowest,\n    filter: VideoSearchOptions::Audio,\n    ..Default::default()\n  };\n\n  let video = Video::new_with_options(url, video_options).unwrap();\n\n  let stream = video.stream().await.unwrap();\n\n  while let Some(chunk) = stream.chunk().await.unwrap() {\n    // Do what you want with chunks\n    println!(\"{:#?}\", chunk);\n  }\n\n  // Or direct download to path\n  let path = std::path::Path::new(r\"test.mp3\");\n\n  video.download(path).await.unwrap();\n}\n```\n\nor get only video informations\n\n```rust,ignore\nuse rusty_ytdl::Video;\nuse rusty_ytdl::{choose_format,VideoOptions};\n\n#[tokio::main]\nasync fn main() {\n  let video_url = \"https://www.youtube.com/watch?v=FZ8BxMU3BYc\"; // FZ8BxMU3BYc works too!\n  // Also works with live videos!!\n  let video = Video::new(url).unwrap();\n\n  let video_info = video.get_info().await.unwrap();\n  println!(\"{:#?}\",video_info);\n\n  /*\n  VideoInfo {\n    dash_manifest_url: Option\u003cString\u003e,\n    hls_manifest_url: Option\u003cString\u003e,\n    video_details: VideoDetails,\n    formats: Vec\u003cVideoFormat\u003e,\n    related_videos: Vec\u003cRelatedVideo\u003e\n  }\n  */\n\n  let video_options = VideoOptions {\n    quality: VideoQuality::Lowest,\n    filter: VideoSearchOptions::Audio,\n      ..Default::default()\n  };\n\n  let format = choose_format(\u0026video_info.unwrap().formats,\u0026video_options);\n\n  println!(\"{:#?}\",format);\n\n  // Or with options\n  let video = Video::new_with_options(url, video_options.clone()).unwrap();\n\n  let format = choose_format(\u0026video_info.formats, \u0026video_options);\n\n  let video_info = video.get_info().await.unwrap();\n\n  println!(\"{:#?}\",video_info);\n}\n```\n\nFor more examples, check [examples](examples/)\n\n## Limitations\n\nrusty_ytdl cannot download videos that fall into the following\n\n- Regionally restricted (requires a [proxy](examples/proxy.rs))\n- Private (if you have access, requires [cookies](examples/cookies.rs))\n- Rentals (if you have access, requires [cookies](examples/cookies.rs))\n- YouTube Premium content (if you have access, requires [cookies](examples/cookies.rs))\n- Only [HLS Livestreams](https://en.wikipedia.org/wiki/HTTP_Live_Streaming) are currently supported. Other formats not will be fetch\n\nGenerated download links are valid for 6 hours, and may only be downloadable from the same IP address.\n\n### Ratelimits\n\nWhen doing to many requests YouTube might block. This will result in your requests getting denied with HTTP Status Code 429. The following steps might help you:\n\n- Use proxies (you can find an example [proxy](examples/proxy.rs))\n- Extend on the Proxy Idea by rotating (IPv6)Addresses (you can find an example [IPv6](examples/ipv6.rs))\n- Use cookies (you can find an example [cookies](examples/cookies.rs))\n  - for this to take effect you have to first wait for the current ratelimit to expire!\n- Wait it out\n\n# Installation\n\n```bash\ncargo add rusty_ytdl\n```\n\nOr add the following to your `Cargo.toml` file:\n\n```toml\n[dependencies]\nrusty_ytdl = \"0.7.4\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmithronn%2Frusty_ytdl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmithronn%2Frusty_ytdl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmithronn%2Frusty_ytdl/lists"}