Categories
video WordPress

Video hosting and WordPress: How to do it right

Don’t host videos on your WordPress site. There are better alternatives. Learn why from lynda.com author and WordPress expert Morten Rand-Hendriksen.

I’m getting questions about video hosting and WordPress on a weekly basis now so I think it’s time to publish an article about it. Here’s the most common question I get:

How do I upload videos to my WordPress site so I don’t have to use YouTube for my videos?

The answer to this question is “you don’t”, but that doesn’t really explain anything. So let me explain:

There are a myriad of reasons why you may want to host your videos on your own site: Maybe you don’t like the standard video hosting services. Maybe you don’t want your videos on YouTube or Vimeo. Maybe you want to restrict viewership to only specific visitors or paying visitors. All these reasons are perfectly reasonable. But the solution – to host the videos on your own server under WordPress – is ill advised and detrimental to your goals. In this article I’ll give you the reasons why you shouldn’t host videos on your WordPress site (or any other site for that matter) and then I’ll suggest what you should do instead.

Why you shouldn’t host videos yourself, part 1: Video files are big

Video hosting is complicated at the best of times. Let me illustrate why: Let’s say you have a standard 3 minute HD video. It is encoded in a standard video format (say MP4) and the total file size is 100MB (very small btw). You upload it to your server and use a plugin to embed the video in a player on your site. You visit the site and play the video and it works fine. What happens when you watch the video is your browser downloads the entire 100MB file and plays it. Now think about what happens if 10 people go to the site and try to watch the video at the same time: The server has to upload a 100MB file to 10 different computers at the same time so it is actually uploading 1GB of data. Now imagine if 50, or 100, or 500 people try watching that video at the same time. For every new person who watches the video simultaneously, the server will have a harder time getting the file to the viewer. The service will be slow, and after not too long you’ll get an angry call from the hosting provider saying you need to take the video offline.

You see most regular hosts are not designed to serve up video files. There are customized hosts that do this well, but they are few and far between.

Why you shouldn’t host videos yourself, part 2: Codec Fragmentation

The web is no longer restricted to desktop and laptop browsers. People access the web using smartphones and tablets as well, and TVs and game consols are now shipping with web browsers as well. What is not well known is that all these different platforms use different types of browsers and these browsers in turn interpret video differently. Back in the day (2 years ago), video on the web was pretty much displayed using either Flash or QuickTime. Today Flash has largely been replaced by HTML5 video, and each browser has its own preferred codec for this video format.

If you’re not a video geek like me that makes no sense so let me translate it into plain English: Different web browsers, on your computer and on tablets and smartphones, speak different video languages. And for whatever reason they usually only understand one video language. As a result if you only upload one video file in one language, anyone using a browser that speaks a different language won’t be able to see the video. That means if you want to host your videos yourself you have to upload not one file but five to cover all your bases: Ogg, WebM, H.264/MPEG-4, VP8, and Flash. This is the only way to cover all your bases and ensure that everyone can view the video regardless of what browser or device they are using.

Why you shouldn’t host videos yourself, part 3: Wireless data is expensive

Serving up a 300MB HD video file to a desktop computer with a broadband internet connection is no big deal. Serving up a 300MB video file to a smartphone is a disaster waiting to happen. Never mind that it’ll take forever to load and that the video format is wrong for the size of screen, but many smartphone data plans are only 500MB or 1GB, so downloading that file just 3 times could put the visitor over her monthly limit. Professional video hosting services like YouTube have systems in place to ensure that smartphones receive videos optimized for smartphones that don’t fry data plans. Doing the same with your self hosted videos is pretty much impossible.

The Solution: Use a professional video hosting service

I bet that right about now you are asking yourself “OK, so if I can’t host the videos on my own server, what am I supposed to do?” The answer is simple: Don’t reinvent the wheel. The problems above, and a myriad of others I didn’t mention, have been solved, and solve well, by several different companies over the years. And it would behoove you to take advantage of their expertise.

