Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Converso Media Downloader

PyPI version Python versions License GitHub Workflow Status Code style: black Imports: isort Security: bandit

Professional-grade Python library for downloading YouTube videos, playlists, and audio with enterprise-level features.

Built and maintained by Converso Empire | Documentation | Quick Start | API Reference


Table of Contents


Features

🎬 Download Capabilities

✅ Video Downloads

  • Best-quality video in MKV/MP4/WebM containers
  • 4K/8K support with adaptive bitrate selection
  • Automatic subtitle embedding (20+ languages)
  • Thumbnail and metadata embedding
  • Format fallback if preferred quality unavailable

✅ Audio Extraction

  • Professional audio codecs: WAV, FLAC, MP3, AAC, Opus, OGG
  • Lossless FLAC at up to 192kHz/24-bit
  • Batch conversion with parallel processing
  • Metadata tagging (ID3v2, Vorbis comments)

✅ Playlist & Batch

  • Full playlist downloading with archive progress tracking
  • Parallel batch processing (2-8 concurrent workers)
  • Error recovery with configurable retry logic
  • Resume support for interrupted downloads

✅ Advanced Processing

  • FFmpeg-based upscaling to 4K/8K (Lanczos or bilinear filtering)
  • Local file analysis with ffprobe (codec, bitrate, resolution)
  • Format inspection without downloading

🔧 Developer Features

✅ Integration Options

  • Clean Python API for programmatic use
  • FastAPI REST server with async job management
  • CLI with interactive menu and argument modes
  • Webhook support for job completion notifications

✅ Production-Ready

  • Thread-safe design for concurrent downloads
  • Comprehensive error handling and logging
  • Type hints throughout (Python 3.8+)
  • Exhaustive documentation with examples

✅ Enterprise Features

  • Configurable retry logic with exponential backoff
  • Job history and status tracking
  • Cookie/proxy/authentication support
  • Rate limiting and socket timeouts
  • Extensive logging (file + console)

Installation

# Basic installation (CLI and Python API)
pip install converso-ytdl

# With REST API server support
pip install converso-ytdl[api]

# With webhook notifications
pip install converso-ytdl[webhooks]

# Complete installation (everything)
pip install converso-ytdl[all]

System Requirements

FFmpeg must be installed:

  • Ubuntu/Debian: sudo apt update && sudo apt install ffmpeg
  • macOS: brew install ffmpeg
  • Windows: Download here or choco install ffmpeg
  • Docker: Use official ffmpeg image

Python: 3.8 or 3.9 or 3.10 or 3.11 or 3.12

From Source (Development)

git clone https://github.com/converso-empire/converso-ytdl.git
cd converso-ytdl

python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

pip install -e ".[all]"

Quick Start

1️⃣ Interactive Mode (Easiest)

converso-ytdl

Follow the on-screen menu:

  1. Download video - Select quality and container
  2. Download audio - Choose codec and sample rate
  3. Batch download - Upload file with URLs
  4. Playlist download - Paste playlist URL
  5. Get info - View video metadata
  6. List formats - See all available qualities
  7. Upscale video - Enhance resolution
  8. Analyze file - Inspect local media

2️⃣ Command Line (Flexible)

# Download best-quality video
converso-ytdl video "https://youtu.be/dQw4w9WgXcQ"

# Download audio as FLAC (192kHz 24-bit)
converso-ytdl audio "https://youtu.be/..." \
  --codec flac --sample-rate 192000 --bit-depth 24

# Batch download with 4 parallel workers
converso-ytdl batch -f urls.txt --workers 4

# Download playlist (with progress tracking)
converso-ytdl playlist "https://www.youtube.com/playlist?list=..." \
  --mode audio --archive done.txt

3️⃣ Python API (Programmatic)

from converso_ytdl import MediaDownloader, DownloadConfig

# Configuration
config = DownloadConfig(
    output_dir="downloads",
    video_container="mkv",
    verbose=True
)

# Create downloader
downloader = MediaDownloader(config)

# Download video
result = downloader.download_video("https://youtu.be/...")

if result.status == "success":
    print(f"✓ Downloaded: {result.output_file}")
    print(f"  Resolution: {result.resolution}")
    print(f"  Size: {result.file_size / 1024 / 1024:.1f} MB")
else:
    print(f"✗ Error: {result.error}")

4️⃣ REST API Server (Remote Access)

# Start server
converso-ytdl-api --host localhost --port 8000

# Interactive API docs: http://localhost:8000/docs
# ReDoc: http://localhost:8000/redoc
# Get video info
curl "http://localhost:8000/api/v1/info?url=https://youtu.be/..."

# Start async download
curl -X POST http://localhost:8000/api/v1/jobs/video \
  -H "Content-Type: application/json" \
  -d '{"url": "https://youtu.be/...", "container": "mkv"}'

Usage

Configuration Files

Create config.json:

{
  "output_dir": "downloads",
  "video_container": "mkv",
  "embed_thumbnail": true,
  "embed_metadata": true,
  "audio_codec": "flac",
  "audio_sample_rate": 96000,
  "audio_bit_depth": 24,
  "workers": 2,
  "retries": 5,
  "verbose": false
}

Use it:

converso-ytdl --config config.json video "https://youtu.be/..."

Audio Formats

Format Quality Usecase Command
FLAC Lossless, 16/24/32-bit Archival, professional --codec flac --sample-rate 96000 --bit-depth 24
WAV Lossless, uncompressed Editing, mixing --codec wav --sample-rate 48000
MP3 Lossy, broad compatibility Portable devices --codec mp3
AAC Lossy, 320 kbps iTunes, Apple devices --codec aac
Opus Modern lossy, best compression Streaming --codec opus
OGG Open source, Vorbis Web, Linux --codec ogg

