Table of Contents
A yt-dlp wrapper for media archiving.
A small CLI tool built with rust.
mediadl requires the following tools to be installed and available in PATH:
- yt-dlp
- Refer to yt-dlp download guide for your respective OS
- ffmpeg
- Refer to ffmpeg download page for your respective OS
# these commands are just examples, please refer to the links above before downloading
# macOS
bew install yt-dlp ffmpeg
# Windows
winget install yt-dlp.yt-dlp
winget install Gyan.FFmpegDownload the binary for your platform from GitHub Release.
Build binary
git clone https://github.com/HappyPotatoHead/mediadl.git
cd mediadl
cargo build -p mediadl-cli --releaseFor local install:
mkdir -p ~/.local/bin
cp target/release/mediadl ~/.local/bin/With URL only
mediadl audio "https://youtu.be/..."With creator only:
mediadl audio "https://youtu.be/.." --creator "Me"With creator and collection:
mediadl audio "https://youtu.be/.." --creator "Me" --collection "Legit playlist"With URL only
mediadl video "https://youtu.be/..."With creator only:
mediadl video "https://youtu.be/.." --creator "HappyPotatoHead"With creator and collection:
mediadl video "https://youtu.be/.." --creator "HappyPotatoHead" --collection "Legit playlist"It does not necessarily have to be named
batch.csv
mediadl batch batch.csv --type audio
mediadl batch batch.csv --type videoCSV format:
url,creator,collection
https://youtu.be/example,HappyPotatoHead,Collection of Things
https://youtu.be/example,HappyPotatoHead,@Show config:
mediadl config showEdit every config value interactively:
mediadl config editEdit one config value interactively:
mediadl config edit audio-formatEdit one config value directly:
mediadl config set audio-format opus
mediadl config set retries 2
mediadl config set max-parallel-downloads 3Reset config:
media config reset| Config | Description | Example |
|---|---|---|
download-path |
base path | download-path=~/Videos/Lectures |
audio-format video-format |
refer to yt-dlp format selection, one format at a time | audio: opus/mp3/flac video: mp4/hvac |
video-quality |
based on yt-dlp res options You can also specify custom resolution |
max, 1440/1440p, 1080/1080p, 720/720p, 480/480p, <custom height> |
audio-thumbnailvideo-thumbnail |
control how thumbnail images are saved | none/write/embed/both |
audio-output-templatevideo-output-template |
control the names of the files | %(title)s.%(ext)s |
retries |
retry the archiving upon failures | 1/2/3 |
max-parallel-downloads |
keep it low to avoid being blocked | 1/2/3 |
Default config file:
download_path=
audio_format=mp3
video_format=mp4
video_quality=1080p
# none, embed, write, both
audio_thumbnail=none
video_thumbnail=none
# i would recommend, leaving this as is
audio_output_template=%(title)s.%(ext)s
video_output_template=%(title)s.%(ext)s
retries=3
# keep this value low to avoid being blocked
max_parallel_downloads=2
mediadl does not replace yt-dlp. It is a small wrapper that provides a workflow for repeated audio/video downloads.
- ReadMe changes
- Refactor code
- More config options
- Add prerequisite checks
- Add ratatui
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
This tool is a wrapper for yt-dlp and is intended for personal archival and educational purposes only. The author of mediadl does not encourage or condone the use of this software to download copyrighted material in violation of any platform's Terms of Service or local copyright laws. Use this tool responsibly and at your own risk.
This tool is intended to facilitate the exercise of rights under Fair Use for purposes such as criticism, comment, news reporting, teaching, and research.
Jimmy Ding - @instagram - jimmydingjk@gmail.com
Project Link: https://github.com/HappyPotatoHead/mediadl