Skip to main content

YouTube Music downloader

Project description

MuGet

Download YouTube Music audio with metadata.

Requirements

Before using MuGet, make sure the following tools are installed and available in your PATH:

  • Python
  • FFmpeg
  • Deno

Installation

pip install muget

Configuration

The first time MuGet runs, it automatically creates a configuration file:

• Linux:

~/muget.json

• Windows:

C:\Users\<username>\muget.json

• Default configuration:

    "audio_itag": "251",
    "output_directory": "YouTube Music",
    "delay_between_downloads": 1,
    "embed_cover": true,
    "skip_existing": true,
    "cookies_path": null,
    "po_token": null,
    "replaygain": false #Do not enable. It corrupts data.

Edit this file if you want to customize MuGet.

• Configuration Options:

Option Description
audio_itag Audio format to download.
output_directory Directory where downloaded music is stored.
delay_between_downloads Delay in seconds between downloads.
embed_cover Embed album artwork into audio files.
skip_existing Skip tracks that already exist.
cookies_path Path to a cookies.txt file for authenticated downloads.
po_token YouTube PO token used by yt-dlp.
replaygain Calculate ReplayGain tags after downloading albums.

• Avaible Audio Formats:

Available values for audio_itag:

Itag Quality Codec Container Account
249 48kbps opus ogg free
250 64kbps opus ogg free
251 128kbps opus ogg free
774 256kbps opus ogg premium
139 48kbps aac m4a free
140 128kbps aac m4a free
141 256kbps aac m4a premium

• Examples:

Specify the output directory (By default, it is saved in the directory where you are running the “muget” command):

"output_directory": "/home/user/Music",

Download AAC instead of Opus:

"audio_itag": "140",

Use browser cookies:

"cookies_path": "/home/user/cookies.txt",

Usage

Run MuGet with the following command:

muget "YOUR_URL"

• Supported URL types:

  • Song
  • Album
  • Public playlist

Songs that are not “Official” (regular YouTube videos) are excluded by this program. To ensure you get valid links, use YouTube Music to search and enable the filter for songs or albums.

• Examples:

  • Download a song:

    muget https://music.youtube.com/watch?v=EfjIqEGHmDI
    
  • Download an album:

    muget https://music.youtube.com/playlist?list=OLAK5uy_keZv-_VVAJ8GQ3gEx9c3a3araWrT0En0Y
    
  • Download an public playlist:

    muget https://music.youtube.com/playlist?list=RDCLAK5uy_mzE-hKfgQBgAY_ZN4O85nOo_H9U0P47Mc
    

Output

Downloaded files are organized automatically:

YouTube Music/
└── Album Artist/
    └── Album/
        ├── 01 - Song.opus
        ├── 02 - Song.opus
        └── 03 - Song.opus

Metadata

MuGet automatically writes:

  • Title
  • Artist
  • Album
  • Album Artist
  • Track Number
  • Total Tracks
  • Release Year
  • Cover Art
  • Lyrics (when available)
  • Song Credits (when available)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

muget-4.0.2.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

muget-4.0.2-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file muget-4.0.2.tar.gz.

File metadata

  • Download URL: muget-4.0.2.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for muget-4.0.2.tar.gz
Algorithm Hash digest
SHA256 458f0e4206a40d45a61ef50276fecd231989da4b22abd6bfa5719e1bd413544f
MD5 0678c68ed81c02adf18d7873e1c82514
BLAKE2b-256 cef7b30ad726fc1edec1108f021a03b5c6216f34ceb2376d64552c193149700e

See more details on using hashes here.

File details

Details for the file muget-4.0.2-py3-none-any.whl.

File metadata

  • Download URL: muget-4.0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for muget-4.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b95b91d6c078260d00f621803e01923a2f05a4c44c5c6f584b6b8b14c21322e
MD5 28a8699094d9f310c073a7b74ce2beb3
BLAKE2b-256 1da26894c99c56256793d7846b593bfa7d5ae8093aad43390eb8a4f9b60a87ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page