Advanced Features

Batch Download with Progress

# urls.txt (one URL per line)
https://youtu.be/aaa
https://youtu.be/bbb
# https://youtu.be/ccc  [commented] 
https://youtu.be/ddd

converso-ytdl batch -f urls.txt --workers 2 --delay 1

Playlist with Archive Tracking

# Download new videos only (tracks what's downloaded)
converso-ytdl playlist "https://www.youtube.com/playlist?list=..." \
  --archive playlist_archive.txt \
  --mode audio

Upscaling Videos

# Upscale 1080p video to 4K using Lanczos filtering
converso-ytdl upscale video.mkv --target 4k --method lanczos

Detailed Logging

converso-ytdl \
  --verbose \
  --log-file download.log \
  video "https://youtu.be/..."

# View logs
tail -f download.log

Rate Limiting & Proxies

converso-ytdl video "https://youtu.be/..." \
  --rate-limit 5M \
  --proxy "http://user:pass@proxy.example.com:8080"

REST API

Full API documentation at API_REFERENCE.md

Key Endpoints

Method Endpoint Purpose
GET /health Server health & statistics
GET /api/v1/info?url=... Video metadata
GET /api/v1/formats?url=... Available formats
POST /api/v1/jobs/video Start video download
POST /api/v1/jobs/audio Start audio download
POST /api/v1/jobs/batch Batch download
POST /api/v1/jobs/playlist Playlist download
GET /api/v1/jobs List all jobs
GET /api/v1/jobs/{id} Job status
GET /api/v1/jobs/{id}/download Download completed file
DELETE /api/v1/jobs/{id} Delete job record

Example: Python Client

import requests
import time

BASE_URL = "http://localhost:8000/api/v1"

# Start download
response = requests.post(
    f"{BASE_URL}/jobs/video",
    json={"url": "https://youtu.be/...", "container": "mkv"}
)
job_id = response.json()["job_id"]

# Poll status
while True:
    status = requests.get(f"{BASE_URL}/jobs/{job_id}").json()
    print(f"Status: {status['status']}")
    
    if status['status'] == "completed":
        print(f"Downloaded: {status['output_file']}")
        break
    elif status['status'] == "failed":
        print(f"Error: {status['error']}")
        break
    
    time.sleep(2)

Docker

Using Docker

# Build image
docker build -t converso-ytdl .

# Run downloader
docker run -v $(pwd)/downloads:/app/downloads converso-ytdl:latest \
  video "https://youtu.be/..."

# Run API server
docker run -d \
  -p 8000:8000 \
  -v $(pwd)/downloads:/app/downloads \
  converso-ytdl:latest \
  converso-ytdl-api --host localhost

Docker Compose

version: '3.8'

services:
  converso-api:
    image: converso-ytdl:latest
    container_name: converso-media-downloader
    ports:
      - "8000:8000"
    volumes:
      - ./downloads:/app/downloads
      - ./logs:/app/logs
    environment:
      - LOG_LEVEL=INFO
    command: converso-ytdl-api --host localhost --port 8000
    restart: unless-stopped

Troubleshooting

Common Issues

Q: "Video not available in your country"
A: Use --proxy flag or change your network location.

Q: "Permission denied" on output file
A: Ensure write permissions: chmod 755 downloads/

Q: "FFmpeg not found"
A: Install FFmpeg using your package manager.

Q: API server won't start
A: Ensure port 8000 is free: lsof -i :8000

Q: Memory usage very high
A: Reduce --workers (default 2) or memory-intensive operations.

Getting Help


Documentation

Comprehensive guides available:


Contributing

We welcome contributions! Please see CONTRIBUTING.md for:

  • How to report bugs
  • How to suggest features
  • Development setup
  • Pull request process
  • Code standards

License

Licensed under the Apache License 2.0. See LICENSE for details.

© 2025 Converso Empire – Professional Media Tools


Acknowledgments

Built with:

  • 🎬 yt-dlp - Media downloading engine
  • ⚡ FastAPI - Web framework
  • 🎨 Rich - Terminal formatting
  • 🎛️ FFmpeg - Media processing

Made with ❤️ by Converso Empire

⬆ Back to Top

Metadata

Release files for converso-ytdl 1.1.0b0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for converso-ytdl 1.1.0b0
File Size Uploaded
converso_ytdl-1.1.0b0.tar.gz 69.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for converso-ytdl 1.1.0b0
File Interpreter ABI Platform
converso_ytdl-1.1.0b0-py3-none-any.whl Python 3 none any Details

Total release size: 102.9 kB

Release files / converso_ytdl-1.1.0b0.tar.gz

Download URL converso_ytdl-1.1.0b0.tar.gz
Size 69.6 kB
Tags Source
SHA-256 checksum
How to use checksums
92b6b070d27cec7febaa61765841bca81358708528a389c3ec5c83150601fa67
BLAKE2b-256 checksum
How to use checksums
fbcf3463f85c12c36907da8957886853df030951095e514b93a4ca8e4c78f6bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 30, 2026.

Transparency log

Release files / converso_ytdl-1.1.0b0-py3-none-any.whl

Download URL converso_ytdl-1.1.0b0-py3-none-any.whl
Size 33.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d50464298715464156f1b51939fe46ee2c48f6f074bca7586eaa45e4f4b0e128
BLAKE2b-256 checksum
How to use checksums
c55d08da2f0f6a54c3a8807027cfef5191a0df28eb9a26c35ac208d2c1a815bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0b0 This release

2 release 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