Few changes

This commit is contained in:
chu23465 2025-04-30 07:56:03 +05:30
parent ece2b50cad
commit a80eb98e36
3 changed files with 49 additions and 24 deletions

View File

@ -210,6 +210,8 @@ To get Atmos/UHD/4k with Amazon, navigate to -
https://www.primevideo.com/region/eu/ontv/code?ref_=atv_auth_red_aft https://www.primevideo.com/region/eu/ontv/code?ref_=atv_auth_red_aft
``` ```
Remember that not all titles have 4K/Atmos/HDR/DV.
Login and get to the code pair page. Extract cookies from that page using [Open Cookies.txt](https://chromewebstore.google.com/detail/open-cookiestxt/gdocmgbfkjnnpapoeobnolbbkoibbcif). Login and get to the code pair page. Extract cookies from that page using [Open Cookies.txt](https://chromewebstore.google.com/detail/open-cookiestxt/gdocmgbfkjnnpapoeobnolbbkoibbcif).
Save it to the path `vinetrimmer/Cookies/Amazon/default.txt`. Pay attention to path if you are on Linux. Path is case sensitive. Save it to the path `vinetrimmer/Cookies/Amazon/default.txt`. Pay attention to path if you are on Linux. Path is case sensitive.
@ -224,6 +226,13 @@ If you are getting an `AssertionError` with Amazon, then try reprovisioning the
If you are getting `TooManyDevices` 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 deleting `vinetrimmer/Cache/AMZN/`. If you are getting `TooManyDevices` 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 deleting `vinetrimmer/Cache/AMZN/`.
If you want to try a different CDM, you will need the corresponding DeviceTypeID (DTID) put into `amazon.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 getting `PRS.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 ### Peacock
@ -245,12 +254,12 @@ If you are getting `TooManyDevices` error or Amazon is giving you trouble with s
- Requires you to use `-m` or `--movie` flag if you are downloading a movie. Append flag to end of your command. - 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 clear `Cache` folder and login repeatedly. Use residential proxies if available. Don't hammer service. Try waiting a minute or two before logging in again. - From my testing, when using with VPN, it causes lots of issues, mainly needing to clear `Cache` 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 getting `No 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. - If you are getting `No 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 banned from DSNP servers (ie persistent 403 errors). If you download the same title multiple times or many titles at once your IP address could get banned. This happened to me while testing. - 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 ### Hulu
- Authorization: cookies saved to `vinetrimmer/Cookies/Hulu/default.txt` - Authorization: cookies saved to `vinetrimmer/Cookies/Hulu/default.txt`
- Windscribe VPN sometimes fails - Windscribe VPN sometimes fails. Simply try again.
### Example Command ### Example Command
@ -397,7 +406,7 @@ Tested so far on Amazon, AppleTVPlus, Max, and DisneyPlus.
- [ ] First stable release - [ ] First stable release
- [ ] Shaka with progress bar repository - [ ] Shaka with progress bar repository
- [ ] Fix CDM type errors. - [ ] Add download speed limit to avoid IP bans.
- [ ] Linux support - Debian/Ubuntu/Mint + Fix service config load for Linux. - [ ] Linux support - Debian/Ubuntu/Mint + Fix service config load for Linux.
- [ ] Single script that installs, and if already installed checks for and applies updates - [ ] Single script that installs, and if already installed checks for and applies updates
- [ ] Replace poetry with uv - [ ] Replace poetry with uv
@ -423,6 +432,7 @@ Tested so far on Amazon, AppleTVPlus, Max, and DisneyPlus.
- [ ] Guide for writing a service + debugging - [ ] 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 - [ ] 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 ### Amazon Specific
- [ ] Refresh Token for Amazon service - [ ] Refresh Token for Amazon service
@ -442,24 +452,30 @@ I am an independent developer right now. I work on this project in my free time.
My BuyMeACoffee account was suspended so contact me on discord to donate. My BuyMeACoffee account was suspended so contact me on discord to donate.
My discord is `@crapola` My Discord is `@crapola` or `@chupola`.
## Credits ## Credits
[@rlaphoenix](https://github.com/rlaphoenix) for [pywidevine](https://github.com/devine-dl/pywidevine) [@rlaphoenix](https://github.com/rlaphoenix) for [pywidevine](https://github.com/devine-dl/pywidevine)
[@rlaphoenix](https://github.com/rlaphoenix) again as he was the original developer behind the `VineTrimmer` base (later renamed to `devine`) `Widevine` version. [@rlaphoenix](https://github.com/rlaphoenix) again as he was the original developer behind the `VineTrimmer` base `Widevine` version (later renamed to `devine`) .
[@DevLARLEY](https://github.com/DevLARLEY) for [pyplayready](https://git.gay/ready-dl/pyplayready) [@DevLARLEY](https://github.com/DevLARLEY) for [pyplayready](https://git.gay/ready-dl/pyplayready)
[@FieryFly](https://github.com/FieryFly) for an additional MAX fix. [@FieryFly](https://github.com/FieryFly) for an additional MAX fix.
[@vevv](https://github.com/vevv) for [subby](https://github.com/vevv/subby)
[@globocom](https://github.com/globocom/) for [m3u8](https://github.com/globocom/m3u8)
`@Wiesiek` on Discord for a few ideas `@Wiesiek` on Discord for a few ideas
[DRM-Lab-Project](https://discord.gg/xHjetwZP) for numerous bug fixes and support. [DRM-Lab-Project](https://discord.gg/xHjetwZP) for numerous bug fixes and support.
[Playready-Discord](https://discord.gg/aNNKxurrU6) for numerous bug fixes and support. [Playready-Discord](https://discord.gg/aNNKxurrU6) for numerous bug fixes and support.
Various members of the above mentioned Discord servers for testing, bug reporting, fixes etc. Thank You :)
[CDRM-Project](https://discord.cdrm-project.com/) and `@TPD94`, `@radizu` for getting me started on this journey, being a source of inspiration and for keeping a community well and alive. [CDRM-Project](https://discord.cdrm-project.com/) and `@TPD94`, `@radizu` for getting me started on this journey, being a source of inspiration and for keeping a community well and alive.
[@m0ck69](https://github.com/m0ck69) for sharing a DisneyPlus account for testing purposes. [@m0ck69](https://github.com/m0ck69) for sharing a DisneyPlus account for testing purposes.

View File

@ -93,7 +93,7 @@ def parse(master, source=None):
and and
x.stream_info.characteristics.lower().replace('"', "") in session_key.characteristics.lower().split(",") x.stream_info.characteristics.lower().replace('"', "") in session_key.characteristics.lower().split(",")
) )
][0] or psshWV, ][0] or (psshWV if psshWV else None),
psshPR=[ psshPR=[
session_key.uri.split(",")[-1] session_key.uri.split(",")[-1]
for session_key in master.session_keys for session_key in master.session_keys
@ -104,7 +104,7 @@ def parse(master, source=None):
and and
x.stream_info.characteristics.lower().replace('"', "") in session_key.characteristics.lower().split(",") x.stream_info.characteristics.lower().replace('"', "") in session_key.characteristics.lower().split(",")
) )
][0] or psshPR, ][0] or (psshPR if psshPR else None),
# extra # extra
extra=(x, master) extra=(x, master)
) for x in master.playlists], ) for x in master.playlists],

