Skip to main content

A downloader for DRM-protected & Non DRM-protected content.

Project description

DDownloader

DDownloader is a powerful Python-based tool and library designed to download and decrypt DRM-protected content from DASH, HLS, and ISM manifests. It provides seamless support for encrypted media streams, extracting metadata and ensuring high compatibility with various DRM standards.

Features

  • Download and Decrypt: Supports DASH, HLS, and ISM manifests with seamless decryption using provided keys.
  • Automatic Detection: Automatically detects manifest types (.mpd, .m3u8, .ism) and processes accordingly.
  • Media Information Extraction: Extracts metadata (e.g., codec, resolution, duration) for .mp4 files and saves it in a logs/ directory.
  • CLI and Library Support: Flexible usage via command-line or Python library.
  • Detailed Logging: Provides real-time progress and logs errors for debugging.

Requirements

  • Python: Version 3.7 or higher.

  • Required binaries:

    • N_m3u8DL-RE for downloading protected DRM content.
    • mp4decrypt for decrypting protected media files.
    • ffmpeg for re-encoding and muxer method
    • a proper environment variable configuration for binaries.

Installation

  • Install DDownloader using pip:

     pip install DDownloader
    

Usage

  • Download Content:

     from DDownloader.modules.downloader import DOWNLOADER
    
     downloader = DOWNLOADER()
     downloader.manifest_url = "https://example.com/path/to/manifest"  # DASH, HLS, or ISM manifest URL
     downloader.output_name = "output.mp4"  # Desired output file name
     downloader.decryption_keys = ["12345:678910"]  # Provide decryption keys if needed
     downloader.download()  # Start the downloading and decryption process
    
  • Extract Media Information:

     from DDownloader.modules.helper import get_media_info
    
     file_path = "downloads/example.mp4"
     media_info = get_media_info(file_path)
     print(media_info)
    
  • Re-encoding:

     from DDownloader.modules.downloader import DOWNLOADER
    
     re_encode = DOWNLOADER()
     quality = ["HD", "FHD", "UHD"]
     input_content = "downloads/example.mp4"
     output_content = "/path/to/output.mp4"
     re_encode.re_encode_content(input_file=input_content,quality=quality,codec="libx265",crf=20,preset="medium")
    

CLI Usage

  • Download Media

     DDownloader -u https://example.com/path/to/manifest -o output.mp4
    
  • Specify Decryption Keys

     DDownloader -u https://example.com/path/to/manifest -o output.mp4 -k 12345:678910
    
  • Re-encoding

     DDownloader -i "input.mp4" -o "output.mp4" -q "HD, FHD, UHD"
    
  • Display Help

     DDownloader -h
    
  • image

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

ddownloader-0.4.7.tar.gz (70.6 MB view details)

Uploaded Source

Built Distribution

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

ddownloader-0.4.7-py3-none-any.whl (70.8 MB view details)

Uploaded Python 3

File details

Details for the file ddownloader-0.4.7.tar.gz.

File metadata

  • Download URL: ddownloader-0.4.7.tar.gz
  • Upload date:
  • Size: 70.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for ddownloader-0.4.7.tar.gz
Algorithm Hash digest
SHA256 8163626a5dd7187ac599a4d4d84cef9f57bacabd98ed62b629186c07491c54bc
MD5 3cf7dbd0640e70f54ad623c207080660
BLAKE2b-256 e82c452b1cc52314077b87fcc194f169fbeee233ca20254cca04fb7df6473488

See more details on using hashes here.

File details

Details for the file ddownloader-0.4.7-py3-none-any.whl.

File metadata

  • Download URL: ddownloader-0.4.7-py3-none-any.whl
  • Upload date:
  • Size: 70.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for ddownloader-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d4892873b9bb8f72b4f5293a5a90cd0b6b94ab90618d7bce256082f3144dd6b0
MD5 d09c6916e2bc7c5f799f3a3c8081f524
BLAKE2b-256 a70ac2467284cd97d81faa6fbc95da05ba612f2de0b803f1c07fc4642894d71b

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