With the sudden popularity of online video, largely spurred on by YouTube, entrepreneurs came out of the woodworks to offer up alternatives with more control and less spam. These alternatives have now matured and deliver professional grade services at acceptable prices. And because of the popularity of WordPress, most of these services integrate seamlessly with the platform giving you all the control you need while at the same time staying clear of the YouTube trolls.

There are many services out there offering different types of services for different purposes so you need to do your research and figure out a) what you need and b) who provides those services at a price point you are comfortable with. (And yes, you have to pay for these services, but they are not all that expensive.) My recommended (but not exhaustive) list includes, in no particular order, VideoPress (by Automattic), Viddler, BrightCove, and Kaltura. All these services will provide you with secure video hosting that works the way your users will expect across all platforms and devices without server lag and other bandwidth issues.

Using videos in WordPress

How you use your videos in WordPress depends on the service you end up selecting. Some, like VideoPress, integrate seamlessly into WordPress with a plugin and all the work is done from within the CMS. Others, like BrightCove, have their own custom user interface and you embed the videos into your site by copying and pasting code. You can also use independent plugins like VideoJS to place hosted videos in your site. It’s really up to you.

But what about Amazon S3 / Azure / The Cloud?

You’ve probably seen people talk about video hosting on a cloud service like Amazon S3, Azure, or the likes. And yes, that can be done, and you can even overcome the issues raised above by using a service like ZenCoder to encode your video files to be served up to every possible browser and device. But the reality is this combination will be more complicated and cumbersome and probably more expensive than just using a professional video hosting service. It’s a question of simplicity and reliability.

If you don’t want to break the bank, just go with VideoPress at $59.97 / year and you’ll have all the frustration free video hosting you need. Or you can go with one of the other services for enhanced functionality. Just don’t waste your time on self hosted videos. It is not worth it.

By Morten Rand-Hendriksen

Morten Rand-Hendriksen is a staff author at LinkedIn Learning and lynda.com specializing in WordPress and web design and development and an instructor at Emily Carr University of Art and Design. He is a popular speaker and educator on all things design, web standards and open source. As the owner and Web Head at Pink & Yellow Media, a boutique style digital media company in Burnaby, BC, Canada, he has created WordPress-based web solutions for multi-national companies, political parties, banks, and small businesses and bloggers alike. He also contributes to the local WordPress community by organizing Meetups and WordCamps.

11 replies on “Video hosting and WordPress: How to do it right”

Precisely. Not to mention the constant frustration of having to manage multiple video file sizes and formats, the lack of streaming options, and the management of players and embedding itself. Like with most things buying a service designed to do what you want is easier and better than trying to do it yourself.

good timing with this post, as I was looking into hosting solutions.
Viddler has been real great, haven’t made that jump.
Kaltura is crazy expensive though.

Of course with Automattic – you don’t much upfront info on the site.
signup box, a few features, and have a go…

Just wondering…With vaultpress – can i host the videos there, and then place them on my self-hosted wordpress site behind a woocommerce subscription portal?

@Craig: I’m assuming you mean “VideoPress” when you say “VaultPress”? If so the answer is yes. VideoPress allows you to upload video files to the system and then place them anywhere you want on the web – on your site or on a different site. And with VideoPress you can control not only where the video is visible but also who can access it.

@Lorenzo: Vimeo Pro and YouTube are great options for people who want to use Vimeo and / or YouTube. However, there are a lot of people who for various reasons don’t want to use those services. This article is only addressing their options. I strongly encourage people to use Vimeo and YouTube whenever possible.

I think it is important to know that with Vimeo Pro ($60 a year) you can set your videos to not show on the vimeo site and also to only be embedded on specific URL’s. (you can have 1 or a list) This way you also can stop others embedding your videos if you wish.

I considered adding Vimeo to the mix, but they have a specific aesthetic and strict content regulations so it doesn’t quite fit with a lot of the scenarios people describe when they want to self-host videos (primarily marketing).

Comments are closed.