I'm trying to better understand an issue we're seeing with multiple video renditions. When we package multiple renditions of a video, we use a consistent Content Encryption Key for each of them. Do the packaged ContentID and/or License ID have to be consistent as well?
At the moment, each individual asset has a unique content ID. Currently, when I attempt to stream one of these packaged assets over RTMP, a rendition switch event will cause the player to hang. I don't see any additional license requests from the player, just a series of NetStream Events:
NetStream.Buffer.Full (repeat indefinitely)
If the expectation is that the user only needs to download a single license to view the multiple video renditions, then you need to ensure that both the License ID and the Content Encryption Key are the same for all renditions. The License ID is used by the client to determine if it has the required license, so if the License ID was different for each rendition, the client would need to obtain a new license for each. If you are using the Media Packager command line tool for packaging content, the only way to have all the renditions use the same License ID/CEK is to package them all at the same time. If you are using the Flash Access SDK APIs directly, then you would specify the CEK and License ID using the ContentEncryptionKey class. The API documentation has additional information about the License ID requirements.
When you use the Flash Access SDK APIs or the Media Packager command line tool, the Content ID is not used by the Flash Access client or server directly. It is only intended as a means for your server implementation to identify the content. You can use a unique content ID for each asset; just be aware that if the intention is that all assets share the same license, your server will only get one license request, and the content ID you see will be the ID for whichever asset the user accesses first.
If you were using FMS (or the f4fPackager included with FMS) to encrypt the content, then the Content ID would need to be consistent for all renditions, if you want them to share the same license.
Hi Katherine, thanks for the rapid response.
If I understand you correctly, if I package 2 videos (we'll call them A and B) with the same license ID, and the same CEK, I can expect the following:
1. I play A on my local system, it makes a request to the license server described in the video metadata to obtain a valid playback license
2. If I then play B on my local system, the Flash Access runtime will say, "oh, I already have a voucher for this license ID and CEK" and will use it without attempting to fetch another one from the license server (providing license caching is enabled, and the second playback falls within the validity window of the voucher).
However, I have packaged 2 such pieces of content, and when I play them sequentially in the FAXS reference player, I see 2 calls to the license server. Based on what I've read in the forums and in the documentation (the Protecting Content guide could be a bit more clear on how the License ID is used), that is not what I'd expect.
The assets can be found at:
The expectations you stated above are correct, but it is important to note the metadata for both videos has to specify the same license server. On the client, each license server has its own separate license store. In the two pieces of content you provided links to, the license server URLs are different. That means when you play A, it fetches a license and puts it in license store for license server 1. When you try to play B, it looks for a license with the same license ID, but in license server 2's license store. Since that store is empty, you see another request to your server.
Would you be able to share how you were successfully encrypting your content with a custom license id and CEK?
I am currently trying to accomplish the same, as we need to encrypt a piece of content using the Flash Access SDK to specify a particular license ID.
Any help would be appreciated.
To specify the content encryption key and license ID, use the V2KeyParameters.setContentEncryptionKey() method. This method takes a ContentEncryptionKey object, which includes both the key and license ID. Please see the Flash Access 3.0 JavaDocs for more details.
Europe, Middle East and Africa