FV Coconut is our free addon plugin for FV Player which makes the video posting and streaming easy (and hopefuly one day even fun). It integrates right into your WordPress admin interface.
While we want to keep it simple, we do not want to compromises on streaming performance or video download protection.
Why FV Coconut changed the CDN provider
That’s why in the early days we choose DigitalOcean Spaces for video storage and Bunny CDN for video streaming. The reason to make Bunny CDN part of the setup was that that DigitalOcean Spaces built-in CDN did not support URL signatures. Since FV Coconut comes with a setup wizard it was easy to set it all up and it did not matter if you have to use two services or one.
Later on the DigitalOcean Spaces CDN started to support URL signatures which was great news. We could stop using Bunny CDN which made the setup simpler. We also found that DigitalOcean Spaces CDN offers better overall performance with no slowdowns. Bunny CDN would occasionally run into issues as it had to pull files from DigitalOcean Spaces. So that was the price for mixing different service providers.
With DigitalOcean taking care of both video storage and streaming the situation seemed to be perfect.
If we later need to move to a different provider we can. It just needs to be S3-compatible and allow video stremaing in their terms of service.
Being able to switch providers and avoid vendor lock-in is important for both Foliovision and FV Player.
Video Streaming Performance Improvement
However we found that the URL signatures slow down DigitalOcean Space CDN. Since the URL signatures are created when user starts playing the video, each user gets to stream the video using different set of URLs.
Here’s the first time user plays a video – notice all the cache misses when loading the HLS video segments:

The average load time for the HLS video segments above is 141 milliseconds.
When another user plays the video he will again get different URL signatures. The reason is that URL signatures change every second to keep the signature expiration time low.
So we decided to anchor the expiration times to the closest 4 hour time window. That way the streaming URLs only change once in 4 hours and if more users play the same video they will enjoy as faster video load times.
Here’s the loading of the HLS video segments with this improvement.

The average load time for the HLS video segments above is 79 milliseconds. That’s 44% improvement.
Did we lower the video protection?
We choose 4 hours as that’s more than enough if user is watching a 2 hour long video on mobile with some breaks. This allows user to watch the video for the full 2 hours and then seek back to the start of it, or watch it for an hour, then put the phone to sleep for 2 hours and continue.
It could be set much lower to say 15 minutes. FV Player Pro would detect that the video stream has expired and reload the video. But in general it’s better to keep it simper for the mobile users.
The core of the video download protection is in the HLS encryption. The URL signatures play a secondary role, so it’s not compromising the video protection.
The videos are still protected agains downloads with the automated video downloading tools.

Martin Viceník
Martin graduated as an engineer in Computer Science from Slovak Technical University in Bratislava. He grew up in Liptovský Mikuláš in northern Slovakia next to the beautiful Tatra mountains. He is the developer behind our FV Player.
Leave a Reply