Foliovision › Forums › FV Player › How to … › How to setup encrypted HLS stream with Amazon Elastic Transcoder
-
-
Hi Ahmed,
I apologize – there is a way to create a script for converting larger batches of videos, however we have no experience with it yet. I have found this article that might be helpful to you – How To Convert Videos With Elastic Transcoder.
Thanks,
EduardHi Ahmed,
The Azure media service can be used for hosting a simple MP4 and HLS stream already (you can see it in this demo. We will discuss further integration in our team.
Thanks,
EduardHi Ahmed,
Yes, I did some testing over the last couple of days and it seems more complicated than I first thought + it’s probably more expensive than AWS. We will probably integrate it some time in the future anyway.
If you want a relatively cheap hosting with content protection, you can use KeyCDN. You can serve encrypted videos (as you can see in this demo) that will not be accessible without the proper key even when downloaded. I haven’t tested it with HLS yet, though. Here is a guide on how to start with KeyCDN, how to create the distribution and how to use it with FV Player – Using KeyCDN With FV Player.
Thanks,
EduardHi Ahmed,
You’ve got a point, AWS doesn’t have a minimum payment.
I apologize, because I might have misled you in my previous message – the videos from KeyCDN are not ‘encrypted’. They are protected from downloading and hotlinking by the secure token, but not encrypted per se. That means no one without the unique access key should be able to use the video link for downloading or using the link on their website.
Thanks,
EduardI edited the cors using this guide: https://foliovision.com/player/video-hosting/hls
-However, I need to restrict access to the CloudFront, as if someone enters click on the CloudFront domain he gets all the files
shall the CloudFront content protection is compatible with HLS encryption? or it is not necessary anyway?
- This reply was modified 7 years, 5 months ago by Eduard.
hello again
I have a very hard time to setup the HLS via amazon and got it done well, but cant display it on my website using ur plugin, every time I enter the encryption code and press the decrypt buton I got nothing
Hello Ahmed,
I’ve edited your first post, so the access credentials don’t show up here.
As for your questions:
1) The CloudFront hotlinking protection is not necessary, since the stream is only accessible with the unique decryption key
2) It actually is in the guide, check this part
3) DRM Text shouldn’t be visible. Here is a guide that should explain it – Protecting Videos With DRM Text
4) Adjusting the logo size is currently possible only outside FV Player – meanin you have to edit the original image and then upload the resized version again
Thanks,
Eduardhello, I didn’t know that this forum is public, please remove the domains above too.
and also can u advise why I’m seeing this warning message:
We recommend that you also provide your M3U8 video in MP4 or WEBM format. HTTP Live Streaming (m3u8) is only supported by Apple iOS devices (iPhone, iPad…) and thanks to the new FV Flowplayer core also on all computers with Flash, so your coverage is not that bad.
Analysis of https://DOMAIN.COM/5_bunny.m3u8
This looks like a valid HLS stream.
Video:—-
For DRM text, can it be moving to the four corners to make it hard for the end user to edit it or mask it using video editing software?Hi Ahmed,
I edited your previous posts for you.
That message is a bit outdated and we are planning to remove it, since you don’t need MP4 alternative on desktop thanks to HLS.js.
Interesting idea about the DRM Text. Do you mean that it would kind of rotate, appearing in one corner at a time?
Thanks,
EduardOK cool thanks alot.
-yes I mean the text rotates and even change in color a little to prevent the color masking in video editing software
-for the decryption key in the HLS videos, looks like each video encoded on aws have its own key, why in the guide on the website, it states that “you only need to do that once?”
in this guide
https://foliovision.com/player/securing-your-video/hls-stream-for the encoding presets on aws, what shall I do to make it work on mobile/desktop stream, and different bandwidth?
I’m currently using 600k, 1M, 2M
is there any way to make the folio player auto switch according to the enduser internet speed? what shall I do to enable that? my master list already points to the 600k, 1M, 2M files
Hi Ahmed,
1) I’ll discuss it with the rest of the team. Thanks for the idea.
2) The Access Key stored in the FV Player Pro settings is set only once, but the Encryption Key is different for each transcoding job, therefore for each HLS stream
3) The point of HLS is that it will automatically switch to optimal quality based on the viewer’s bandwidth and the device he’s using, so you don’t have to worry about that. The pre-sets you are using are ok, but you don’t have to limit yourself to them and create your own. But more presets means transcoding and storing more data, so keep that in mind. I think that having about 4-5 qualities should cover all possible devices, maybe except 4k and such.
Thanks,
EduardHi Ahmed,
Sorry, I forgot to add that it’s currently available only in the Beta mode.
Thanks,
EduardHi Ahmed,
We usually use the 600k, 1M, 2M settings, but if you need more variants, you could use 400k, 800k, 1200k and 2200k. It’s easy to create your own profiles, so you can use whatever you want. Here is a https://developer.apple.com/library/content/technotes/tn2224/Art/tn2224_settings_May_2016.jpg made by Apple, that might help you.
As for the license acquisition URL – no, the encrypted stream is created for a specific page only.
Thanks,
EduardI’ve followed all of these steps… and it’s not working. Spent hours configuring everything as accurately as I can to the guides here, but I think it’s the final step that’s going wrong. The video player says “Admin: Video Issues” and reports as follows (note: I’ve replaced my domain with a placeholder, in case this comment is seen by others):
——-
Mime Type: application/x-mpegURL
Encryption: Your HLS stream is properly encrypted. The decryption key is loaded from https://(mydomain).com/?fv_player_hls_key=module1-lesson1.
Video: Due to the encryption we can’t provide any further details about the video.CORS headers missing – won’t play in desktop browsers without flash player
ERROR: crossdomain.xml not found – won’t play in desktop browsers
——
I followed the steps to create a crossdomain.xml and put it in the main bucket, so I’m not sure what’s wrong. I’ve got to admit, I’m kind of following these guides blindly. I’m following the steps, but I don’t 100% understand them…
What do I do?
Hello Peter,
yes and it should be already present if you start using Elastic Transcoder. Make sure that you are in the correct region when looking at the IAM screen. It has to be a region where you Elastic Transcoder pipeline exists. Just follow that part of our guide step by step: https://foliovision.com/player/securing-your-video/hls-stream#creating-encryption-key
Thanks,
MartinThis is Vincent Represent Hongxia to ask this question.
About License Acquisition URL Part, do we have to add /{Master Playlist Name}? if our Master Playlist Name is index? Are they same about below 2 License Acquisition URL.
https://foliovision.com/?fv_player_hls_key=swan_lake_reloaded/index
https://foliovision.com/?fv_player_hls_key=swan_lake_reloadedI didn’t add the “/index” and it seems work on my site, but just want to confirm if it will bring any issues? As we have transcode many videos without “/index”
Thank you,
Vincent Wang
Hello Peter,
we did check Amazon Media Convert before. I was really looking forward to it as Elastic Transcoder is not the best interface I have seen. Unfortunately Media Convert is not much better.
But I’m sure it has other advantages. It seems it’s easier to import presets so perhaps we should be offering that.
Thanks,
MartinHi
What cause/s the hlsjs-lite: Network Error message when using encrypted HLSv4 audio files distributed via CloudFront ? I have checked all my settings CORS, Cross Domain files in the S3 bucket, encryption keys, access keys, Whitehead settings and so on and everything seems to be ok. I have carried out an invalidation to clear the CloudFront Cache but the message continues.
Can you advise what I should check/adjust next to solve this error.
Regards
NeilHi Sorry with reference to the above there are some inaccuracies which need correcting:
Ok
What are the possible cause/s that produce the ‘hlsjs-lite: Network Error message’ when using encrypted HLSv4 audio files distributed via CloudFront ? I altered the urls to include the Cloudfront domain, I performed an invalidation after doing the recommended Whitelist changes and checking CORS and Cross Domain were in place. HLS.js is eanbled in the settings. Decryption is working. All access keys seem to be fine . The audio files are accessible/viewable in the S3 Browser and are in the relevant S3 output bucket that is part of the three bucket HLS system. The error message is still there (I also did a force refresh on the lap top).
Can you advise what I should check/adjust next to remove this error and allow playback of the Mu38 stream?
Regards
NeilHi Martin – Thank you for the reply. The License Acquisition URL for the MU38 in question is https://jazz4all.org.au/?fv_player_hls_key=jazz_stream/index
Regards
NeilHi Martin
I refreshed the page and my ‘awaiting moderation’ reply disappeared so not sure If you got my reply with the license acquisition URL in it – so here it is again just in case. https://jazz4all.org.au/?fv_player_hls_key=jazz_stream/index
By the way I am working at an annotated document for the other matters we are discussing.
Regards
NeilHello Neil,
I was about to send a reply to you, but I can’t see it here, so perhaps I forgot to send it.
Please also send the URL of the actual HLS stream and a screenshot of the post editing interface where the video is inserted. If the shortcode is like [fvplayer id="1234"] then please send the export of that player. You can get it from the wp-admin -> FV Player screen, it’s one of the actions in each row of the list table.
Thanks,
MartinHi Martin
Not sure if you missed my email from late last week with the information you requested. However, I have been checking the various Foliovision player settings under the Hosting Tab. Under Amazon S3 Protected Content I have specified the bucket where the HLS is stored along with encryption keys. However, when I remove either the specified bucket name or the encryption keys, I can no longer access the bucket from within the player editor ‘Add Video’ S3 tab function.
Regards
NeilHello Neil,
sorry about the delay. At a glance it appears it should work.
Perhaps multiple videos matching the “jazz_stream/index” part of URL. Please try to search for that in wp-admin -> “FV Player” and also in wp-admin -> “Posts” -> “All post” (and any other place where you posted videos using [fvplayer] shortcode, perhaps Pages and some custom post types).
You should be only getting one search result. If you get multiple results, then your HLS stream might be getting incorrect decryption key.
We are happy to help you solve this issue right on your website if you order or Pro support. But we can also continue giving you troubleshooting tips if you prefer that.
Thanks,
MartinHi Martin,
can you also write a similar workflow that is using Amazon Media Convert instead of Elastic Transcoder? In MediaConvert the dialogues are different. You somehow have to select Static key in the DRM encryption for HLS AES encryption. Elastic Transcoder is not developed further by AWS, so it will be good to switch to MediaConvert.
Thank you
Peter