Skip to main content

fm-dlp — Download from YouTube, YTMusic, and 1000+ sites

Python PyPI License Platform Ruff

CLI tool for searching YouTube/YTMusic and downloading audio/video from 1000+ sites


📑 Table of Contents


🚀 Quick Start

pip install fm-dlp                    # Python 3.11+ & FFmpeg required
fm-dlp config ~/Music                 # Set download directory
fm-dlp search "Sewerslvt"             # Search tracks
fm-dlp download "URL"                 # Download audio

⚙️ Requirements

  • Python 3.11+ - Asyncio support required
  • FFmpeg - Required for audio/video processing. Install via:
    • macOS: brew install ffmpeg
    • Linux: sudo apt install ffmpeg (Debian) or sudo dnf install ffmpeg (Fedora)
    • Windows: Download from ffmpeg.org and add to PATH

🌈 Color Output

By default, fm-dlp uses colored output for better readability. To disable colors globally, use the --no-color flag before the command:

fm-dlp --no-color search "artist"
fm-dlp --no-color download "URL"
fm-dlp --no-color config ~/Music

📋 Commands

search

Search for music tracks, albums, or videos on YouTube/YTMusic.

fm-dlp search <query> [--limit LIMIT] [--yt-video] [--album] [--raw] [--only-url]
Option Default Description
query Req Search query string
--limit N, -l 10 Maximum number of results to return (1-100)
--yt-video, -v False Search for YouTube videos instead of music tracks
--album, -a False Search for albums instead of individual tracks
--raw, -r False Output results in raw format (Python dict representation)
--only-url, -u False Output only the URLs without any formatting

download

Download audio or video content from supported platforms (YouTube, YTMusic, and 1000+ sites).

fm-dlp download <urls> [--codec CODEC] [--kbps KBPS] [--quality QUALITY] [--jobs JOBS] [--quiet] [--no-metadata] [--keep] [--save] [--use-config] [--path PATH] [--only-video] [--cookies COOKIES] [--remote SOURCE]
Option Default Description
urls Required Single URL, comma/space-separated list, or path to text file with URLs (one per line)
--codec, -c Platform default Audio: mp3, aac, flac, m4a, opus, vorbis, wav, alac
Video: mp4, mov, mkv, webm, avi, flv
--kbps, -K 256 Audio bitrate in kbps (64, 128, 192, 256, 320). Higher = better quality, larger file
--quality, -Q best Video quality preset: best, worst, 2160p, 1440p, 1080p, 720p, 480p, 360p, 240p, 144p, or custom height (e.g., 720)
--jobs, -j 5 Maximum number of concurrent downloads (1-24) for faster batch processing
--quiet, -q False Suppress yt-dlp output messages (errors still shown)
--no-metadata False Disable embedding metadata (title, artist, album) and thumbnail into audio files
--keep, -k False Keep the original downloaded file after conversion/post-processing
--save, -s False Save settings (except URL) to config file
--use-config, -u False Use saved parameters from config file as defaults
--path, -p Configured path Custom download directory (overrides default config)
--only-video, -v False Download video file without audio track
--cookies, -C None Browser name: brave, chrome, chromium, edge, opera, vivaldi, whale, firefox, safari
Or path to cookies file (.txt, .sqlite, .db, .cookies)
--remote, -r None Download external JavaScript components for bypassing anti-bot protections.
Options: ejs:github (yt-dlp repo) or ejs:npm (NPM registry)

Audio Codec Details:

  • Lossy: mp3 (universal), aac (Apple), m4a (Apple), opus (modern web) - smaller files
  • Lossless: flac (high quality), wav (uncompressed), alac (Apple lossless) - larger files
  • Recommended: opus for best quality/size ratio, flac for archival

Video Container Details:

  • mp4 - Most compatible, uses m4a audio
  • mkv - Open format, uses opus audio
  • webm - Web optimized, uses opus audio
  • mov - Apple format, uses m4a audio
  • avi - Legacy Windows, uses mp3 audio
  • flv - Flash video, uses aac audio

config

Configure the default download directory path.

fm-dlp config <path>
Option Default Description
path Required Default directory path for downloads. Use absolute path for best results (e.g., /home/user/Music or C:\Music)

Config Location:

  • Windows: %LOCALAPPDATA%/fm-dlp/config.toml
  • macOS: ~/Library/Application Support/fm-dlp/config.toml
  • Linux: ~/.config/fm-dlp/config.toml

💡 Examples

Basic Download

Download a track from YouTube Music:

fm-dlp download https://music.youtube.com/watch?v=0KNxOBerr_8

With custom settings:

# Download as high-quality MP3 with metadata
fm-dlp download "URL" --codec mp3 --kbps 320 --path ~/Music/Downloads

# Download video in 1080p
fm-dlp download "URL" --quality 1080p --codec mp4

# Batch download from file
fm-dlp download urls.txt --jobs 3 --quiet

# Use saved config and cookies from browser
fm-dlp download "URL" --use-config --cookies chrome

