| Crates.io | libytdlr |
| lib.rs | libytdlr |
| version | 0.12.0 |
| created_at | 2025-06-12 14:47:54.412669+00 |
| updated_at | 2025-06-12 14:47:54.412669+00 |
| description | A library to interact with youtube-dl/p with a custom archive |
| homepage | |
| repository | https://github.com/hasezoey/yt-downloader-rust |
| max_upload_size | |
| id | 1709886 |
| size | 201,602 |
A library to interact with youtube-dl / yt-dlp from rust, with custom archive support.
This library is mainly made for ytdlr binary, but can also be consumed standalone.
For build / run requirements please see the project README.
The main functionality: interacting with yt-dlp; downloading actual media.
Small example:
libytdlr::main::download::download_single(connection, &options, progress_callback, &mut result_vec)?;
For a full example see examples/simple.
Extra functionality to re-apply a thumbnail to a video or audio container:
Small example:
libytdlr::main::rethumbnail::re_thumbnail_with_tmp(&media_path, &image_path, &output_path)?;
For a full example see `examples/rehtumbnail.
The custom archive libytdlr uses is based on SQLite and provides full read & write ability.
It is recommended to only do reads from outside functions.
The main function that will be necessary to be called to make use of the archive is:
libytdlr::main::sql_utils::migrate_and_connect(&database_path, progress_callback)?;
// or without any format migration:
libytdlr::main::sql_utils::sqlite_connect(&database_path)?;