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

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.1.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.1-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: muget-4.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 010ff57365e952b13c89df8a68c2c9836868ac448375c811fd59058e303983f3
MD5 06cd2d3d92d399f63e90ca858ded0641
BLAKE2b-256 1f8538a38ffa184de3ff79a03f4940803dc0eb5b300804133669b50551d10a33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: muget-4.0.1-py3-none-any.whl
  • Upload date:
  • Size: 23.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2f400660d4a57f0a992fc3b0708767962e40f468f0a4530a7e147e2db07b6d8
MD5 1ce0e3099201394c8b2072e9aeabbc6a
BLAKE2b-256 c31fef8e8fbafb2393e75544329f269e6a71acb7a4c417507a70e0764b2d9e95

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