Skip to main content

CLI to search TMDB, resolve VidSrc streams, and download via yt-dlp

Project description

vidsrc-dlp

Search TMDB, resolve a playable HLS stream via VidSrc's 4-hop chain, and download via yt-dlp.

Install

pip install vidsrc-dlp
cp .env.example .env  # add your TMDB_API_KEY

Or for local development:

git clone https://github.com/jeevan/vidsrc-dlp
cd vidsrc-dlp
python -m venv .venv && source .venv/bin/activate
pip install -e .
cp .env.example .env  # add your TMDB_API_KEY

Usage

# Movies
vidsrc-dlp "Inception"
vidsrc-dlp "The Matrix" --year 1999
vidsrc-dlp "Interstellar" --quality 1080p --no-confirm --verbose

# TV Shows
vidsrc-dlp "Breaking Bad" --type tv --season 1 --episode 1
vidsrc-dlp "Severance" --type tv --season 2 --episode 5

# Test with main.py (no install needed)
python main.py "Inception"

Output paths

Configure in .env or override via CLI:

MOVIES_DIR=./downloads/movies
TV_DIR=./downloads/tv
vidsrc-dlp "Inception" --movies-dir "/Volumes/Media/Movies"
vidsrc-dlp "Breaking Bad" --type tv --season 1 --episode 1 --tv-dir "/Volumes/Media/TV"

Naming convention

Movies:  {MOVIES_DIR}/Inception (2010)/Inception (2010).mp4
TV:      {TV_DIR}/Breaking Bad/Season 01/Breaking Bad - S01E01 - Pilot.mp4

Architecture

  1. TMDB — search API for movie/TV metadata
  2. VidSrc Resolverrequests-only 4-hop chain to extract an HLS URL
  3. Downloaderyt-dlp + ffmpeg to download and transcode to MP4

How the resolver works

vidsrc.to/embed/{movie|tv}/{tmdb_id}[/{season}/{episode}]
  → vsembed.ru iframe (parse src attr)
    → cloudorchestranova.com/rcp/{hash} (parse prorcp hash)
      → cloudorchestranova.com/prorcp/{hash} (m3u8 URLs with __TOKEN__ placeholders)
        → generate.php endpoints (JWT tokens)
          → final m3u8 URL

Adding a new stream provider

Implement StreamProvider from vidsrc_dlp.utils.

Acknowledgements

  • MaheshSharan/vidsrc — The request-based 4-hop resolution chain was reverse-engineered from this open-source PHP scraper. Critical reference for the VidSrc token flow.
  • TMDB — Movie and TV metadata API. All search, detail, episode info sourced from their free tier.
  • yt-dlp — The download engine. Handles HLS fragment fetching, decryption, and ffmpeg transcoding.
  • requests — HTTP library for the resolver chain.
  • python-dotenv — Environment variable loading from .env.

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

vidsrc_dlp-0.3.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

vidsrc_dlp-0.3.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file vidsrc_dlp-0.3.0.tar.gz.

File metadata

  • Download URL: vidsrc_dlp-0.3.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for vidsrc_dlp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 672a43d48c82f86e0e769222179a9c67258be263c1fa88315cf1222ce94a883b
MD5 9577135cb1bcfd230ee7e2e59396cca8
BLAKE2b-256 16c67f89315fa345e740dc8e8ea61f527bada76283d542d6173379555c67a475

See more details on using hashes here.

File details

Details for the file vidsrc_dlp-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: vidsrc_dlp-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for vidsrc_dlp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38efa77b5727094224dc94559fe52bb75f11bf5e1df0986b3ec9af31f245ba57
MD5 f4127ddf0874388d632a0a2c77182f6c
BLAKE2b-256 b859fd348298cc79aaf981617d2e9cf92a1e7fb9395243efb9724264acd61647

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