Skip to main content

YouTube Video Downloader & Media Library

A self-hosted web application for inspecting YouTube videos, downloading permitted content, and managing a local media library.

Current status

This project currently supports:

  • YouTube single-video inspection
  • Resolution selection
  • Non-blocking download jobs
  • Progress tracking
  • Saved media library
  • Open / download / delete actions
  • Docker-based local deployment
  • PostgreSQL persistence
  • Alembic migrations

Important usage note

Use this software only for content you own, control, or are otherwise permitted to download and store.

This project is intended as a self-hosted tool. Operators are responsible for ensuring their usage complies with applicable platform terms, copyright obligations, and local law.

Features

  • Paste a YouTube URL and inspect metadata
  • Choose a resolution before download
  • Queue a download without blocking the UI
  • Track job status and progress
  • Prevent duplicate library entries for the same URL and resolution
  • Search media and jobs
  • Retry failed jobs
  • View simple admin stats
  • Run locally or via Docker Compose

Stack

Frontend

  • React
  • TypeScript
  • Vite

Backend

  • FastAPI
  • SQLAlchemy
  • Alembic
  • yt-dlp
  • FFmpeg

Data / Infra

  • PostgreSQL
  • Docker Compose

Architecture summary

The application currently uses:

  • FastAPI backend API
  • PostgreSQL for persistence
  • Alembic for schema migrations
  • Docker Compose for local container orchestration
  • In-process background threading for download execution

Current limitation

Background downloads are currently executed in-process via Python threads.

That is acceptable for the current single-instance baseline, but it is not yet the final multi-worker production architecture. A dedicated worker/queue model can be introduced later.

Project structure

.
├── app/
│   ├── main.py
│   ├── config.py
│   ├── db.py
│   ├── models.py
│   ├── schemas.py
│   ├── tasks.py
│   └── services/
├── migrations/
├── web/
├── docker/
├── downloads/
├── docker-compose.yml
├── alembic.ini
├── requirements.txt
└── README.md

Local development

See docs/SETUP.md

Docker quick start

  1. Copy environment file values as needed.
  2. Start the stack:
docker compose up --build
  1. Open:
  • Frontend: http://localhost:8080
  • Backend health: http://localhost:8000/health
  • API docs: http://localhost:8000/docs

API overview

Health

  • GET /health

Admin

  • GET /admin/stats

Inspect

  • POST /inspect

Downloads

  • POST /download
  • GET /downloads
  • GET /downloads/{job_id}
  • POST /downloads/{job_id}/retry

Media

  • GET /media
  • GET /media/{media_id}/file
  • GET /media/{media_id}/download
  • DELETE /media/{media_id}

Environment variables

Backend

  • DATABASE_URL
  • FFMPEG_LOCATION
  • DOWNLOADS_DIR
  • MAX_VIDEO_DURATION_SECONDS
  • MAX_ACTIVE_DOWNLOADS
  • ALLOWED_SOURCE_HOSTS
  • CORS_ORIGINS

Frontend

  • VITE_API_BASE_URL

See:

Screenshots

Add screenshots here later:

  • main downloader screen
  • inspect result with formats table
  • active job progress
  • saved media library
  • admin stats

Roadmap

  • dedicated worker queue
  • cancel active job
  • pagination controls in UI
  • auth and role separation
  • cloud object storage support
  • better operational metrics
  • release automation
  • test suite expansion

Troubleshooting

See docs/OPERATIONS.md

Releases

See docs/RELEASE.md

Changelog

See CHANGELOG.md

Licence

smx-youtube-app

Installable companion YouTube media app for SyntaxMatrix-based client ecosystems.

This package is intentionally separate from the SyntaxMatrix framework itself.
Client projects that need the YouTube app can install and run it as a companion service.
Client projects that do not need it do not install it.

What it provides

  • FastAPI backend
  • PostgreSQL persistence
  • Alembic migrations
  • Packaged frontend served by the backend
  • CLI entry point: smx-youtube

Requirements

  • Python 3.11+
  • PostgreSQL
  • Docker Desktop recommended for local PostgreSQL
  • Node.js is only required by maintainers when rebuilding the frontend bundle

Install

pip install smx-youtube-app

Metadata

Release files for smx-youtube-app 0.1.8

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

Source distribution (sdist)

Source distribution for smx-youtube-app 0.1.8
File Size Uploaded Provenance Actions
smx_youtube_app-0.1.8.tar.gz 4.5 kB Without provenance Details for smx_youtube_app-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for smx-youtube-app 0.1.8
File Interpreter ABI Platform Actions
smx_youtube_app-0.1.8-py3-none-any.whl Python 3 none any Details for smx_youtube_app-0.1.8-py3-none-any.whl

Total release size: 320.9 kB

Release files / smx_youtube_app-0.1.8.tar.gz

Download URL smx_youtube_app-0.1.8.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0cb9c181a3d807b47c2790c35d95a103682c075e4ec8274b415dbb72d7a53f9f
BLAKE2b-256 checksum
How to use checksums
000ea4b081ca0407ffbc04457263eb951e522cbf7b20b0fa18a1c2050c53b1af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release files / smx_youtube_app-0.1.8-py3-none-any.whl

Download URL smx_youtube_app-0.1.8-py3-none-any.whl
Size 316.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d72d8f9f5f289240aa16948b921edb539cc20d282f5e0984cdcd1feba6a2fa09
BLAKE2b-256 checksum
How to use checksums
849a341b5609957e3aea8adf383519bcd45ecf04f7b4de5eb690b6a42b327697
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Security for smx-youtube-app 0.1.8

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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