Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

HLS encryption playback


Hi,

I have transcoded my mp4 into hls using aws elastic transcoder. While transcoding the location of the data key file has been specified and it is embedded into the manifest file properly. When I try to playback the encrypted video (using jwplayer enterprise) nothing happens. There is no error getting logged. Can someone look at this and tell me what I am doing wrong?

For now the hls segments are in a s3 bucket and is public. The license file for decrypting the hls segments is also public.

Any help in in figuring this will be helpful.

Test page hosted at: http://staging.knowlens.com/test/jwp7.html
Location of the m3u8: https://s3-ap-southeast-1.amazonaws.com/sg-kl-tfc-processed-encrypted/1-TFC+Animation+Part1+Combined-4/1-TFC-Animation-Part1-Combined.m3u8

Thanks in advance.

Regards,
Dennis


9 Community Answers

mark

User  
1 rated :

Hello.

This is likely because you are not using a consistent http protocol.

Your player script is using http
<script src="http://staging.knowlens.com/test/jwplayer-7.2.4/jwplayer.js"></script>

And your media is using https
file: 'https://s3-ap-southeast-1.amazonaws.com/sg-kl-tfc-processed-encrypted/1-TFC+Animation+Part1+Combined-4/1-TFC-Animation-Part1-Combined.m3u8

It looks like you do not have an SSL certificate on the server that you host the player script file. Therefore you will need to change the URL of the media file to http - and then it should work.

dennis

User  
0 rated :

Thanks for your response Mark. I have changed the media url to http (non https) but even now it does not work. Any other thoughts?

mark

User  
0 rated :

I do actually Dennis.
The previous response was still an issue that would stop the playback - but you have another issue
Going by your main manifest file, the sub-manifest files should be in the same location as the main file and be named 720p.m3u8 and 480p.m3u8
Neither of these files are either in that location or they are not set to be public, example https://s3-ap-southeast-1.amazonaws.com/sg-kl-tfc-processed-encrypted/720p.m3u8

mark

User  
0 rated :

Sorry I just noticed I left out some of the path URL https://s3-ap-southeast-1.amazonaws.com/sg-kl-tfc-processed-encrypted/1-TFC+Animation+Part1+Combined-4/720p.m3u8
Is there
I don't know now then, the decryption key is found on your server - I'm just not sure if it's correct.
For what its worth, I use HLS encryption and don't have a problem, but I use Zencoder not Elastic Transcoder - I don't like the Elastic Transcoder myself

mark

User  
0 rated :

First thing I would TRY is putting the decryption key in the same location as the rest of the media, rather than on your server. To do this , you would have to edit the manifest files in notepad

dennis

User  
0 rated :

Have put the license file at the same location as the media files and have also edited the manifest for 480 and 720 to point to this location but that also does not seem to resolve the issue.
I am assuming that the Decryption Key is valid since I used the method outlined at https://forums.aws.amazon.com/thread.jspa?messageID=606859 and got a clear text output without any errors. This output is what I have referenced as license in the manifest.

Any other pointers? I can't think of what else to try. Maybe I will try Zencoder and see what I get.

mark

User  
0 rated :

My memory isn't great - but I did switch from using Elastic Transcoder to Zencoder for a reason , maybe this was one of them.

dennis

User  
0 rated :

Appreciate your help Mark. I think the issue is with the decoded key from aws. I got it working with Zencoder as well as Elastic Transcoder with the store option. Now I need to figure what the issue is with the decode process when using 'No store' option. Also, if/when you remember the reason you shifted from AWS to Zencoder do let me know. Once again, thanks!

mark

User  
0 rated :

np.
It was a whole lot easier to understand the API with Zencoder and implement in my project. They also have MPEG DASH, those were two big reasons. Oh yes, and there's the support thing, like Zencoder give it and with AWS you're on your own pretty much,
Yes, more expensive but it suits me.

This question has received the maximum number of answers.