# Download video-only and keep original file
fm-dlp download "URL" --only-video --keep
📦 Example Output
Starting: https://music.youtube.com/watch?v=0KNxOBerr_8
[youtube] Extracting URL: https://music.youtube.com/watch?v=0KNxOBerr_8
[youtube] 0KNxOBerr_8: Downloading webpage
[youtube] 0KNxOBerr_8: Downloading android vr player API JSON
[info] 0KNxOBerr_8: Downloading 1 format(s): 251
[info] Downloading video thumbnail 41 ...
[info] Writing video thumbnail 41 to: /home/user/Music/Lexapro Delirium.webp
[download] Destination: /home/user/Music/Lexapro Delirium.webm
[download] 100% of    6.53MiB in 00:00:01 at 5.74MiB/s
[ExtractAudio] Destination: /home/user/Music/Lexapro Delirium.opus
Deleting original file /home/user/Music/Lexapro Delirium.webm (pass -k to keep)
[Metadata] Adding metadata to "/home/user/Music/Lexapro Delirium.opus"
[ThumbnailsConvertor] Converting thumbnail "/home/user/Music/Lexapro Delirium.webp" to png
[EmbedThumbnail] mutagen: Adding thumbnail to "/home/user/Music/Lexapro Delirium.opus"
Success: https://music.youtube.com/watch?v=0KNxOBerr_8

Search Examples

Search for tracks, albums, and videos:

# Search for tracks on YouTube Music
fm-dlp search "Sewerslvt" --limit 5

# Search for albums
fm-dlp search "Draining Love Story" --album --limit 1

# Search for videos on YouTube
fm-dlp search "Sewerslvt goodbye" --yt-video --limit 1

# Get raw data for scripting
fm-dlp search "artist" --raw

# Get only URLs for batch processing
fm-dlp search "artist" --only-url > urls.txt

📊 Search Output Examples

Examples of formatting search results from different sources.

🎵 YTMusic (Track)

    1. Mr. Kill Myself
        ├─ Sewerslvt
        ├─ Draining Love Story
        ├─ 13M │ 7:52
        └─ https://music.youtube.com/watch?v=y55fzyXZDSE
           ──────────────────────────────────────────────────

    N. Title
        ├─ Artist
        ├─ Album
        ├─ Views │ Duration
        └─ URL
           ──────────────────────────────────────────────────

💿 YTMusic (Album)

    1. Draining Love Story
        ├─ Sewerslvt
        ├─ 2020
        └─ https://music.youtube.com/playlist?list=OLAK5uy_lwWVcID2Sw8o6Jfa9vz8-a2hqEFffKb-g
           ──────────────────────────────────────────────────

    N. Title
        ├─ Artist
        ├─ Year
        └─ URL
           ──────────────────────────────────────────────────

▶️ YouTube (Video)

    1. Sewerslvt - goodbye
        ├─ Sewerslvt
        ├─ 2,405,647 │ 17:01
        └─ https://youtu.be/ABBpsy6rlVU
           ──────────────────────────────────────────────────

    N. Title
        ├─ Artist
        ├─ Views │ Duration
        └─ URL
           ──────────────────────────────────────────────────

🧩 Formatting Legend

Element Description
N. Sequential number of search result
Title Track, album, or video title
Artist Artist or channel name
├─└─│ Tree branch characters
Views │ Duration View count and length (MM:SS or HH:MM:SS)
URL Direct link to content
─── Visual separator line

📄 License & Acknowledgments

AGPLv3 License — Built with:

Library Purpose
fm-dlp-core Main core

Author: Fkernel653

Project: GitHubPyPI

Download files

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

Source Distribution

fm_dlp-4.5.4.3.tar.gz (41.1 kB view details)

Uploaded Source

Built Distribution

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

fm_dlp-4.5.4.3-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file fm_dlp-4.5.4.3.tar.gz.

File metadata

  • Download URL: fm_dlp-4.5.4.3.tar.gz
  • Upload date:
  • Size: 41.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fm_dlp-4.5.4.3.tar.gz
Algorithm Hash digest
SHA256 27dcbcb19864bfdd2516e27b15d8809c6970d93541d3d3bd2f4493b73883c2e4
MD5 3f882618cf4857ef229c0b7fdb230461
BLAKE2b-256 ff7beb8c759e05d765c30c43b32d9e16e5762cb6fba57adf647438271c537804

See more details on using hashes here.

File details

Details for the file fm_dlp-4.5.4.3-py3-none-any.whl.

File metadata

  • Download URL: fm_dlp-4.5.4.3-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fm_dlp-4.5.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4c9cc51e4d68111d447260cda4d13273ca1d29e0d20a0009d646934eee97596f
MD5 62e73487b7bfe862fee6f34e6ea2fce1
BLAKE2b-256 9d1adb59d8ac1a1628a9bc374f738b02fedae3abb8ba5e7fe60c4b725e025354

See more details on using hashes here.

Release history Release notifications | RSS feed

4.6.0

2 files

4.5.9

2 files

4.5.8

2 files

4.5.7

2 files

4.5.6

2 files

4.5.5

2 files

This release

4.5.4.3 This release

2 files

4.5.4.2

2 files

4.5.4.1

2 files

4.5.4

2 files

4.5.3

2 files

4.5.2

2 files

4.5.1.4

2 files

4.5.1.3

2 files

4.5.1.2

2 files

4.5.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page