xbmc icon indicating copy to clipboard operation
xbmc copied to clipboard

Amazon VOD: Cloudfront Videos not playable (URL not found)

Open stsichler opened this issue 2 months ago • 9 comments

Hi, I'm currently debugging why some Videos of my Watchlist are not playable. After looking through the logs I found out that this is caused by some random text that is inserted into the URL, see log:

2025-11-30 19:32:21.933 T:498617    info <general>: [Amazon VOD] postURL: https://atv-ps-eu.amazon.de/cdp/catalog/GetPlaybackResources?asin=B0B6KQMKZS&deviceTypeID=AOAGZA
014O5RE&firmware=1&deviceID=bf8c08d38d904c6c90263181427dc468&marketplaceID=A1PA6795UKMFR9&format=json&version=2&gascEnabled=false&subtitleFormat=TTMLv2&resourceUsage=Imme
diateConsumption&consumptionType=Streaming&deviceDrmOverride=CENC&deviceStreamingTechnologyOverride=DASH&deviceProtocolOverride=Https&deviceBitrateAdaptationsOverride=CVB
R%2CCBR&audioTrackId=all&languageFeature=MLFv2&videoMaterialType=Feature&desiredResources=PlaybackUrls,SubtitleUrls,ForcedNarratives,TransitionTimecodes&supportedDRMKeySc
heme=DUAL_KEY
2025-11-30 19:32:22.428 T:498617   debug <general>: [Amazon VOD] Download Time: 0.49303486198186874
2025-11-30 19:32:22.436 T:498617    info <general>: [Amazon VOD] Using Host: Cloudfront
2025-11-30 19:32:22.437 T:498617    info <general>: [Amazon VOD] checkURL: https://ABLBR6SAAAAAAAAMCDQGF3UNIOLFH.pop-vod-dash.main.amazon.pv-cdn.net/dm/3$0CiIIAhIGCgQtGRk
ZIBkwAVIGgMACgfADegOAuBeCAQEBiAECGAE/ww_dub/8d0e/9744/64f7/49de-bb4b-5bc50324eb0b/9eac2919-bbf4-45a4-b5c4-1e96dfbf2fbc_corrected.mpd
2025-11-30 19:32:22.671 T:498617   debug <general>: [Amazon VOD] Download Time: 0.2316630370914936
2025-11-30 19:32:22.678 T:498617   debug <general>: [Amazon VOD] Skip Items: None
2025-11-30 19:32:22.679 T:498617   debug <general>: [Amazon VOD] https://ABLBR6SAAAAAAAAMCDQGF3UNIOLFH.pop-vod-dash.main.amazon.pv-cdn.net/dm/3$0CiIIAhIGCgQtGRkZIBkwAVIGg
MACgfADegOAuBeCAQEBiAECGAEsRBDnzWC/ww_dub/8d0e/9744/64f7/49de-bb4b-5bc50324eb0b/9eac2919-bbf4-45a4-b5c4-1e96dfbf2fbc_corrected.mpd
2025-11-30 19:32:22.680 T:498617    info <general>: [Amazon VOD] Using inputstream.adaptive Version: 21.5.9
2025-11-30 19:32:22.689 T:498617    info <general>: [AMAZON-DEBUG] License URL (license_key): https://atv-ps-eu.amazon.de/cdp/catalog/GetPlaybackResources?asin=B0B6KQMKZS
&deviceTypeID=AOAGZA014O5RE&firmware=1&deviceID=bf8c08d38d904c6c90263181427dc468&marketplaceID=A1PA6795UKMFR9&format=json&version=2&gascEnabled=false&resourceUsage=Immedi
ateConsumption&consumptionType=Streaming&deviceDrmOverride=CENC&deviceStreamingTechnologyOverride=DASH&deviceProtocolOverride=Https&deviceBitrateAdaptationsOverride=CVBR%
2CCBR&audioTrackId=all&languageFeature=MLFv2&videoMaterialType=Feature&desiredResources=Widevine2License&supportedDRMKeyScheme=DUAL_KEY

Note the random text Addition "sRBDnzWC" that is added in the middle of the Video URL (compare URLs in log lines 4 and 7). As I found out, this is intentionally inserted for Cloudfront URLs by these lines of code: https://github.com/Sandmann79/xbmc/blob/789ddedac74c0aab30c572c4eb6a16858182e7d7/plugin.video.amazon-test/resources/lib/playback.py#L138-L145

After disabling this part of the code, the Videos in my Watchlist play again fine. So, is it possible that Cloudfront no longer needs and no longer allows these modifications of the Video URL?

Thank you!

stsichler avatar Nov 30 '25 21:11 stsichler