Skip to content

🎵 Download YouTube audio as MP3 with full metadata, organized for Jellyfin music libraries

Notifications You must be signed in to change notification settings

Hannyel0/yt2jellyfin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

yt2jellyfin

yt2jellyfin banner

Platform Shell License yt-dlp

Download YouTube audio as high-quality MP3 files, automatically organized for Jellyfin.

Features

  • Downloads best audio quality, converts to MP3 (320kbps)
  • Embeds metadata and album art (cropped to square)
  • Organizes files as Artist/Album/Track.mp3
  • Supports videos, playlists, channels, and search queries
  • Tracks downloads to prevent duplicates

Installation

Quick Install

chmod +x setup-yt2jellyfin.sh
./setup-yt2jellyfin.sh

Manual Install

macOS:

brew install ffmpeg yt-dlp
pip3 install mutagen
cp yt2jellyfin.sh ~/.local/bin/yt2jellyfin
chmod +x ~/.local/bin/yt2jellyfin

Linux:

sudo apt install ffmpeg  # or dnf/pacman
pip3 install --user yt-dlp mutagen
cp yt2jellyfin.sh ~/.local/bin/yt2jellyfin
chmod +x ~/.local/bin/yt2jellyfin

Add ~/.local/bin to your PATH if needed.

Usage

# Download a video
yt2jellyfin "https://youtube.com/watch?v=VIDEO_ID"

# Download a playlist
yt2jellyfin "https://youtube.com/playlist?list=PLAYLIST_ID" --playlist-folder

# Search and download
yt2jellyfin "artist - song name" --search

# See all options
yt2jellyfin --help

Options

Option Description
-o, --output DIR Output directory (default: ~/Music/YouTube)
-s, --search Treat input as search query
-n, --number N Number of search results (default: 1)
-f, --flat No Artist/Album folders
-a, --album NAME Override album name
-A, --artist NAME Override artist name
-p, --playlist-folder Use playlist name as folder
--no-archive Allow re-downloading
--check Check dependencies
--update Update yt-dlp

Configuration

Set environment variables in ~/.zshrc or ~/.bashrc:

export YT2JELLYFIN_OUTPUT="/path/to/jellyfin/music"

License

MIT License - Use freely for personal purposes. Respect YouTube's Terms of Service.

About

🎵 Download YouTube audio as MP3 with full metadata, organized for Jellyfin music libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages