Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

VineTrimmer with PlayReady and WideVine support, WIP. A DRM Removal Framework for Streaming Services.

License

NotificationsYou must be signed in to change notification settings

chu23465/VT-PR

Repository files navigation

A tool to download and remove DRM from streaming services. Modified to remove Playready DRM in addition to Widevine DRM.

The nameVineTrimmer comes fromVine as inWideVine andTrimmer as in remove.

Read the README thoroughly atleast twice. I cannot stress how important this is. There is a reason why this README is so verbose.

DO NOT USE WITH AMZON. Amazon is currently banning accounts.

Refer to#87. I recommend temporarily usingthis

This project is under active development. Expect bugs and errors.

Disclaimer!!!

This project is ONLY for educational/archival/personal purposes. I do not condone piracy in any form.

By using this project you agree that:The developer shall not be held responsible for any account suspensions, terminations, penalties or legal action taken/imposed by third-party platforms. The User acknowledges and agrees that they are solely responsible for complying with all terms, policies, copyright and guidelines of any such platforms.

I AM NOT taking credit for the entirety of this project. This project is based on a version of an old fork ofdevine that was found floating around online. I AM taking credit for about 20% of the additional stuff that I personally worked on.

Support for Sport replays (VOD) or live streams is not planned. It's a whole thing with OTT panels and restreaming and whatnot. It's a can of worms that I don't plan on opening.

Supporters

@m41c0n

Features

  • Progress Bars for decryption (mp4decrypt, Shaka)
  • Reprovision .prd automatically after 2 days
  • ISM manifest support (Microsoft Smooth Streaming) (WIP/Experimental)
  • N_m3u8DL-RE downloader support (Experimental)
  • Atmos audio with ISM manifest (Amazon) is Fixed
  • Resume failed download has been implemented. If a track has been successfully downloaded previously and exists inTemp directory (encrypted or decrypted), VT will not download said track again.
  • Hybrid creation withdovi_tool. This feature is in Beta. Only tested so far on DisneyPlus. Needs more work. Ex: filenaming needs correction, temp directory is a mess after hybrid creation, use another tool insteal ofdovi_tool to get Profile 8.1 DV-HDR10+ instead of DV Profile 5 HDR10 compatible.

Usage

Windows

  1. Install Microsoft Visual C++ Redistributable -link.

  2. Ensure Python is installed in your system (cannot be from the the Microsoft Store). Refer tolink or on Ubuntu ->sudo apt install python3. I recommend python 3.10.11 (or higher). Python 3.13 does not work.

  3. Make sure git is installed in your system by runninggit --version. If not refer tolink.

  4. Choose a branch, eitherdev ormain. Use below command to download. (Recommended instead of downloading zip)

    git clone -b<branch-name> --single-branch https://github.com/chu23465/VT-PR
  5. Navigate and findinstall.bat.

  6. Runinstall.bat.

  7. Activate venv usingvenv.cmd.

  8. Run desired command using poetry.

Linux

This is in beta for Linux.

Command:

wget https://github.com/chu23465/VT-PR/raw/refs/heads/dev/install.sh && chmod +x install.sh && bash install.sh

Updating

  1. Backup yourvinetrimmer/Cookies/,vinetrimmer/Cache/,Downloads directories just in case.

  2. Open a command prompt and navigate yourVT-PR directory.

  3. Recall the branch you downloaded and modify below command accordingly:

    git pull origin<branch-name>

    Make suregit pull is successful. If not dogit stash and try again.

Config

vinetrimmer.yml located within the/vinetrimmer/ folder.

decryptor: eithermp4decrypt orpackager

(shaka-packager fails to decrypt files downloaded from ISM/Microsoft Smooth Streaming manifests)

tag: tag for your release group

CDM can be configured per service or per profile.

cdm:    default: {text}    Amazon: {text}

All other option can be left to defaults, unless you know what you are doing.

General Options

Usage: vt.cmd [OPTIONS] COMMAND [ARGS]...

Options:

Command line argumentDescriptionDefault Value
-d, --debugFlag to enable debug loggingFalse
-p, --profileProfile to use when multiple profiles are defined for a service."default"
-q, --qualityDownload Resolution ie Height of Video Track wanted1080
-cr, --closest-resolutionIf resolution specified is not found, defaults to closest resolution availableFalse
-v, --vcodecVideo CodecH264
-a, --acodecAudio CodecNone
-vb, --vbitrateVideo Bitrate,Min or a number based on output of --listMax
-ab, --abitrateAudio BitrateMax
-ac, --audio-channelsSelect Audio by Channels Configuration, e.g2.0,5.1,2.0,5.1None
-mac, --max-audio-compatabilitySelect multiple audios for maximum compatibility with all devicesFalse
-aa, --atmosPrefer Atmos AudioFalse
-r, --rangeVideo Color RangeHDR,HDR10,DV,SDRSDR
-w, --wantedWanted episodes, e.g.S01-S05,S07,S01E01-S02E03,S02-S02E03Default to all
-le, --latest-episodeDownload only the latest episode on episodes listFalse
-al, --alangLanguage wanted for audio.Defaults to original language
-sl, --slangLanguage wanted for subtitles.Defaults to original language
--proxyProxy URI to use. If a 2-letter country is provided, it will try get a proxy from the config.None
-A, --audio-onlyOnly download audio tracks.False
-S, --subs-onlyOnly download subtitle tracks.False
-C, --chapters-onlyOnly download chapters.False
-ns, --no-subsDo not download subtitle tracks.False
-na, --no-audioDo not download audio tracks.False
-nv, --no-videoDo not download video tracks.False
-nc, --no-chaptersDo not download chapters tracks.False
-ad, --audio-descriptionDownload audio description tracks.False
--listSkip downloading and list available tracks and what tracks would have been downloaded.False
--selectedList selected tracks and what tracks are downloaded.False
--cdmOverride the CDM that will be used for decryption.None
--keysSkip downloading, retrieve the decryption keys (via CDM or Key Vaults) and print them.False
--cacheDisable the use of the CDM and only retrieve decryption keys from Key Vaults. If a needed key is unable to be retrieved from any Key Vaults, the title is skipped.False
--no-cacheDisable the use of Key Vaults and only retrieve decryption keys from the CDM.False
--no-proxyForce disable all proxy use.False
-nm, --no-muxDo not mux the downloaded and decrypted tracks.False
--muxForce muxing when using --audio-only/--subs-only/--chapters-only.False
-ss, --strip-sdhStip SDH subtitles and convert them to CC. Plus fix common errors.False
-mf, --match-forcedOnly select forced subtitles matching with specified audio languageFalse
-?, -h, --helpShow this message and exit.False

Currently supported platforms:

COMMAND :-

AlaiasCommandService Link
AMZNAmazonhttps://amazon.com,https://primevideo.com
ATVPAppleTVPlushttps://tv.apple.com
DSNPDisneyPlushttps://disneyplus.com/
HSHotstarhttps://www.hotstar.com/
HULUHuluhttps://hulu.com
iTiTuneshttps://itunes.apple.com
MAXMaxhttps://max.com
PCOKPeacockhttps://peacocktv.com/

Untested or not fully implemeted services:

AlaiasCommandService Link
JCJioCinemahttps://www.jiocinema.com
MAMoviesAnywherehttps://moviesanywhere.com
NFNetflixhttps://netflix.com
PMTPParamountPlushttps://paramountplus.com
SLSonyLivhttps://sonyliv.com

Amazon Specific Options

Usage: vt.cmd AMZN [OPTIONS] [TITLE]

