About Decryption in Amazon Music

We are creating Amazon Music streaming application in Yocto project. We are able to have License Response from the License server, and download the audio segments. But we don’t know how to decrypt the audio segments. Is there any sample source code for reference?


Amazon Music uses Widevine for DRM Encryption.

Hi Sam,

Thanks. We have Widevine SDK from Google. But we don’t know which APIs can be used to decrypt the audio segments of Amazon Music file.
Is there any reference source code specific for Amazon Music decryption?
We did ask for support from Widevine. They told us to ask Amazon Music for the implementation of the decryption.

Let me know if this helps. If not can you provide specifics of what trouble you are running into? The Widevine CDM should decrypt the media segments for you.

We followed the Playback workflow as the above picture. In step 10, we called “Status update(const std::string& session_id, const std::string& response)” from Widevine CDM to update the license. In step 12, we supposed to call “Status decrypt(const std::string& session_id, const InputBuffer& input, const OutputBuffer& output)” from Widevine CDM. But the struct of InputBuffer contains key_id and iv which we don’t know how to parse from the license response.

Can you please help?

Those fields are found directly from the stream.
In general, media extractor libraries you may use to parse the streams will parse this info and expose it to you.
If your platform allows the app to handle parsing and extraction of the streams, then you will need to add fields to your API to allow the app to specify these values.

Thanks for your reply.
Can you suggest some “media extractor libraries” to parse the Amazon Music streams?

I suggest you look for Open Source projects like in the following link Top 7 widevine Open-Source Projects (Jan 2024)
Disclaimer, suggested open source projects are not recommended or supported by Amazon