Skip to main content

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

Project description

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

Python PyPI License Ruff

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

🚀 Quick Start

pip install fm-dlp                    # Requires Python 3.10+ & FFmpeg
fm-dlp config ~/Music                 # Set download directory
fm-dlp search "artist"                # Search tracks (YouTube Music by default)
fm-dlp download "URL" --codec flac    # Download audio
fm-dlp download urls.txt --codec mp3  # Download from file

📋 Commands

search — Find music

fm-dlp search <query> [--limit 10] [--yt-video] [--album] [--raw]

Search uses YouTube Music by default. Use --yt-video to search YouTube instead.

Option Default Description
--yt-video Search YouTube instead of YTMusic
--album Search by albums
--limit 10 Results count
--raw Output of results in RAW format

RAW format output includes complete unformatted data (JSON/YAML) suitable for scripting and external tool integration, preserving all metadata fields without pretty-printing or truncation.

download — Download audio/video

fm-dlp download <urls> [--codec CODEC] [--kbps 256] [--jobs 5] [--quiet] [--no-metadata]

URLs can be:

  • Single URL: "https://youtube.com/watch?v=..."
  • Multiple URLs: "URL1 URL2 URL3" or "URL1,URL2,URL3"
  • File with URLs: "urls.txt" (one URL per line, supports # comments)
Option Default Description
--codec m4a/opus Audio: mp3, aac, flac, m4a, opus, vorbis, wav
Video: mp4, mkv, webm, mov, avi, flv
--kbps 256 Bitrate 64–320 (audio)
--jobs 5 Parallel downloads
--quiet Suppress yt-dlp output
--no-metadata Skip metadata embedding
--path config Override download directory
--cookies Path to cookies file OR browser name (chrome, firefox, edge, safari, brave, opera)

📖 Examples

# Search
fm-dlp search "Sewerslvt" --limit 10                # YTMusic
fm-dlp search "usedcvnt" --album
fm-dlp search "breakcore" --yt-video                # YouTube

# RAW output for scripting
fm-dlp search "Sewerslvt" --raw                     # Machine-readable output
fm-dlp search "breakcore" --yt-video --raw          # RAW from YouTube
fm-dlp search "album" --album --raw > results.json  # Save to file

# Audio - single URL
fm-dlp download "https://youtube.com/watch?v=..." --codec mp3 --kbps 320
fm-dlp download "https://youtu.be/..." --codec flac

# Audio - multiple URLs
fm-dlp download "URL1 URL2 URL3" --codec flac
fm-dlp download "URL1,URL2,URL3" --jobs 10

# Audio - from file
echo "https://youtube.com/watch?v=123" > urls.txt
echo "https://youtu.be/456" >> urls.txt
fm-dlp download urls.txt --codec mp3

# Video
fm-dlp download "URL" --codec mp4
fm-dlp download "URL" --codec mkv

# Custom path
fm-dlp download "URL" --path ~/Downloads

# Advanced
fm-dlp download "URL" --cookies firefox
fm-dlp download "URL" --cookies /path/to/cookies.txt
fm-dlp download "URL1 URL2 URL3" --quiet --jobs 10
fm-dlp download urls.txt --codec opus --kbps 192 --no-metadata

🔧 Dependencies

Library Purpose
yt-dlp Download engine
ytmusicapi YouTube Music API
mutagen Metadata tagging
platformdirs Config paths
arg-kiss CLI framework
FFmpeg Audio/video conversion (system)

❓ FAQ

Why fm-dlp over yt-dlp? Simplifies complex flags into clean commands: readable search output, single --codec option, automatic metadata tagging.

Why M4A on macOS? macOS treats M4A/AAC as native (Finder, Music.app). Linux/Windows default to Opus for better quality. Override with --codec.

How to use cookies? Provide either browser name for automatic extraction (--cookies firefox) or path to exported cookies file (--cookies cookies.txt).

How to use a URL file? Pass a path to a text file instead of URLs. Each URL on new line, lines starting with # are ignored as comments. Supports UTF-8 encoding.

How to use a proxy? fm-dlp doesn't include built-in proxy support. Use proxychains or similar tools:

proxychains fm-dlp download "URL"

📄 License

MIT License — see LICENSE file.

🙏 Acknowledgments


Author: Fkernel653 Repository: github.com/Fkernel653/fm-dlp PyPI: pypi.org/project/fm-dlp

Project details


Release history Release notifications | RSS feed

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-3.9.9.tar.gz (26.0 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-3.9.9-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fm_dlp-3.9.9.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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-3.9.9.tar.gz
Algorithm Hash digest
SHA256 5b57582551ada39cf0548127def5a102bff9b897ea5b1d85646f78f59a7c91c3
MD5 9d69726bdc6f3876d200e1bac9c583c6
BLAKE2b-256 98ae05eefd13b86a476b82990cf97b4c93930d7fa277ca4c992ea3fd56b43800

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fm_dlp-3.9.9-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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-3.9.9-py3-none-any.whl
Algorithm Hash digest
SHA256 1b41fd57732c511d7f3e18c971541931289345a00370fe284f57bf45881ce71e
MD5 4040df2460dc03366aab27fa9ecb5780
BLAKE2b-256 fd1348565c3b1e534ad8ee8798d03c793852a08b1b15829369abf6a07f5610e7

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