Video Killed the Internet*
Video sucks. Oh, sure, we've got HTML 5. We've got flash players. We've got it all, and it all sucks.
For the last week or so, I've been working on my primary risk: hosting, serving, and playing video. By my calculations, I'm serving 146 episodes (some bundled into chapters) at an average of 81MB each. Over the course of the series, I anticipate serving over 22 terabytes of video.
So video is my biggest risk. But not serving it, surprisingly... playing it.
Up until now, all my videos have been hosted on YouTube. I'm not a fan of YouTube. (Does "please die in a fire" count as "not a fan?" I dunno.) Music rights companies keep claiming that my voice on my video somehow violates their copyright. YouTube takes their bogus claims with the unquestioning acceptance of a small child. A small, deaf child. Who's been taught to take candy from strangers.
One of my videos is claimed by APM Music, with no opportunity for me to dispute the claim. It's clear that no human (or, at least, no honest human) was involved in the process. The video contains no music whatsoever.
So, yeah. Not a fan. But YouTube has one big thing going for it: they make hosting and playing videos really easy.
You'd think that, in the era of HTML 5, playing video would be simple. It's not. Here's what I want:
- One video format. Transcoding video takes time and disk space, and each additional format requires me to take the time to figure out encoding parameters that have the right balance between bit-rate and quality.
- Compatible with Firefox, Chrome, Safari, IE8, IE9, and iOS Safari. Android would be nice, too, but testing on that platform is ridonkulous and it accounts for less than 2% of my site visits.
- Quality look and feel.
- Full-screen support.
- Ability to start playing the video before it's fully loaded.
- Support for seeking, even to parts of the video that haven't been loaded yet.
- Video still looks good when scaled to less than 100%.
Individually, these requirements are reasonable. Obvious, even. Together, they sing the song that ends the earth.
I started out with the excellent VideoSWS site, which summarizes dozens of HTML 5 video players. "SWS" stands for "See What Sucks," and originally I thought that was just an amusing bit of hyperbole. Later I realized it's actually tastefully understated commentary.
VideoSWS has seven players starred as "sucks less." I tested each of them.
- Sublime didn't do fullscreen on IE8 or IE9.
- jMediaElement required me to use a right-click menu to get full-screen video.
- JWPlayer choked when repositioning on Firefox.
- MediaElement didn't perform well on iPad, and was flaky on IE8.
- Projekktor didn't work on Safari, even though it did work on Chrome.
- VideoJS was actually pretty awesome, but I've had some trouble with it in the past.
Eventually, I settled on MediaElement as the best of a bad lot, and started testing it with my own 26-minute video. That's when I realized I'd barely begun the pain.
I won't bore you with the details. Except this one, as a representative sample: to get video to play before it's fully loaded, the MOOV atom has to be moved to the front of the video using qt-faststart, which comes with ffmpeg, and on the Mac, you install ffmpeg using Homebrew, except you have to use the undocumented --with-tools command-line parameter to get qt-faststart as well. That bit of loveliness took me several hours to figure out.
In the end, I learned an important lesson. None of the HTML 5 video players I tried, not a one†, has cross-platform support for seeking to parts of a video that hasn't loaded yet. In Flash (required for IE8 support and Firefox MP4 support), you have to use something called pseudostreaming to get that ability. My awesome video host does support pseudostreaming, but the players' Flash fallbacks don't.
So it was back to the drawing board. FlowPlayer supports pseudostreaming, but only with a plugin, and it's Flash-based with an HTML 5 fallback that only engages on iOS. After much struggling, I got it to work, and now I've actually got video working on all platforms. It requires Flash to be installed (except on iOS), but at this point I'm throwing in the towel on HTML 5 video. I may revisit the video player quagmire in the future, but now that I've got something working and cross-platform, it's time to focus on my other biggest risks.
†Actually, in preparing this update, I took a second look and found that JWPlayer does support pseudostreaming after all, and I haven't been able to reproduce the "chokes on repositioning in Firefox" problem I saw the first time I tried it. And it works when Flash isn't installed, unlike FlowPlayer. So I might give it a try.
The one bright spot in all this has been SendFaster. Christopher at SendFaster is a backer, and he contacted me out of the blue asking if I needed geobalanced video hosting. I said, "why-yes-I-do." His company makes TCP acceleration and video streaming software and serves hundreds of thousands of video streams every day. His email couldn't have come at a better time, and SendFaster has been a pleasure to work with. We're getting a load test set up and I'll send out another update when it's ready for y'all to pound on.
At this point I'm showing about a 50/50 chance of hitting my July date. (I've got a Rabu chart up that shows my projections, if you're interested. That link doesn't work in IE.) That's not including web design, which is my new biggest risk. I've contacted several of the many great web designers who responded to my survey, and I'm hearing concerns about the short timeframe.
So I'm currently debating whether or not to go live with my own crappy design, then upgrading later, at the risk of making a poor first impression... or postponing the launch of the site until August and giving web design more time. I'm still waiting to hear from a few designers, so I'm going to make that decision at a later responsible moment.
Five Things I've Done Since the Last Update
- Arranged video hosting with SendFaster and set up a video testbed.
- Chose video player and tested it.
- Re-chose video player and tested it.
- Re-re-chose video player and finally got something working.
- Started bidding process with web designers. If you provided your portfolio on the survey, thank you! I reviewed every response and ultimately contacted five people. If I didn't contact you, it's because I had a surplus of good choices.
*Pronounce this update's title by singing. "Video killed the Internet star, video killed the Internet star..."