There are many reasons why you would want a custom video player on your website. Embedding your videos using a hosted video service such as YouTube or Vimeo can be an option, but it isn’t suitable for every website or web application. To simplify compliance with GDPR requirements, many websites want to avoid serving third-party tracking cookies from Google to their visitors. Perhaps you might simply want a white-labeled video player which doesn’t have third-party branding on it. Or, you might have members-only or video subscription content that needs to be protected against piracy.
For these scenarios, hosting videos with a custom video player and a global CDN is more suitable than using video hosting platforms such as YouTube or Vimeo.
Why is a content delivery network (CDN) also needed? If you host a video on a single server such as your WordPress website, it will buffer very slowly – leading to intermittent pauses during the playback of the video. Also, local storage and outbound bandwidth can be more significantly expensive on your web server compared to a static, object storage service designed for hosting media content.
This is why many companies have uploaded their high definition videos to an object storage service. Then, by adding a CNAME record to their DNS zone they can serve their video objects using a CDN – which may or may not be controlled by the same cloud provider. Some object storage services include a CDN, meaning that downloads are globally accelerated with dozens or hundreds of points of presence (POPs) worldwide – at no additional charge. A CDN retrieves your content from its origin, and caches it at multiple POPs that are physically closer to the users who stream your content. This reduces the latency, and any buffering
Although the most well-known object storage and CDN services are probably Amazon S3 and CloudFront, Amazon’s product may not necessarily be the best choice for hosting video on a website. Amazon charges 8.5 to 17 cents/GB for outbound transfer served through CloudFlare, depending on region. Regions such as US, Canada, Europe, and Israel are cheapest, while regions that are further afield such as Australia, East Asia and India are the most expensive.
If you do decide to use Amazon S3 and CloudFront to host your videos, you can use special bucket access policies to restrict access to downloading your videos, or more advanced techniques such as pre-authenticated, signed URLs so that only your web application can stream videos from your bucket.
Competing services such as DigitalOcean Spaces with a built-in CDN, and CloudFlare Stream can be more cost-effective alternatives to providing streaming video with Amazon CloudFront. DigitalOcean Spaces is S3 compatible, includes 250 GB of storage and 1 TB of monthly outbound bandwidth for $5/month, and the CDN is free. You need a video player plugin for your website that supports streaming content from S3 to leverage Spaces for this purpose.
The top video player plugins for streaming video from S3 include:
- JW Player (Free for non-commercial use, from $10/mo. Up to 50k views)
- S3 Media Maestro ($15 for unlimited sites)
- FlowPlayer (Free with FlowPlayer branding, from $25/month. Up to 50k views)
If you use WordPress, the best solution to integrate with Spaces (without a monthly cost for the web player) is S3 Media Maestro. With JW Player and FlowPlayer, you can use their built in CDN, or configure a commercial CDN service such as KeyCDN.
If you want to find out the best video player and CDN to use, contact our team for a recommendation and an outline of what it would take to integrate it with your website.
For images such as JPGs or PNGs, CSS, and JS files, BackBlaze B2 and Wasabi Cloud Storage are part of the Bandwidth Alliance, which means they don’t charge for bandwidth out to CloudFlare – so CloudFlare’s free plan can be used in conjunction with these object storage providers to speedily serve those files at a very low cost.
However, CloudFlare’s free plan only caches small, static files which do not include video files such as .mp4 clips. CloudFlare Stream is a paid, premium service that CloudFlare provides for storing and streaming videos through the global network, billed at $1 per 1,000 minutes streamed and $5 per 1,000 minutes stored. For a large website with users streaming hours and hours of videos, CloudFlare Stream can get equally as expensive as Amazon CloudFront. We recommend CloudFlare Stream for relatively short video content such as marketing videos, or for extremely high quality video content (4K and above) that is difficult to store and stream elsewhere.
VdoCipher is one of the best integrated solutions we’ve seen out there for preventing copyright protected videos from being pirated. It uses Google Widevine DRM technology to prevent users from downloading videos, and reuploading them on file sharing or torrent sites. VdoCipher provides an end-to-end solution that includes the web player to embed into your website, content delivery network, and anti-piracy technology. VdoCipher’s plans also include a certain amount of storage and monthly bandwidth, meaning you don’t have to pay an object storage or CDN provider separately. The VdoCipher WordPress plugin has watermarking functionality to discourage users from screen capturing your videos using a recording tool such as SnagIt or Camtasia Studio.
If you need to host videos on your website using a custom video player, there are many options you can consider with varying price/performance characteristics, branding & white labeling options, and digital rights management tools. Videos can be an engaging way to connect with your customers for buyer education and training purposes, so don’t despair about the seemingly confusing options. Contact our cloud architects to discuss your video hosting needs with Amazon S3, CloudFlare Stream, or other alternatives.