Service code for Amazon VOD (https://amazon.com) and Amazon Prime Video (https://primevideo.com).

Authorization: Cookies

Security:

UHD@L1/SL3000FHD@L3(ChromeCDM)/SL2000SD@L3Certain SL2000 can do UHD

Maintains their own license server like Netflix, be cautious.

Region is chosen automatically based on domain extension found in cookies.Prime Video specific code will be run if the ASIN is detected to be a prime video variant.Use 'Amazon Video ASIN Display' for Tampermonkey addon for ASINhttps://greasyfork.org/en/scripts/496577-amazon-video-asin-display

Below flags to be passed after theAMZN orAmazon keyword in command.

ARGS:

Command Line SwitchDescription
-b, --bitrateVideo Bitrate Mode to download in. CVBR=Constrained Variable Bitrate, CBR=Constant Bitrate. (CVBR or CBR or CVBR+CBR)
-c, --cdnCDN to download from, defaults to the CDN with the highest weight set by Amazon.
-vq, --vqualityManifest quality to request. (SD or HD or UHD)
-s, --singleForce single episode/season instead of getting series ASIN.
-am, --amanifestManifest to use for audio. Defaults to H265 if the video manifest is missing 640k audio. (CVBR or CBR or H265)
-aq, --aqualityManifest quality to request for audio. Defaults to the same as --quality. (SD or HD or UHD)
-ism, --ismSet manifest override to SmoothStreaming. Defaults to DASH w/o this flag.
-?, -h, --helpShow this message and exit.

To get Atmos/UHD/4k with Amazon, navigate to -

https://www.primevideo.com/mytv

Remember that not all titles have 4K/Atmos/HDR/DV.

Login and get to the code pair page. Extract cookies from that page usingOpen Cookies.txt.

Save it to the pathvinetrimmer/Cookies/Amazon/default.txt. Pay attention to path if you are on Linux. Path is case sensitive.

When caching cookies, use a profile without PIN. Otherwise it may cause errors.

If you are facing 403 or 400 errors even after saving fresh cookies and clearingCache folder, try logging out of your Amazon account in the browser and logging back in. Then save cookies.

Some titles sayUHD/2160p is available and if VT is sayingno 2160p track available, thenUHD/2160p is only available via renting. As in some titles advertise UHD but UHD will not be available to PrimeVideo customers. You will have to rent the title using the Rent button on the title page in UHD quality.

If you are getting anAssertionError with Amazon, then try reprovisioning the device. I have included a batch script in thevinetrimmer/devices/ directory to do this. Simply execute the script and try again.

If you are gettingTooManyDevices error or Amazon is giving you trouble with some weird error, then logout in the browser, log back in, extract and use fresh cookies. Try also deletingvinetrimmer/Cache/AMZN/.

If you want to try a different CDM, you will need the corresponding DeviceTypeID (DTID) put intoamazon.yml. As far as I know, you would need to sniff the traffic from the device (with the CDM) to get the DTID.

If you are gettingPRS.NoRights error, then there are 3 possible explantations for it. One, CDM simply needs to be reprovisioned. Two, you are using the incorrect DTID for the given CDM. Three, the Amazon has revoked or downgraded the CDM to only HD/SD quality.

If your region has ad-free subscription tier, you will need the ad-free subscription tier for 4K/HDR/DV.

Newer titles only have 4k in ISM manifest. So you will need to use the--ism flag.

Peacock

  • PCOK bans leaked certs quickly (for 4k), be cautious.
  • Authorization - cookies saved tovinetrimmer/Cookies/Peacock/default.txt

Hotstar

  • To use, login to Hotstar and navigate tohttps://www.hotstar.com/{region}/home. Extract cookies from that page and save to pathvinetrimmer\Cookies\Hotstar\default.txt (Case sensitive).
  • Otherwise add credentials tovinetrimmer.yml. An example is given.
  • A free account has access to lots of content.
  • Hotstar requires an Indian (+91) phone number to signup to Indian region, even for free account.
  • Hates VPN's, get a residential proxy of some sort.
  • All content is licensed via Widevine L3 or has no DRM.

DisneyPlus

  • Needs only credentials added tovinetrimmer.yml.
  • Requires you to use-m or--movie flag if you are downloading a movie. Append flag to end of your command.
  • From my testing, when using with VPN, it causes lots of issues, mainly needing to clearCache folder and login repeatedly. Use residential proxies if available. Don't hammer service. Try waiting a minute or two before logging in again.
  • If you are gettingNo 2160p track found error for a title you know has 4k, then try passing-r DV or-r HDR. Make sure your account can access highest qualities.
  • Should be more stable now when using proxy. But do be careful. We don't use proxy for downloading segments, which means your IP could get temporarily banned from DSNP servers (i.e persistent 403 errors). If you download the same title multiple times or many titles/episodes at once/too quickly your IP address could get banned. Happened to me while testing.

Hulu

  • Authorization: cookies saved tovinetrimmer/Cookies/Hulu/default.txt
  • Windscribe VPN sometimes fails. Simply try again.

iTunes

Authorization: Cookies saved to default.txtSecurity: UHD@L1 FHD@L1 HD@L1 SD@L3

This is iTunes via rential channel on AppleTVPlus.

Login to iTunes in a browser. Try playing a movie. It'll redirect you totv.apple.com. Cache cookies from that page tovinetrimmer/Cookies/iTunes/default.txt.

Requires you to use-m or--movie flag if you are downloading a movie. Append flag to end of your command.

Example Command

Amazon Example:

poetry run vt dl -al en -sl all --selected -q 2160 -r HDR -w S01E18-S01E25 AMZN -b CBR --ism 0IQZZIJ6W6TT2CXPT6ZOZYX396

Above command:

  • gets english audio,
  • gets all available subtitles,
  • selects the HDR + 4K track,
  • gets episodes from S01E18 to S01E25 from Amazon
  • with CBR bitrate,
  • tries to force ISM
  • and the title-ID is 0IQZZIJ6W6TT2CXPT6ZOZYX396

AppleTV Example:

poetry run vt dl -al en,it -sl en,es -q 720 --proxy http://192.168.0.99:9766 -w S01E01 ATVP umc.cmc.1nfdfd5zlk05fo1bwwetzldy3

Above command:

  • gets english, italian audio
  • gets english, spanish subtitles,
  • lists all possible qualities,
  • selects 720p video track,
  • uses the proxy for licensing,
  • gets the first episode of first season (i.e S01E01)
  • of the title-ID umc.cmc.1nfdfd5zlk05fo1bwwetzldy3

Max Example:

poetry run vt dl -al en -sl en --keys --proxy http://192.168.0.99:9766 MAX https://play.max.com/show/5756c2bf-36f8-4890-b1f9-ef168f1d8e9c

Above command:

  • gets english subtitles + audio,
  • skips download and only gets the content keys,
  • from MAX
  • uses specified proxy
  • defaulting to HD for video
  • title-ID is 5756c2bf-36f8-4890-b1f9-ef168f1d8e9c

Hotstar Example:

poetry run vt dl -al en -sl en -q 2160 -v H265 HS https://www.hotstar.com/in/movies/hridayam/1260083403

Above command:

  • gets english subtitles + audio,
  • sets video codec to H265 codec,
  • sets video quality (ie. resolution) to 2160p,
  • Gets highest quality video/audio available.
  • title-ID is 1271342309

Max Audio Compatability (MAC)

I have added a special flag called--max-audio-compatability or-mac for maximum compatibility with all devices. If passed with--acodec aac,ec3 -ac 2.0,5.1 will select 3 audios like below

2025-04-24 16:54:23 [I] Tracks : ├─ AUD | [E-AC3] | [ec-3] | 5.1 | 640 kb/s | en-US | [Original]2025-04-24 16:54:23 [I] Tracks : ├─ AUD | [E-AC3] | [ec-3] | 2.0 | 224 kb/s | en-US | [Original]2025-04-24 16:54:23 [I] Tracks : ├─ AUD | [AAC] | [mp4a] | 2.0 | 128 kb/s | en-US | [Original]

If-mac not passed but only--acodec aac,ec3 -ac 2.0,5.1 passed, will select 2 audios.

2025-04-24 17:10:04 [I] Tracks : ├─ AUD | [E-AC3] | [ec-3] | 5.1 | 640 kb/s | en-US | [Original]2025-04-24 17:10:04 [I] Tracks : ├─ AUD | [AAC] | [mp4a] | 2.0 | 128 kb/s | en-US | [Original]

Proxy

I recommendWindscribe. You can sign up, getting 10 GB of traffic credit every month for free. We use the VPN for everything except downloading video/audio.Tested so far on Amazon, AppleTVPlus, Max, and DisneyPlus.

Steps:

  1. For each service, within get_tracks() function we do this below. Below is only when you are integrating a new service yourself. Set needs_proxy to True if your service needs proxy to get manifest (Ex - Netflix, Hotstar).

    fortrackintracks:track.needs_proxy=False

    This flag signals that this track does not need a proxy and a proxy will not be passed to downloader even if proxy given in CLI options.

  2. Download Windscribe app and install it.

  3. Go toOptions ->Connection ->Split Tunneling. Enable it.

    SetMode asInclusive.

  4. Go toOptions ->Connection ->Proxy Gateway. Enable it. SelectProxy Type asHTTP.

    Copy theIP field (will look something like192.168.0.141:9766).

    Pass above copied to Vinetrimmer with the proxy flag like below.

    ...(other flags)... --proxy http://192.168.0.141:9766 .......

    If you are using other VPNs, extract the proxy (use the browser extension to do this). It will look something likehttp(s)://username:pass@host/IP:PORT. Ex ->https://user:pass@domain.com:443. Pass it like below:

     ...(other flags)... --proxy https://user:pass@domain.com:443 .......

Other

  • For--keys to work with ATVP you need to pass the--no-subs flag.

  • Errors arise when running VT within Docker or Conda like python environments. Make sure to use proper python3.

  • To use programs inscripts folder, first activate venv then, then -

    poetry run python scripts/ParseKeybox.py
  • There is another way of running this instead of usingpoetry. In root folder of VT-PR there is avt.py (which is essentially the same asvinetrimmer/vinetrimmer.py). Activate venv, then:

    python vt.py dl ......(rest of thecommand as before).......

    This is useful for debugging/stepping through in IDE's without having to deal with poetry.

  • Nuitka compile:

    • Activate venv, then

    • python -m pip install nuitka

    • Verify using commandnuitka --version

    • Then:

      nuitka --standalone --output-dir=dist --windows-console-mode=force vt.py --include-data-dir=./vinetrimmer/=vinetrimmer/ --include-data-dir=./binaries/=binaries
    • --standalone will give a folder of compiled pythonic objects. Zip it to distribute. This is recommended.

    • If you don't want to carry around/deal with a zip, instead use--onefile. This has the drawback of setting the default folders to the temp folder in whatever OS you are using. This could be fixed with some extra code but that is currently not implemented.

    • Refer tolink if anything errors out.

Broken / To-Do (Descending order of priority)

  • First stable release
  • Shaka with progress bar repository
  • Add download speed limit to avoid IP bans.
  • Linux support - Debian/Ubuntu/Mint + Fix service config load for Linux.
  • Single script that installs, and if already installed checks for and applies updates
  • Replace poetry with uv
  • Addm4ffdecrypt
  • Add a version.py
  • Downloader field in config, per service.
  • Make a script to download latest binaries for vt automatically at startup.
  • Detect if running as Nuikta compiled binary, then in vt.py set directories relative to binary path
  • Find a way to estimate final file size for a track. Check if enough space is left on disc for double the amount of selected tracks - since mp4decrypt and Nm3u8 both make copies of the files
  • Merge DB script
  • Latest mkvtoolnix for linux
  • Modify aria2c to include a progress bar ?
  • Github Actions Python script that builds and publishes release for every commit to not readme.md
  • MAX - Fix HDR10/DV --list
  • Fix original language (Was removed as workaround for a bug)
  • Fix-sl all and-al all
  • Make a windscribe.py for proxies modelled after nordvpn.py. Refer to the chrome extension for the code.
  • Move to requests, curl or otherwise to download subtitles (?)
  • Replace track.dv, track.hdr10 with track.PQ. Value will be an enum. This will require a major-ish rewrite.
  • Netflix service is currently broken (will probably be fixed Soon™)
  • Integratesubby
  • Licensing before download (?)
  • Test and fix MoviesAnywhere, ParamountPlus, services.
  • Guide for writing a service + debugging
  • Implement a scan/hammer/cache keys for each service - pass string of zeros as title id. Then copy and rework dl.py to iterate over returned list of titles from scan function

Amazon Specific

  • Refresh Token for Amazon service
  • Pythonic implementation of init.mp4 builder for ism manifest for avc, hvcc, dv, ac3, eac3, eac3-joc codecs
  • Make a pure python requests based downloader for ISM/MSS manifest. Write init.mp4 then download each segment to memory, decrypt in memory and write it to a binary merged file. Download segments in batches. Batch size based on thread count passed to program. Download has to be sequentially written.
  • --bitrate CVBR+CBR is currently broken
  • Get highest quality CBR and CVBR MPD+ISM by default to AMZN
  • Specify devices in config for MPD or ISM then load one based on command
  • For videos, download init.mp4 using N_m3u8, mediainfo it to get FPS, HDR info
  • Manifest url caching system for every key/Track object.

If anyone has any idea how to fix above issues, feel free to open a pull request.

Donating

I am an independent developer right now. I work on this project in my free time. If you could support me that would be immensely helpful. All supporters will get a special mention in the README. Thank you in advance.

My BuyMeACoffee account was suspended so contact me on discord to donate.

My Discord is@crapola or@chupola. You will need to join a server I'm in to message me. Join one of the servers mentioned below.

Credits

@rlaphoenix forpywidevine

@rlaphoenix again as he was the original developer behind theVineTrimmer baseWidevine version (later renamed todevine) .

@DevLARLEY forpyplayready

@FieryFly for an additional MAX fix.

@vevv forsubby

@globocom form3u8

@Wiesiek on Discord for a few ideas

DRM-Lab-Project for numerous bug fixes and support.

Playready-Discord for numerous bug fixes and support.

Various members of the above mentioned Discord servers for testing, bug reporting, fixes etc. Thank You :)

CDRM-Project and@TPD94,@radizu for getting me started on this journey, being a source of inspiration and for keeping a community well and alive.

@m0ck69 for sharing a DisneyPlus account for testing purposes.

@methflix for sharing a Hulu account for testing purposes.

The services included here were not written by me. They were either found in the mentioned Discord servers or shared by an individual. If anyone feels like they deserve a credit in the README, open an issue and I'll add you.

Star History

Star History Chart

About

VineTrimmer with PlayReady and WideVine support, WIP. A DRM Removal Framework for Streaming Services.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp