Picture this scenario…
You’ve just created your first video for your site, and you’re ready to share it with the world. You’re impressed with how it turned out, if you do say so yourself.
You open your web browser and log into your WordPress dashboard. Then, you create a new post and choose the “Video” post format. You write a bit of text about your video, then upload your video to the Media Library, just like you’ve done dozens of times when you added images to your posts.
“Huh… that’s taking a while to upload,” you think to yourself. “But I suppose that makes sense. This video is almost ten minutes in length, and is nearly 100 MB in size.” You lean back in your chair while the file finishes uploading, and begin to get excited about everyone’s reaction to your video. The file’s finally uploaded, and everything looks good to you. “That was easy!” you think to yourself.
You click publish, and then send out a Tweet and a Facebook post containing a link to your video post, inviting everyone to take a look at your first video.
That’s when it starts to go wrong.
Before you even return to your site, feedback begins to trickle in…
“Tried to watch your video, but it just stopped playing after a few seconds.”
“Hey, I see where your video should be, but all I get is a black box.”
“I can’t play your video from my mobile device.”
That’s odd. It worked fine for you earlier. You go to your site to pull up the video for yourself to see what the fuss is about, and you notice that the page takes forever to load. Why is your site suddenly so slow?
How are other folks doing this? You’ve watched hundreds of web videos on other sites and never encountered these issues.
Before I get into the technical reasons why you should avoid hosting your own video files, let me give you a little background…
Since I launched this video tutorial site four years ago, I’ve had the opportunity to experiment with just about every video player and hosting combination available today.
(By the way, my favorite self-hosted configuration was using the excellent SublimeVideo Player by Jilion, with the video files themselves hosted on Amazon S3. They even have a convenient WordPress plugin, if you’re convinced—even after reading this article—that you want to host your video files.)
Over the next year and a half, I ran into a number of problems with this setup, which I’ll get into in a minute. But first, let me take a second to explain the difference between embedding video, as opposed to uploading it to your WordPress server.
We’re Talking About Embedding vs. Self-Hosted Video
Embedding a video is essentially a two-step process. First, you upload your video file to a third-party video hosting service like YouTube, Vimeo, or Viddler. Then, you copy a small bit of code that they furnish to you, which you can paste into your post or page on your own WordPress site. The video will appear on your site, in the location where you pasted the embed code, but the video itself is being streamed from the video host’s servers, as opposed to your own server, where your WordPress site is hosted.
Self-hosting a video means that you upload the video file to your site, using the built-in file uploader in WordPress, similar to the method you use to upload an image to your site.
With that as background, here are ten reasons why you should avoid uploading video files to your own web server (particularly if your site is hosted on a shared server)…
1. Server Bandwidth
Video files can be quite large in size. Unlike images—which are typically measured in kilobytes—an HD video file can easily weigh in at more than 100 MB. Now, imagine what will happen to your shared hosting server when dozens of folks attempt to watch the same video at the same time.
Your web hosting provider allocates a certain amount of bandwidth and other resources for each server on their network, based on average traffic rates that do not include serving large media files to hundreds of individuals (or more) at the same time. Too many requests for a single large file will quickly exceed the limits of the web server on which your site is hosted, and bring your site—and any other sites that also “live” on the same server—to its knees.
But you may never even get that far, because of…
2. File Size Limits and Storage Space
Most web hosting providers limit the maximum size of uploaded files to 50 MB or less, prohibiting you from uploading video files that are longer than a few minutes or so in duration. Additionally, large media files may violate the terms of the Acceptable Use Policy with your hosting provider and result in your hosting account being shut down.
If you’re able to upload large video files to your server on a frequent basis, you could eventually exceed the amount of storage space provided by your hosting account, especially if you regularly back up your site. In addition to the amount of disk space your video files will occupy, backups will begin to take significantly longer to execute. More data requires more disk space, and takes more time to backup.
3. Slow-Loading Video or Unexpected Pauses During Playback
If your video file resides on a single server with a limited amount of bandwidth, folks who attempt to watch your video may experience unexpected pauses during playback while their computer waits for the file to download or stream to their computer. This problem is compounded by a slow Internet connection. Even when I hosted my videos on Amazon’s S3 content distribution network (CDN), many folks still complained about slow-loading videos.
4. No Single File Format Standard for Web Video
The current HTML5 draft specification does not specify which video formats browsers should support. As a result, the major web browsers have diverged, each one supporting a different format. Internet Explorer and Safari will play H.264 (MP4) videos, but not WebM or Ogg. Firefox will play Ogg or WebM videos, but not H.264. Thankfully, Chrome will play all the major video formats, but if you want to ensure your video will play back on all the major web browsers, you’ll have to convert your video into multiple formats: .mp4, .ogv, and .webm
Now you’ve got three different video files to upload, each one potentially hundreds of megabytes in size.
(By the way, just how much bandwidth does your Internet provider allow you to use before imposing bandwidth caps? You may soon find out after you’ve uploaded several gigabytes of video files.)
5. Hope you like converting videos. A lot.
Most of your audience will likely watch your videos from their desktop or laptop with the benefit of a high-speed Internet connection. For those folks, you’ll want to deliver a large, HD-quality file so they can watch it full-screen if they so choose. Generally, this means a 1080p or 720p file at a high streaming bitrate (5000 – 8000 kbps).
But you’ll also want to encode a smaller, lower-resolution version for delivery to mobile devices like phones and tablets, as well as delivery to viewers with slower Internet connections.
Now you’ve got half a dozen or more individual video files for playback on all the major web browsers and devices. But how does your site know which of those files to serve to each person?
6. Video Players
A video player is a small piece of web software you install on your site that will automatically detect which device is requesting your video, along with its connection speed, and then deliver the appropriate version to that person.
There are dozens of excellent video players that will handle this task (like the SublimeVideo Player I mentioned earlier), but WordPress 3.6 will actually include a built-in video player that will eliminate the need for a third-party video plugin. That’s great news! But it gets a bit tricky…
7. Cumbersome Code [or Shortcodes]
Third-party plugins require you to create a bit of code to tell the video player which formats you’ve created, as well as their location on the server. It looks something like this…
<video poster="movie.jpg" controls>
<source src="movie.webm" type='video/webm; codecs="vp8.0, vorbis"'/>
<source src="movie.ogg" type='video/ogg; codecs="theora, vorbis"'/>
<source src="movie.mp4" type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"'/>
<p>This is fallback content</p>
(The folks at SublimeVideo created a handy WordPress plugin that creates this code for you.)
Even with the upcoming built-in support for video in WordPress 3.6, you’ll still need to construct a shortcode like this…
[video width="960" height="540" mp4="movie.mp4" ogv="movie.ogv" webm="movie.webm"]
You’ve finally got all your video files uploaded to your server, and you’ve installed a video player to handle all the “behind the scenes” detection and such. So after all this, why does your video look so much better in some browsers/devices than others?
8. Varying Quality Across Browsers
Remember earlier, when I said you’ll need to convert your videos into nearly half a dozen different formats and sizes? You’ll need a software app to handle this file conversion for you. There are hundreds of video conversion applications out there, and you may find that you need more than one to handle conversion into all the various format.
Unfortunately, every app handles the conversion process in a slightly different way, resulting in varying quality in your video files. Your video may look great as an MP4, but when you view the OGG file in Firefox, your video looks grainy or bitmapped.
Further complicating this issue, each web browser also handles playback differently, which means the exact same video file will look great in one browser, but horrible in another. I spent countless hours experimenting with the settings in my conversion software, but I never got this dialed in 100%.
If you’re running a membership site with protected video content (like this site), you’ll want to ensure your video files can’t be downloaded by some nefarious individual and then redistributed illegally on file sharing sites.
I discovered this vulnerability the hard way, and spent the better part of a year sending DMCA takedown notices to file sharing sites, over and over again.
Because the video paths are easily exposed in the source code, anyone can simply copy the URLs, then download the videos to their own computer and redistribute at will. I found a script that obfuscated the video paths, but it wasn’t updated often, and eventually stopped working with my video player.
10. Loss of Visibility and Traffic
YouTube is the most popular video hosting platform in the world. More importantly, they’re also one of the first places many folks turn when they’re searching for a topic. When you host your video on a third-party site like YouTube or Vimeo, you also benefit from their popularity, and folks will find your video—and subsequently, your own site—who otherwise wouldn’t have known your site existed.
Plus, the social sharing features on those services encourage other folks to share your video with their friends and family, increasing your reach.
So what’s the best solution for adding video to your site?
Step One: Upload your video to one of the popular, well-established video hosting services like Vimeo PRO.
Step Two: Once your video has been uploaded and is ready for viewing, copy the URL to your video. Return to your WordPress site and paste the URL into your post or page where you want the video to appear.
When folks view your page, the video will appear in the location where you pasted the URL. But the video file itself will be streamed from the video host’s servers, as opposed to your own server, where your WordPress site is hosted.
The embedded video player will automatically detect the user’s device, browser, and Internet connection speed, and then serve the appropriate version of the video file to them. Nothing to install on your site. No plugins to keep up to date. No tricky code.
Video hosts also employ massive networks of redundant web servers all around the world. When you upload a video, it is automatically replicated on every server on their content delivery network (CDN), which means when a visitor to your site requests a video, it will be served from the node that is nearest to their location, ensuring smooth playback and an enjoyable viewing experience.
Your viewers will love you.
You’ll sleep better, knowing your video is being enjoyed the way you intended, no matter which device or browser your viewer chooses.
A Final Recommendation for Vimeo PRO.
If your videos are of a commercial nature, or if you want to protect your videos, making them available only to a select audience—like a membership site—you’ll want to check out Vimeo PRO.
Vimeo PRO is a completely different service than their standard, free offering. You’ll get priority uploading and conversion, unlimited bandwidth, advanced statistics on your videos, and much more.
These days, I export my final video file just one time as a 720p MP4 file (H.264 AAC format), with a streaming rate of at least 5,000 kbps… the ideal format for Vimeo. I upload it to Vimeo PRO, paste the URL into my WordPress post, and walk away.
They convert the video into all the formats necessary, and their HTML5 embedded player works great across all devices. Their CDN keeps up with streaming video even better than Amazon S3, and the videos look and sound as I intended in all instances.
For those of you who run membership sites, you’ll appreciate that you can choose to hide your videos from the public, and then specify a single domain (your own site) on which the videos can be embedded, which gives you an added level of protection against piracy.
Now, anytime someone asks me what service I recommend for video hosting, without hesitation I recommend Vimeo PRO.
Got a question about hosting video? Sound off in the comments below and I’ll do my best to answer.
Why we trust WP Engine to host this site…
Since we migrated this site to WP Engine over 18 months ago, we’ve served more than 1.2 million pages to 300,000 happy visitors.
Our page load times are 300% faster than on our previous hosting provider! Plus, we enjoy automated nightly backups, security monitoring, and automatic updates whenever WordPress releases a new version. But the best part? Their support team is stellar! It’s like having our own IT department on call 24/7.
Does your web host give you that kind of peace of mind?