Coder Social home page Coder Social logo

drm-dash-stream-downloader's Introduction

Drm Dash stream downloader

Description

Downloads MPEG-DASH Cenc based drm contents by parsing the manifest if the keyID and key is known.

Requirements

  1. You would need to download ffmpeg and mp4decrypter from Bento4 SDK and ensure they are in path(typing their name in cmd invokes them).
  2. Dash-IF conforming Manifest file having information about the cenc keyID ,PSSH box information.
  3. Basic python knowledge to edit the script's manifest parser function according to your manifest and set your prefered download location.

Usage

  1. Clone the repository
  2. Install the requirements in requirements.txt using pip
  3. Find the manifest(mpd) file you would want to download and copy its url (Use Devtools if in a browser.)
  4. View the mpd file and check if it uses single mp4 segment or multi segments($Number_xx$.mp4)
  5. If it is of multi segments then use dashdownloader_multisegment.py
  6. Paste the mpd url in the script at the bottom inside the standalone check condition in mpd variable.
  7. Run the script after checking requirements are satisfied.

Note

CBCS and SAMPLE-AES contents need to be manually analyzed and the script has to be modified for decrypting those content.

drm-dash-stream-downloader's People

Contributors

alvarobeiro avatar jayapraveen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drm-dash-stream-downloader's Issues

Could you, Please, make Windows Binaries!?

Hello, "Jayapraveen"!

Could you, Please, build windows binaries, which can be used and under Windows XP 64bit version?
And there to be included all the nessesery files (like "mp4decrypter", FFMpeg and others needed). One to can set if the stream is multi-segmented or not. I mean all the options to be configurable. The possibility to inititally modify the encryption method, keys and so on!

Thank You!!!

Peter

implement code

is this the correct way to use this

python ./dashdownloader.py https:_______.mpd -o. -d

becasue this way dont download for me
thanks

Wiki

A bit more info on a how to would be great. Even if it's a one line example of usage.

[KeyError] Key not found

def decrypt(filename,keyid,video_title):
    try:
        key = keyfile[keyid]
        print(key)
        os.system(f"ffmpeg -y -decryption_key {key} -i {filename} -codec copy -metadata title={video_title} dec_{filename}")
    except KeyError as error:
        print("Key not found")
        exit()

The above function tries to fetch the decryption key from the "keyfile.json" file with the Key ID.

Where do we get the decryption key?

How does this program work?

How can I download encrypted video from Udemy.com?

It uses Widevine L3 DRM, video is cut into many pieces.

I would like to download the video then decrypt it on my PC.

I have the decrypt keys as well.

Error: expected 4, got 2

Why I get this error do you have any idea
and thank you by the way i didn't know there is people have your ability to make it


Traceback (most recent call last):
  File "dashdownloader.py", line 142, in <module>
    video_url,video_keyid,audio_url,audio_keyid = manifest_parser(mpd)
ValueError: not enough values to unpack (expected 4, got 2)

NBA League Pass

Can you help me how to use it for nba league pass streams ?

Hai there

Actually i need to download videos from a website which is DRM protected but I can't and I couldn't understand your code can you help me with downloading those videos coz it will use full for me for my higher studies

Issue with a dash live stream

C:\Users\Downloads\Drm-Dash-stream-downloader-master\Drm-Dash-stream-downloader-master\dashdownloader.py:77: SyntaxWarning: "is" with a literal. Did you mean "=="?
 if video.status_code is 200:
Traceback (most recent call last):
  File "C:\Users\Downloads\Drm-Dash-stream-downloader-master\Drm-Dash-stream-downloader-master\dashdownloader.py", line 142, in <module> video_url,video_keyid,audio_url,audio_keyid = manifest_parser(mpd)
  File "C:\Users\Downloads\Drm-Dash-stream-downloader-master\Drm-Dash-stream-downloader-master\dashdownloader.py", line 60, in manifest_parser
base_url = repr.base_urls[0].base_url_value
TypeError: 'NoneType' object is not subscriptable

Here is the MPD Link

MPD

Can you help with an MPD Im getting error

File "D:\Users\chris\Drm-Dash-stream-downloader-master\dashdownloader_multisegment.py", line 212, in
media_info = manifest_parser(mpd)
File "D:\Users\chris\Drm-Dash-stream-downloader-master\dashdownloader_multisegment.py", line 171, in manifest_parser
running_time = durationtoseconds(mpd.media_presentation_duration)
File "D:\Users\chris\Drm-Dash-stream-downloader-master\dashdownloader_multisegment.py", line 50, in durationtoseconds
if(period[:2] == "PT"):
TypeError: 'NoneType' object is not subscriptable

Im not sure how to edit script for the mpd I'm using can you provide any examples

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.