Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues Unlicense License LinkedIn


mediadl

mediadl

A yt-dlp wrapper for media archiving.
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Configuration
  5. Notes
  6. Roadmap
  7. Contributing
  8. License
  9. Disclaimer
  10. Contact
  11. Acknowledgments

About The Project

A yt-dlp wrapper for media archiving.

A small CLI tool built with rust.

Built With

⬆️

Getting Started

Prerequisites

mediadl requires the following tools to be installed and available in PATH:

# 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.FFmpeg

Installation

From Releases

Download the binary for your platform from GitHub Release.

From Source

Build binary

git clone https://github.com/HappyPotatoHead/mediadl.git
cd mediadl
cargo build -p mediadl-cli --release

For local install:

mkdir -p ~/.local/bin
cp target/release/mediadl ~/.local/bin/

⬆️

Usage

Audio

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"

Video

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"

Batch

It does not necessarily have to be named batch.csv

mediadl batch batch.csv --type audio
mediadl batch batch.csv --type video

CSV format:

url,creator,collection
https://youtu.be/example,HappyPotatoHead,Collection of Things
https://youtu.be/example,HappyPotatoHead,@

⬆️

Config

Show config:

mediadl config show

Edit every config value interactively:

mediadl config edit

Edit one config value interactively:

mediadl config edit audio-format

Edit one config value directly:

mediadl config set audio-format opus
mediadl config set retries 2
mediadl config set max-parallel-downloads 3

Reset config:

media config reset

Config keys

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-thumbnail
video-thumbnail
control how thumbnail images are saved none/write/embed/both
audio-output-template
video-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

⬆️

Notes

mediadl does not replace yt-dlp. It is a small wrapper that provides a workflow for repeated audio/video downloads.

Roadmap

  • 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).

⬆️

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

⬆️

License

Distributed under the MIT License. See LICENSE.txt for more information.

⬆️

Disclaimer

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.

Contact

Jimmy Ding - @instagram - jimmydingjk@gmail.com

Project Link: https://github.com/HappyPotatoHead/mediadl

⬆️

Acknowledgments

  • yt-dlp - YouTube downloader
  • ffmpeg - Audio/video processing

⬆️

About

yt-dlp wrapper for video and audio archiving

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages