Open Amb33r opened 3 years ago
This script enables CBR only streams : https://greasyfork.org/en/scripts/429697-amazon-cbr-enabler As for DDP 5.1 Audio , it isn't available in mpd , you need to manually download it by increasing audio_xx.m4a
there is no ready script somewhere at hand, what one command will extract max video max audio from the movie in this case amazon? lossless on it
I made a simple modification in the userscript (many thanks for the original author @nyuszika7h)
https://greasyfork.org/en/scripts/429697-amazon-cbr-enabler
for getting a better audio, this comment explains how to use the modified userscript "Amazon HEVC Enabler".
https://github.com/Satsuoni/widevine-l3-guesser/issues/1#issuecomment-895859141
True, that's a good idea. Although if you have pywidevine with a generic key you can just force video quality to SD to decrypt 640k audio.
anyone can help me with pywidevine disney+ tool ? after last site update tool stop working.
amazon-cbr-enabler amazon-hevc-enabler
with these additions what keyboard shortcut to use? to fire them up
@BursztynowyCygan Just press on Tampermonky's icon and enable the userscript you want to use (when you are in Amazon page and you might need to refresh the page), or press on Tampermonky's icon then press on "Dashboard", use "Amazon HEVC Enabler" only if the method in this comment did not work.
(Disable both of Amazon CBR Enabler and Amazon HEVC Enabler before using this method)
https://github.com/Satsuoni/widevine-l3-guesser/issues/1#issuecomment-894820354
These could be easily done, but the problem isn't that the tool can't do it, it's the fact that it isn't designed to a certain site, its more of a quicker way to download and decrypt an MPD's info (which in amazon case, doesn't have the actual best quality) right now, which is great for common site, but won't work with sites like NF & AMZN, which need special code to detect the downloads (they are easy to grab don't get me wrong, but they need special code)
Look at yt-dl for example, each coded site has his own extractor and whatnot, which is how it should be if you are trying, for example, get the highest possible audio quality from AMZN, which would need a side script (to check all links until it gives an error) that you can't simply implement it into the main script as it might interfere or make it just cluttered
My suggestion is that it should be done in a way that's not intrusive to the main script, just like how popular tools do it, if this idea start to gain attraction, I think it will be one of the most important & used tools, at least hopefully google doesn't patch public cracks
just my 2cents since I see potential
Hi. My way to download E-AC3 from amazon is that I take the MPD link on ubuntu [wirtualbox] and add it in windows to N_m3u8DL-CLI and it's always e-ac3. I am using chrome from MPD Detector to get the link on ubuntu. ps. sorry for my eng I wrote with a translator
Another method for getting the best audio in Amazon is by using this method of modifying the original mpd.
https://github.com/Satsuoni/widevine-l3-guesser/issues/1#issuecomment-903261156
use this version of N_m3u8DL-CLI for downloading the modified mpd.
https://github.com/Satsuoni/widevine-l3-guesser/issues/1#issuecomment-903422556
Do these methods work for Hbo Max trying to get best audio and video quality and multiple languages
@Nickthedog22 No, they are for Amazon only, for HBO MAX you could get the best video quality and the best audio quality in multiple languages by downloading the files manually (use this manual method only if the other methods failed), open Chrome and press F12, press on Network then play the movie, search for mpd and download the link, you will get a link like this (the link is for the movie "Birds of Prey" 2020)
search for mp4 and you will get the links of the video and the audio like
audio
https://cmaf.akm.us.hbomaxcdn.com/videos/GXt-ZRQXsQcPCwgEAAAqW/1/b1ec35/a/a4.mp4
video
https://cmaf.akm.us.hbomaxcdn.com/videos/GXt-ZRQXsQcPCwgEAAAqW/1/b1ec35/v/v2.mp4
open the file dash.mpd with Notepad++ and from it you will get the links of the audio and video you needs by adding its names to the links of the video and the audio
the link of the video in the highest quality in avc1 codec 1920×816 will be
https://cmaf.akm.us.hbomaxcdn.com/videos/GXt-ZRQXsQcPCwgEAAAqW/1/b1ec35/v/v8.mp4
and the link of the English audio in ec-3 codec 258 kbps will be
https://cmaf.akm.us.hbomaxcdn.com/videos/GXt-ZRQXsQcPCwgEAAAqW/1/b1ec35/a/a6.mp4
then use the keys that you got from using the extension to decrypt the files. And here how to know which key is for the audio and which key is for the video and how to decrypt the files.
https://github.com/parnexcodes/widevine-L3-WEB-DL-Script/issues/37#issuecomment-907805191
@Essam3152 so i use the version of the script that's abit more automatic that has the extension what should i do after i get the audio and video links
@Nickthedog22 Download the links with IDM, then decrypt the files.
@Essam3152 i downloaded the links how can i decrypt them
@Nickthedog22 Post the link of the movie in HBO MAX so I could help you, I need a link like this one.
https://play.hbomax.com/page/urn:hbo:page:GXpTMDQMxBAwlRQEAABbd:type:feature
And what are the names of the files you downlaoed?
its this @Essam3152 https://play.hbomax.com/episode/urn:hbo:episode:GYH9oHwIcikKzSAEAAAAC its adventure time distant lands together again
@Nickthedog22 Download the mpd file from this link
Open the mpd file you downloaded with Notepad++ and search for default_KID and from keys.json file you downloaded compare the value of default_KID for the audio and the video with the kid's value in keys.json to know which key is for the audio and which key is for the video
audio default_KID="010093d0-0213-79e9-66e1-622c3d5adad0"
key ddfb706432a00fef9f75eeec53ba2425
video in 1080p default_KID="01056ca1-127f-f930-6171-25809afc4b3e"
key
05a69d481401eb866452d0754dbce71b
video in 540p
default_KID="0101bf93-309b-c068-2184-32bd5863d229"
key
ffe67ea7e03b70ae0bd7b548f0c6ecc8
video in 720p
default_KID="010200f5-5b88-b13f-4beb-6c58d13a365e"
key
8ba691689192438db9dfcff4db74ec77
What are the names of the files you downloaded?
its just v or a i use the widevine guesser plug in for the keys so how can i replace the keys i usually get a key.json file from the chrome extension @Essam3152
<?xml version="1.0" encoding="UTF-8"?>
thats what i get @Essam3152 i would like to download all the audio languages and have the best video quality
@Nickthedog22 Rename the video file to video.mp4 and the audio file to audio.m4a then put the files in the same folder with mp4decrypt.exe and run decrypt.audio.bat to decrypt the audio, if the video in 540p run decrypt.video.540p.bat if the video in 720p run decrypt.video.720p.bat and if the video in 1080p run decrypt.video.1080p.bat.
ok thanks where can i get decrypt.audio.bat
nvm
@Essam3152 what else should i do?
@Nickthedog22 After you decrypt the video and the audio be sure that the files are decrypted correctly by playing them then merge the file using mkvtoolnix.
@Essam3152 there nothing on the videos or audio files
@Nickthedog22 Sorry, what do you mean by " there nothing on the videos or audio files"?
there blank nothing plays no audio or video i use vlc btw
@Essam3152 how can i use the web dl script instead
@Nickthedog22 Download the video from this link
https://cmaf.cf.us.hbomaxcdn.com/videos/GYH9oHwPF36aAhwEAAAAD/1/092d67/v/v17.mp4
download the audio from this link
https://cmaf.cf.us.hbomaxcdn.com/videos/GYH9oHwPF36aAhwEAAAAD/1/092d67/a/a2.mp4
put v17.mp4 and a2.mp4 in the same folder decrypt.new with mp4decrypt.exe then run decrypt.audio.bat and after that run decrypt.video.1080p.bat and the decrypted files are a2.decrypted.mka and v17.decrypted.mp4.
You want to download multiple audio languages and this needs the script webdl.py to be modified and I do not know how to modify it yet for that purpose, ask the developer of the script.
@Essam3152 were in different countries so yeah it wont download the audio i would want
@Nickthedog22 Where are you from?
@Essam3152 Mexico
@Nickthedog22 My account did not work in Mexico, anyway they are the same steps, you just will need to try many times until you succeed, If you could send to me keys.json for the same episode, I might figure something from it.
here it is @Essam3152 https://mab.to/z716EOamc i would like it in spanish and best quality possible
@Nickthedog22 Download the Spanish audio from this link
https://cmaf.akm.latam.hbomaxcdn.com/videos/GYRHFEQjg8qHDLgEAAABt/0/4e7e64/a/a0.mp4
download the video in 1080p from this link
https://cmaf.akm.latam.hbomaxcdn.com/videos/GYRHFEQjg8qHDLgEAAABt/0/4e7e64/v/v17.mp4
audio kid and key
"kid": "01003d812bab4ae9f1ff7e7692c6d73d",
"hex_key": "9abbe20f77d966ee1ef967688c15169b"
video 1080p kid and key
"kid": "0105a6419779bdd3621cc38e765f7e78",
"hex_key": "4e5f11775e99f4bfcbc1943ea3f935ca"
Put a0.mp4 and v17.mp4 in the same folder decrypt.Spanish with mp4decrypt.exe and run decrypt.audio.bat to decrypt the audio then run decrypt.video.1080p.bat to decrypt the video.
mpd from keys.json
https://cmaf.akm.latam.hbomaxcdn.com/videos/GYRHFEQjg8qHDLgEAAABt/0/4e7e64/0_JCIEmg_1080hi.mpd
I used N_m3u8DL-CLI-SimpleG.exe for getting the links of the video and audio by choosing "Parse Only" then pressing on "GO".
and entering the number of the video 0, in downloads file with the name mpdVideo.m3u8 inside it the link of the video, and did the same thing for the audio to get the audio's link by entering the number of the Spanish audio 23 and the link of the audio is in mpdAudio.m3u8.
@Nickthedog22 To get the audio in Spanish with the best quality and the video with the best quality use this copy, put widevine-L3-WEB-DL-Script-main in C:\widevine-L3-WEB-DL-Script-main and add it to PATH then run download.bat when you get asked for the video ID press enter or write the id of the video v17 and when you get asked for the audio ID enter a0 and press enter and the script will download the files and merges them after it decrypts the files, then press 1 to delete the encrypted files, to change the name of the file open download.bat with notepad and change movie to any name you want and save the file.
@Essam3152 God Bless you man I owe you a big one most people don't like to help with these sorts of things If you ever need an instrumental or a song ripped from a show ill rip it for you
@Essam3152 so there's something odd about it when i want to rip a track the audio for the episode shows up in stereo and once i apply the center channel extractor it makes the audio fuzzy and that lead me to a conclusion that the audio is re enconded
@Nickthedog22 The Spanish audio in ec-3 is stereo in the encrypted file.
Audio: DD+ 48000Hz stereo 256kbps [A: SoundHandler [spa] (eac3, 48000 Hz, stereo, 256 kb/s)]
the encrypted Spanish audio in ac3
Audio: Dolby AC3 32000Hz 4ch 384kbps [A: SoundHandler [spa] (ac3, 32000 Hz, quad(side), 384 kb/s)]
Do not delete the encrypted audio files, and check them.
@Essam3152 weird I cant rip music from the episode
@Nickthedog22 The Spanish audio in ec-3 is stereo in the encrypted file.
Audio: DD+ 48000Hz stereo 256kbps [A: SoundHandler [spa] (eac3, 48000 Hz, stereo, 256 kb/s)]
the encrypted Spanish audio in ac3
Audio: Dolby AC3 32000Hz 4ch 384kbps [A: SoundHandler [spa] (ac3, 32000 Hz, quad(side), 384 kb/s)]
Do not delete the encrypted audio files, and check them.
I think you can help me. I try to decode a video from MyCanal. I've the video with 2 key. When i try to decode it with mp4decrypt it don't work. Any idea ?
Thanks
@troufiniou Upload the keys.json file here, you might got the wrong mpd.
@troufiniou Upload the keys.json file here, you might got the wrong mpd.
Thanks for your answer. That's the json
EDIT : I've understand how to decrypt 720p but not understand the 1080p 😅
[ { "mpd_url": "https://routemeup.canalplus-bo.net/media/v1/replay-dshmkpc/mkpc/canalplus/canalplus/ANT_1258196_1_CPSV/1587346/ANT_1258196_1_CPSV.mpd" }, { "mpd_url": "https://replay-dsh.free01.vod-scy.canalplus-cdn.net/media/v1/replay-dshmkpc/mkpc/canalplus/canalplus/ANT_1258196_1_CPSV/1587346/ANT_1258196_1_CPSV.mpd?id=01164cd8-8943-4569-9dff-d9fbc2b72198&route=scy-free01&edge=routemeup.canalplus-bo.net" }, { "mpd_url": "https://routemeup.canalplus-bo.net/media/v1/replay-dshmkpc/mkpc/canalplus/canalplus/ANT_1258196_1_CPSV/1587346/ANT_1258196_1_CPSV.mpd?edge=replay-dsh.p-cdnvod-edge010609.scy.canalplus-cdn.net%2Ffree01-862683116949ece106502c09eb6a1611-89fc&id=01164cd8-8943-4569-9dff-d9fbc2b72198&route=scy-free01" }, { "mpd_url": "https://replay-dsh.p-cdnvod-edge010609.scy.canalplus-cdn.net/free01-862683116949ece106502c09eb6a1611-89fc/mkpc/canalplus/canalplus/ANT_1258196_1_CPSV/1587346/ANT_1258196_1_CPSV.mpd" }, { "kid": "3cdea96b4cc147d1b7d6fe7455c9ef27", "hex_key": "cc2bb3cd75aab737a35371d939d2ce82" }, { "kid": "8b7a0df1ea75416da7bc7c46db1222fd", "hex_key": "14593405c7a7f2c45d74c5f7454999f7" } ]
This is the link of the audio, not encrypted.
This is the link of the video in 720p, do not download the video in 1080p because it needs a new key.
kid and key for the video
"kid": "8b7a0df1ea75416da7bc7c46db1222fd", "hex_key": "14593405c7a7f2c45d74c5f7454999f7"
I do not have a VPN for France now, so I can not test, I think the problem is that you downloaded the video in 1080p which you have no key for it.
This is the keys. json that should work.
put this batch file in the script folder and run it, enter the ID of the video in 720p, do not use the one in 1080p, for the audio just press enter.
The kid value for the video in 1080p is
45c1d6e3a4d94bf398f3a6daa731f632
open the mpd file with Notepad++ and you will find the kid of the video in 1080p.
<AdaptationSet subsegmentAlignment="true" mimeType="video/mp4" contentType="video" maxWidth="1920" maxHeight="1080" maxFrameRate="25" height="1080" width="1920" frameRate="25" codecs="avc1.640029" scanType="progressive" sar="1:1" par="16:9" subsegmentStartsWithSAP="2" id="3">
<SupplementalProperty schemeIdUri="urn:mpeg:dash:adaptation-set-switching:2016" value="1,2" />
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="45c1d6e3-a4d9-4bf3-98f3-a6daa731f632" />
Ok so if I understand, I can't decide 1080p because we don't have the key. Any idea to have it ?
BTW thanks for the tuts
This is the link of the audio, not encrypted.
This is the link of the video in 720p, do not download the video in 1080p because it needs a new key.
kid and key for the video
"kid": "8b7a0df1ea75416da7bc7c46db1222fd", "hex_key": "14593405c7a7f2c45d74c5f7454999f7"
I do not have a VPN for France now, so I can not test, I think the problem is that you downloaded the video in 1080p which you have no key for it.
This is the keys. json that should work.
put this batch file in the script folder and run it, enter the ID of the video in 720p, do not use the one in 1080p, for the audio just press enter.
The kid value for the video in 1080p is
45c1d6e3a4d94bf398f3a6daa731f632
open the mpd file with Notepad++ and you will find the kid of the video in 1080p.
<AdaptationSet subsegmentAlignment="true" mimeType="video/mp4" contentType="video" maxWidth="1920" maxHeight="1080" maxFrameRate="25" height="1080" width="1920" frameRate="25" codecs="avc1.640029" scanType="progressive" sar="1:1" par="16:9" subsegmentStartsWithSAP="2" id="3"> <SupplementalProperty schemeIdUri="urn:mpeg:dash:adaptation-set-switching:2016" value="1,2" /> <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" /> <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="45c1d6e3-a4d9-4bf3-98f3-a6daa731f632" />
Hi Sir, can this script be used to download from disney+?
@fict544 No, Disney+ (USA) uses m3u8 URL which the script and widevine-l3-guesser-modified do not support.
With this script I get the best video and audio quality from Amazon with keys.json? Probably not :( The bit rate is going down.
I know that it is possible to pull out twice as large
keys.zip