-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
FHD playback / UHD listing #51
Comments
No, some years ago this parameter displayed the HD content. To get UHD content listed, you have to use the HideNum=F parameter. |
Thanks for the response. Tried with HideNum=F and no luck. Any other hints? Maybe I need a valid devicetypeID that can actually supports UHD? |
Maybe for listing it, but not for playback. |
Are there any news for uhd? |
@greystashh some android reverse engineering has probably to be done, but I didn't find the time yet. |
Have you been able to look at it in the meantime? |
Nope, it's still on my list of things to do for the addon but still haven't been able to look into it. |
Any updates? Just a side note, it looks like instantwatcher (which I believe has partner-level API access) only has 4 items listed as UltraHD (used to be a lot more) https://instantwatcher.com/a/search |
asciidisco/plugin.video.netflix#86 (comment) EDIT: https://www.amazon.com/gp/help/customer/display.html?nodeId=201460880 |
Yeah, one of my devices that I was targeting to reverse engineer the 4K video playback is on that amazon's support list. The problem that peak3d is describing is different though: it's not enough to "have" those in the lists, if you can't playback. And you can't reproduce those videos, without a full reverse engineering of the Widevine drm encryptions that is shipped in those devices, which is different from what is publicly available. Short example: we have support for FHD movies in Amazon VOD, but nothing is able to reproduce them. If we can't playback FHD why bother with UHD? It sucks, but that's Google for you. |
I thought that was just a matter of various WV levels.. |
I'm not exactly "in the know", but when I talked with some devs (under NDA) they hinted at the fact that even for PrimeVideo.com, several chromium-based browsers are not able to decode properly videos, even when taking the Widevine straight from Chrome and putting it in the other browser, because along with the the DRM management they would need to ship with particular codecs, that all bundle for a fair amount of millions of dollars. I admit I never even began reverse engineering my TV's handshake, but from what I understood even if we were to replicate and get both 4K and up to date Widevine from whatever source, chances are it will never ever be rendered to video. FHD decoding can maybe work on Windows 10, if what I heard is correct, but 4K probably won't on any platform. |
Ok, it's true that amazon's streaming "parameters" are bonkers, but for as much as codecs are concerned the only peculiarity should be the usage of H265. End. How could they get hw accelerated otherwise? Then, as I was saying.. I know instead *DRM* is the thing pretty famous to be finicky. I've spent all day trying to understand what particular kinds Prime Video have been using, but to no definitive avail. Proceeding with the analysis, a breadcrumb trail, led me inside the android apk, whose biggest library is literally So, I was almost going to call it a day, they may be using the same super pesky hardware-baked thing of netflix (which in this case they aren't offering on x86, just out of laziness or whatever) But I could only find PlayReady SL2000 certificates inside of com.amazon.avod.thirdpartyclient.apk\assets\PlayReady\.... Until the last blow arrived, when I eventually found out Xperia XZ Premium can actually do 4K with the normal app. On the "normal" android. So... TL;DR I'm back to square one. p.s. when you'll eventually get to look into UHD titles, take also notice they are total asses with their interface/api. |
Although I have quite some old expertise in reverse engineering, when it comes to this sort of things I usually go completely platform agnostic and just sniff the living sh*t out of the network transmission through a transparent proxy, and reverse engineer the protocol from there. That's the way I reverse engineered PrimeVideo's everything, and it worked (kind of) okay. Even then, replicating what FireFox and Chrome do to get and decode the streams doesn't let Kodi reproduce videos in the same way. I'm relatively new to Kodi as a whole, so if I had to analyse both Kodi and IS.A's sources it would take me months. I've been away from the scene from quite a long time, and I especially know nothing of android reversing, so my only bet in this would be to either transparent proxy a TLS connection between my TV and amazon servers hoping that they don't use certificate pinning, or be stuck with about nothing. Which is the reason why I still haven't done anything, as I severely doubt that's going to work. (Because they use pinning, right?) Anyways, I have a few days off work in front of me, so if you guys have suggestions or attack vectors, or want to set-up a mini reverse engineering collective effort, let me know. |
Also, thanks for the additional information, I had no idea that (at least on some platforms) Microsoft's PlayReady 3.0 was used. Which explains why Windows 10 is fucking required to play 4k. * exhausted sigh * |
That's for netflix though, as I said. Then, if you want to work on the android app, I know there are plenty of xposed tools that can uncheck/unpin certs on the fly. |
I'll copy my tests out of #224 in here, as it might be useful later on: After a few tests [with With a bit of data mining, and several tests later, I found the following:
As far as movies go, […] I think I noticed it depending on a few parameter combinations, some resolutions are added or removed to the list, but nothing higher than 1088 will ever play. I also noticed that HLS is also supported, but it returns AVC1 encoded videos. IS.A fails with a |
Seen? It wasn't that hard after all 🙃 AVC1's just normal plain H.264 anyway... |
To do what? Playback still doesn't work. Neither DASH nor HLS, MPD nor M3U8, AVC1 or not plays above 1088x464. And since I'm a complete noob when it comes to video streaming technologies, I have no idea how to analyze the issue. I've just poked and prodded to solve a different problem, but we're nowhere near where we should be, for the moment. Edit: |
@Varstahl Thanks for your investigation. I'm actually more interested in finding out WHAT is available in UltraHD vs. actually being able to play content in UHD (I'm a data geek). Are you able to get anything out of the API that shows UHD "possible" content? I've tried many device types to no avail ... |
The only surefire way is to: I've spent the past 8 hours setting up everything for a MitM attack, and I mostly succeded except for the fact that I came late to the party. Samsung has been bashed for insufficient security, and apprently they now took things ultra safely. I can sniff all the traffic no problem, but when it comes to HTTPS it has a reject by default policy, even in the browser. So, I either find a way to download/modify/sideload browser/amazon apks, or I need a way to inject a root certificate onto my TV. It's now 4:30 am and I'm tired af, so I'm headed to bed. Also, to elaborate better:
Once upon a time @Sandmann79 found a way to do it for amazon.de, but several endpoints behaviour changed dramatically during the last few months. I don't think I can find out UHD streams with what I have at the moment. The only way would be to crack my damn TV open, but as far as the first attempt went, I fell short TLS. I can tcpdump and maybe bruteforce the TLS, but it's quite unrealistic. Don't know, I'm sad, I'm going to bed. Also, for added fun: Amazon removed the 4k section even on my freakin' 4k TV, listed as supported even on Amazon's website. Didn't test 4k content though, yet, so don't know about that. But even if I could previously find out of an URL API endpoint to discover 4k streams, now I just can't. Yay. |
Interesting, but Samsung 4k TVs run on Tizen. I can develop something for it and load it into the TV, but it's not Android. It's also a minimal distro, with no rooting possible (as of now). Also since I can't tell which are the endpoints for the samsung website, I'm not really able to download the package off the main repository, so even that didn't work out for me yet. Thanks for the reference though, I didn't know of Frida, that's an interesting read. |
So my last, definitive, eventual, guess is just that they are performing stupid server-side checks, and nothing more than L1 should be required.. "high-end-security" wise at least. |
I can tell you that they are doing a number of client/server side checks. Different codecs, lists, streams, and whatnot may or may not be displayed, and may or may not be served. Even with Widevine no more than L1 should be needed (for tv series at least), except that movies won't go higher than 480p (L3?). And since a lot of the checks and the "device" parameters are server/client side assessed, but in the most obscure way possible, I still can't find a way to wrap my head around the issue. As far as HD movies go, Chrome is (possibly?) able to unlock the streams (I didn't actually check the stream contents yet so it might just pop up the HD and have a 480p quality, for all I know). But IS.A and most other browsers aren't able to decode them. Multiple Widevine licenses? I have no idea, and every time I see a change on Amazon's backend I die a little. Hell, I'm even using Vivaldi on a daily basis, which is basically an "Opera" skin on top of the Blink/Webkit, and it still doesn't work. PrimeVideo on Vivaldi only works if you spoof the UA to match Opera, not even Chrome. I have so many questions, and not enough answers… I just keep hating Amazon every day a little more. |
I get the "HD light" (whatever it might actually entail) on firefox on windows.. So.. to be honest, now that we solved the 4K "standards" conundrum, I think the only mystery left is why (just like with netflix tbh) 720p/1080p requires L1, while on "desktops" you can get away with the lowest security level |
After you said that on Firefox 1080p ran find I got curious and installed a brand new portable version to dedicate to reverse engineering. At a glance, these are my findings:
So, yeah, contrary to popular belief FHD might (could?) actually be obtained under Kodi, unless there's something weird going on with the Widevine library itself. I'll analyze the handshakes and whatnot, maybe we can sort this out once and for all. |
Kodi decided to do “The right thing”™, so now I can't debug fucking anything coming out of it. None of the systems they listed to bypass certificate validation works. Fucking geniuses, the lot of them. What am I supposed to do now, revert to Alpha1? This day started badly and it's gonna end poorly… Edit: Kodi is now ignoring system CAs and is shipping with a CA bundle inside |
I did some investigation and the conclution is if the content has HDR as WELL as UHD then adding deviceVideoQualityOverride=UHD&deviceHdrFormatsOverride=Hdr10 will provide 4k UHD HDR minefeast |
What the heck, when I tested it a few days ago it was not working. Did they fix it in yesterday's updates? Let me test it. |
u can acess UHD using this method if and and only if the content is avalable in both UHD & HDR else it wont work |
I'd so want to smash my 4k TV open and crack the damn thing down just to figure out what secret juices it holds. It's even using HSTS, I wasn't even able to download the software updates… Btw, I'm testing it on primevideo, so that might be the reason why. Maybe it only works on amazon domains, although it's pretty damn weird. I've tested it with the First live 4k from space thing, and it does return streams encoded with H265 instead of H264, but that's pretty much it. I wonder if there's a video on primevideo that I can test with. |
problem is I dont have a smart 4k tv btw can you pls share your country ? (as 4k library varies with country) |
Italy, and I do have a 4k TV but not connected to a PC as a monitor, so that also complicates things. Not that it matters, since I've tried shows like fleabag and Bosch which I have SEEN on my TV in 4k, but it won't return the videos for it. Most of it works with what we knew already:
I'm unsure if the resourceUsage Edit: HOLY SHIT IT WORKED! {
"playbackUrls": {
"cacheKey": "28be735a-494a-3fa9-b740-f11ce550c769$8YpQPUdepUcDwjIJ0E-pc1DXMKE~",
"defaultAudioTrackId": "en-us_dialog_0",
"defaultUrlSetId": "17948-857ca863-e395-492d-8c71-b3208e921a62",
"urlSets": {
"17948-12b0a81a-0f15-4ecc-918e-d1370f94f55a": {
"failover": {
"cdn": {
"mode": "seamless",
"urlSetId": "17948-93d527c0-2c93-41bf-a3cd-908ba99c0d2a"
},
"default": {
"mode": "seamless",
"urlSetId": "17948-93d527c0-2c93-41bf-a3cd-908ba99c0d2a"
}
},
"urlSetId": "17948-12b0a81a-0f15-4ecc-918e-d1370f94f55a",
"urls": {
"manifest": {
"audioFormat": "Stereo",
"audioTrackId": "ALL",
"bitrateAdaption": "CBR",
"cdn": "Limelight",
"cdnOrigin": "S3",
"compressionStandard": "H265",
"contiguityType": "Contiguous",
"drm": "CENC",
"dynamicRange": "Hdr10",
"encodingVersion": "0",
"fragmentRepresentation": "ByteOffsetRange",
"origin": "s3_ww_dub",
"streamingTechnology": "DASH",
"subtitleRepresentation": "NotInManifestNorStream",
"url": "https://s3.ll.dash.row.aiv-cdn.net/d/2$8YpQPUdepUcDwjIJ0E-pc1DXMKE~/ww_dub/05bc/f1a0/6b38/4759-bfed-954d4cd90b3c/088179b4-3cec-49ad-87c7-2a9496f6f469_corrected.mpd",
"videoQuality": "UHD"
}
}
},
"17948-1f52f2ff-9924-43cb-bf1c-38a3900066f5": {
"failover": {
"cdn": {
"mode": "seamless",
"urlSetId": "17948-12b0a81a-0f15-4ecc-918e-d1370f94f55a"
},
"default": {
"mode": "seamless",
"urlSetId": "17948-12b0a81a-0f15-4ecc-918e-d1370f94f55a"
}
},
"urlSetId": "17948-1f52f2ff-9924-43cb-bf1c-38a3900066f5",
"urls": {
"manifest": {
"audioFormat": "Stereo",
"audioTrackId": "ALL",
"bitrateAdaption": "CBR",
"cdn": "Level3",
"cdnOrigin": "S3",
"compressionStandard": "H265",
"contiguityType": "Contiguous",
"drm": "CENC",
"dynamicRange": "Hdr10",
"encodingVersion": "0",
"fragmentRepresentation": "ByteOffsetRange",
"origin": "s3_ww_dub",
"streamingTechnology": "DASH",
"subtitleRepresentation": "NotInManifestNorStream",
"url": "https://11s3.lvlt.dash.row.aiv-cdn.net/d/2$8YpQPUdepUcDwjIJ0E-pc1DXMKE~/prod/ww_dub/05bc/f1a0/6b38/4759-bfed-954d4cd90b3c/088179b4-3cec-49ad-87c7-2a9496f6f469_corrected.mpd",
"videoQuality": "UHD"
}
}
},
"17948-857ca863-e395-492d-8c71-b3208e921a62": {
"failover": {
"cdn": {
"mode": "seamless",
"urlSetId": "17948-1f52f2ff-9924-43cb-bf1c-38a3900066f5"
},
"default": {
"mode": "seamless",
"urlSetId": "17948-1f52f2ff-9924-43cb-bf1c-38a3900066f5"
}
},
"urlSetId": "17948-857ca863-e395-492d-8c71-b3208e921a62",
"urls": {
"manifest": {
"audioFormat": "Stereo",
"audioTrackId": "ALL",
"bitrateAdaption": "CBR",
"cdn": "Cloudfront",
"cdnOrigin": "S3",
"compressionStandard": "H265",
"contiguityType": "Contiguous",
"drm": "CENC",
"dynamicRange": "Hdr10",
"encodingVersion": "0",
"fragmentRepresentation": "ByteOffsetRange",
"origin": "s3_dub_2",
"streamingTechnology": "DASH",
"subtitleRepresentation": "NotInManifestNorStream",
"url": "https://s3-dub-2.cf.dash.row.aiv-cdn.net/dm/2$8YpQPUdepUcDwjIJ0E-pc1DXMKE~/05bc/f1a0/6b38/4759-bfed-954d4cd90b3c/088179b4-3cec-49ad-87c7-2a9496f6f469_corrected.mpd",
"videoQuality": "UHD"
}
}
},
"17948-93d527c0-2c93-41bf-a3cd-908ba99c0d2a": {
"failover": {
"default": {
"mode": "seamless",
"urlSetId": "17948-857ca863-e395-492d-8c71-b3208e921a62"
}
},
"urlSetId": "17948-93d527c0-2c93-41bf-a3cd-908ba99c0d2a",
"urls": {
"manifest": {
"audioFormat": "Stereo",
"audioTrackId": "ALL",
"bitrateAdaption": "CBR",
"cdn": "Akamai",
"cdnOrigin": "S3",
"compressionStandard": "H265",
"contiguityType": "Contiguous",
"drm": "CENC",
"dynamicRange": "Hdr10",
"encodingVersion": "0",
"fragmentRepresentation": "ByteOffsetRange",
"origin": "s3_ww_dub",
"streamingTechnology": "DASH",
"subtitleRepresentation": "NotInManifestNorStream",
"url": "https://a310avoddashs3ww-a.akamaihd.net/d/2$8YpQPUdepUcDwjIJ0E-pc1DXMKE~/ondemand/ww_dub/05bc/f1a0/6b38/4759-bfed-954d4cd90b3c/088179b4-3cec-49ad-87c7-2a9496f6f469_corrected.mpd",
"videoQuality": "UHD"
}
}
}
}
},
"returnedTitleRendition": {
"asin": "amzn1.dv.gti.18ab0769-016b-f1b4-90ce-4a5dc75848cf",
"audioQuality": "Stereo",
"audioTrackId": "all",
"contentId": "amzn1.dv.vcid.4755b8af-941a-4c46-b5fb-5798db9c7c0d",
"selectedEntitlement": {
"consumptionExpiration": "1551044311958",
"entitlementType": "PRIME_SUBSCRIPTION",
"grantedByCustomerId": "A1825HE0SZD6UY"
},
"titleId": "amzn1.dv.gti.18ab0769-016b-f1b4-90ce-4a5dc75848cf",
"videoMaterialType": "Feature",
"videoQuality": "HD"
},
}
|
yup but some content doesnot have hdr 10 but has UHD in my country and so till now I am unable to find a way to get them |
Interesting, it's all bullshit. Aside the fact that it's impossible to playback, and even lower quality streams are unreachable, the MPD contains no UHD whatsoever. Nope, I'm not going down this rabbit hole again, You probably need some Samsung specific device ID to unlock the 4k, but then again if you don't have the hardware encryption it won't work anyway. No clue, but I'm out. Thanks for the info though, it was exciting while it lasted :D |
no the mpd itself has 4k content but does not showes it for example ^ is the 4k stream but it is not listed in the mpd |
the mpd has upto video_10.mp4 now for 4k but if u incement the value to 10 until u get a resposnde code error |
Well, if it does not show it then it doesn't have it. Although come to think about it, there might be good reason why: it might actually be encrypted with something else. But when you're right, you're right:
But, if that's the case, then we don't actually need the parameter. We can just ping the h*eck out of the video streams until we find the 4k ones. Fun times. |
nope as they store the 4k one in different cdn location so just by incrementing the value without changing the paramiter wont be helpful I think |
by the way as I dont have any physical device can u please send me the your the dump of your android tv profile ? so that I can test it pls ? |
It's not Android it's… Tizen? And I wish I could, I can't access the damn thing. I wanted to test developing some exploit for it, since I have the SDK, but I had a severe lack of time. I've also downloaded the entire video but it doesn't look much usable to me, pretty standard. Oh, and yes, I double checked, they actually have them on different shards, so yeah the pinging route's stupid. I'll be going for the day. If you find some juicy information, I'm all ears. |
|
and The mpd contained 4k stream. may be tomorrow I ll try to do some reverse engineering on their android tv app. |
android tv amazon (nvidia shield specifically) uses playready for 4K and gets smoothstreaming manifests (ISM), not dash MPDs as far as i'm aware only 4K HDR is available via DASH, as you've seen above. |
It must be said, at least until some month ago, 4K also worked on Xperia Premium phones with normal android (which have no playready by default.. not sure how much high of a SL level you could go, with tz payloads shipped with your app though) But aside of that, could we not get FHD first to work perhaps? |
Playing FHD requires HDCP, which is a bit more complicated than "we found 4k streams". I haven't given up on it, but I didn't have time to delve deeper either. |
Closing this as the discussion has gone stale by now. 4k videos are available everywhere from PrimeVideo (or closely so), and PC reproduction is locked by VMP. |
@Varstahl What exactly do you mean by "4k videos are available everywhere from PrimeVideo". Does that mean that this addon can play 4K now (on Widewine L1 hardware such as Android TV boxes)? Is there any info on which devices are supported? |
As far as I know, back in the day 4k streams were working on things such as the Nvidia Shield. There have been restrictions due to VMP, but through the launch of external native players, 4k streams are (were?) known to work. On IS.A, that's a different matter entirely, I'm waiting for some news in that regard, but until that point I can't really do much more than speculate. Be mindful of the fact that this is all hearsay at the moment: I don't have any L1 hardware to properly test 4k streams with, so take these info with a grain of salt. |
Wait does that mean that you launch actual native amazon app instead of using Kodi player? That is a bit of a bummer, primary reason for me using the Kodi is the superior player. Thanks for your anwers. |
That depends. Reports you can find even on here (back in the day) were citing the "HDCP Bypass" in IS.A was enough on some hardware to just allow full playback, up to 4k. Now, after Amazon+Google heavily restricted 4k access, in a move to save bandwidth, I think that playing 4k through Kodi no longer works. This might be changing soon, though I can't say more at this time. |
I would love to see this work. I have a Windows laptop with HDR screen, so would love to get Prime 4k. How can I help? Is the problem that there's no widevine for Windows? (and no widevine for Kodi) |
I see a commented out HighDef parameter, is that what enables Ultra HD listings to be retrieved? Any info would be appreciated.
The text was updated successfully, but these errors were encountered: