Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Live Streaming via AWS cloudfront

Like to know if anyone been able to stream HLS video via AWS Cloudfront with Signed URL.

My experience so far is, it is not possible. AWS documentation is not clear. AWS Forum is silent.

I seem to be able to get the first file ( .m3u8 ) then it stops. Using JW player, which complains cannot get media file.

If answer is yes, please point me in the right direction.

Thanks.

like image 794
eyeconect Avatar asked Jun 20 '13 16:06

eyeconect


2 Answers

The scenario with unsigned URLs will most definitely work. I've successfully segmented video streams with ffmpeg onto S3 and served from CF. It's all HTTP after all.

If you wish to restrict access to your HLS content, your playlist file would need to include signed URLs as well. You would typically compute these as the playlist is requested, based on whatever credentials you wish to authenticate the user with. Thus, you need a server-side implementation that generates session-unique m3u8's for you in order for the signed-URL scheme to make sense.

Depending on your needs, another option would be to look into DRM. JW Player supports single/rotating key fragment decryption, which arguably tends to be a more complicated solution. You would then be left with the matter of securely distributing decryption keys to your clients.

I hope this somewhat addresses your concerns. If not, feel free to leave a comment.

like image 110
protomouse Avatar answered Oct 09 '22 15:10

protomouse


Use signed URLs in the following cases:

  • You want to use an RTMP distribution. Signed cookies aren't supported for RTMP distributions.
  • You want to restrict access to individual files, for example, an installation download for your application.
  • Your users are using a client (for example, a custom HTTP client) that doesn't support cookies.

Use signed cookies in the following cases:

  • You want to provide access to multiple restricted files, for example, all of the files for a video in HLS format or all of the files in the subscribers' area of a website.

  • You don't want to change your current URLs.

For more : http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-choosing-signed-urls-cookies.html

like image 30
Sathish Avatar answered Oct 09 '22 16:10

Sathish