Setting up HLS Encryption with FV Player Coconut is much easier than using Amazon Web Services.
Coconut does a great job at providing an API which you can use to load source videos from difference locations and then store the output somewhere else.
You also need a reliable CDN. We have found BunnyCDN works well and only costs a fraction of the Amazon CloudFlare pricing.
We also store the files on DigitalOcean Spaces for flexibility. BunnyCDN is able to pull files from it using the AWS URL signatures to truly keep your source files secure.
1. Get the API token:
2. Then store it in Settings -> FV Player Pro -> Hosting -> Cococnut.co:
3. That's all you need to configure in Coconut.co. No need to configure any presets as these are part of FV Player Coconut code:
- 240p @ 500 kbps
- 480p @ 1000 kbps
- 720p @ 4500 kbps
- 1080p @ 6000 kbps
- 1440p @ 12000 kbps
Next we need to configure the source and target DigitalOcean Spaces
4. First generate the Spaces API keys.
5. Store these keys in Settings -> FV Player Pro -> Hosting -> Cococnut.co and in Hosting -> DigitalOcean Spaces.
6. Next create the DigitalOcean Space for the source video files. Make sure you keep the permissions set to private for this space.
This is where you will need to upload any files you would like to get encoded. You can upload it using your web browser or using a desktop application like CyberDuck - using the API keys.
7. Store the source DigitalOcean Space endpoint and Space name in Settings -> FV Player Pro -> Hosting -> DigitalOcean Spaces.
8. You will also need the target DigitalOcean Space for the resulting HLS video files. Make sure you keep the permissions set to private.
9. Also store the target DigitalOcean Space endpoint and Space name in Settings -> FV Player Pro -> Hosting -> Cococnut.co.
10. Add a new pull zone, using the High Volume tier.
The Origin URL needs to be the target DigitalOcean Space address.
11. Once it's created, store the Hostname like myvideo.b-cdn.net in Settings -> FV Player Pro -> Hosting -> Cococnut.co -> CDN Custom Domain Name.
12. In Security -> Allowed Referrers add your website domain. Make sure you include www. if it's using that.
13. Also enable Security ->"Block Direct URL File Access.
14. In Headers section enable "Add CORS headers" and put in:
15. Set up AWS S3 Authentication
AWS Key - your Digital Ocean access key
AWS Secret - your Digital Ocean secret access key
AWS Region Name - Your Digital Ocean Endpoint URL
And now your Coconut encoding set-up is finished and ready.
If you want to find out how to use it. Please follow our How to encrypt videos directly in WordPress with Coconut guide.