View File

@ -215,25 +215,34 @@ class Netflix(BaseService):
return tracks return tracks
elif self.vcodec == "H265": elif self.vcodec == "H265":
# If H.264, get both MPL and HPL tracks as they alternate in terms of bitrate
tracks = Tracks() tracks = Tracks()
if self.range == "SDR": if self.range == "DV+HDR":
self.profile = "SDR_DO+SDR_CENC" for r in ("HDR10", "DV"):
profiles = self.config["profiles"]["video"][self.vcodec][r]
self.config["profiles"]["video"]["H265"]["SDR_DO+SDR_CENC"] = ( manifest = self.get_manifest(title, profiles)
self.config["profiles"]["video"]["H265"]["SDR_DO"] + self.config["profiles"]["video"]["H265"]["SDR_CENC"] manifest_tracks = self.manifest_as_tracks(manifest)
) license_url = manifest["links"]["license"]["href"]
elif self.range == "HDR10": for track in manifest_tracks:
if track.encrypted:
self.profile = "HDR10_DO+HDR10_CENC" track.extra["license_url"] = license_url
if isinstance(track, VideoTrack):
self.config["profiles"]["video"]["H265"]["HDR10_DO+HDR10_CENC"] = ( track.hdr10 = track.codec.split("-")[1] in ["hdr", "hdr10plus"]
self.config["profiles"]["video"]["H265"]["HDR10_DO"] + self.config["profiles"]["video"]["H265"]["HDR10_CENC"] track.dv = track.codec.startswith("hevc-dv")
) tracks.add(manifest_tracks, warn_only=True)
else: else:
self.log.error("Dolby Vision is not supported yes") manifest = self.get_manifest(title, self.profiles)
sys.exit(1) manifest_tracks = self.manifest_as_tracks(manifest)
license_url = manifest["links"]["license"]["href"]
for track in manifest_tracks:
if track.encrypted:
track.extra["license_url"] = license_url
if isinstance(track, VideoTrack):
track.hdr10 = track.codec.split("-")[1] in ["hdr", "hdr10plus"]
track.dv = track.codec.startswith("hevc-dv")
tracks.add(manifest_tracks)
return tracks
profiles = self.profile.split("+") profiles = self.profile.split("+")
@ -803,7 +812,7 @@ class Netflix(BaseService):
# decryption # decryption
encrypted=x["isDrm"], encrypted=x["isDrm"],
psshPR=base64.b64decode(manifest["video_tracks"][0]["drmHeader"]["bytes"]) if psshPR else None, psshPR=base64.b64decode(manifest["video_tracks"][0]["drmHeader"]["bytes"]) if psshPR else None,
psshWV=base64.b64decode(manifest["video_tracks"][0]["drmHeader"]["bytes"]) if not psshPR else None, psshWV=base64.b64decode(manifest["video_tracks"][0]["drmHeader"]["bytes"]) if not psshPR else None,
kid=x.get("drmHeaderId") if x["isDrm"] else None, kid=x.get("drmHeaderId") if x["isDrm"] else None,
) for x in manifest["audio_tracks"]] ) for x in manifest["audio_tracks"]]