Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to use Devine as a standalone downloader for downloading/decrypting HLS and DASH links. #113

Open
NoteBurner opened this issue May 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@NoteBurner
Copy link

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Devine has some amazing capabilities for parsing and handling HLS and DASH links. I think it would be nice if we could use Devine as a standalone downloader with our other projects. For example, I am suggesting something like this:

from devine import standalone_downloader

url = "some url.mpd"
keys = "kid1:key1,kid2:key2,kid3:key3"
headers = {}
proxies = {}
standalone_downloader.download(
    url, 
    keys=keys, 
    headers=headers, 
    proxies=proxies, 
    type="dash", 
    downloader="curl_cffi", 
    decryptor="shaka_packager", 
    muxer="mkvmerge", 
    threads=4, 
    output_path="./some_dir", 
    output_name="some_name", 
    output_format="mkv", 
    audio_quality="best", 
    video_quality="best", 
    sub_lang="en"
)

OR

devine standalonedl url --keys "kid1:key1" --headers "header string" --proxies "proxy string" --type "dash" --downloader "curl_cffi" --decryptor "shaka_packager" --muxer "mkvmerge" --threads 4 --output-path "./some_dir" --output-name "some_name" --output-format "mkv" --audio-quality "best" --video-quality "best" --sub-lang "en"

I am not saying I want exactly the examples above. I am just suggesting implementing a similar way of using Devine for downloading a given DASH/HLS URL with the provided keys, headers, etc. Whether this is done directly via Python, like in my first example, or via the command line, like in my second example, would be up to you.

I do not know if it is possible to implement this behavior, but if it is, it would be amazing. I personally know that Devine can parse and handle some HLS/DASH URLs and download and decrypt them faster and better than some tools like yt-dlp or N-M3U8DL-RE. The only downside is that it requires separate service code to be written for each service. If we could use Devine for universally downloading and decrypting HLS/DASH URLs, it would be really cool.

I hope you will take this into consideration. Thank you.

Describe alternatives you've considered
N/A

Additional context
N/A

@NoteBurner NoteBurner added the enhancement New feature or request label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant