News for hackers. Stuff that matters.

Ask HN: Videos on my website, youtube or selfhosted?

Hey guys, I'm having quite a dilemma right now. Recently I made a video showing a piece of software from my startup. I put it up on youtube and embedded the link from the front page of the website. But it is slow. Really slow. The video alone increases page render time by over 2 seconds. Besides, I'm not in control of what ads or suggestions youtube shows after the video. Is it worth it to convert and encode the video to HTML5 formats and a flash fallback myself? Is that too much work and should I just accept the problems I'm having right now? What would you do? Any advice on this? Hosting space or bandwidth isn't quite an issue (yet).
( 21 comments | 9 points | on HN )
Re:Ask HN: Videos on my website, youtube or selfhosted? by MattBearman on Wednesday December 18, 2013 @05:12AM (#6926785)
I had the same problem with the YouTube video on BugMuncher's homepage. My solution was to just put an image in place of the video and use JavaScript to embed the video when the image is clicked - you can see it in action here http://bugmuncher.com
Re:Ask HN: Videos on my website, youtube or selfhosted? by superice on Wednesday December 18, 2013 @03:04PM (#6930233)
That's absolutely awesome. A simple and pretty elegant solution. Your non-javascript fallback is just going to youtube.com?
Re:Ask HN: Videos on my website, youtube or selfhosted? by MattBearman on Thursday December 19, 2013 @04:25AM (#6933643)
Thanks. You are correct, the non-JavaScript fall back is just a link to the video on youtube. As well as being faster than putting the video straight into the page, I also think it looks better this way.

If you're interested, the JavaScript to do this is in this file - http://bugmuncher.com/assets/js/common.js - which reminds me, I really should minify that.

Re:Ask HN: Videos on my website, youtube or selfhosted? by thenomad on Wednesday December 18, 2013 @06:26AM (#6926993)
Self-hosting video in the modern day is an absolute bloody nightmare. Don't do it unless you have no other choice.

You may, however, want to investigate one of the other video hosting options out there who focus on business use. I've had some conversations with Wistia recently, and whilst they're wildly inappropriate for my use case, in general they seem quite impressive. Other options I'm aware of include Brightcove or hosting your video with a CDN.

Re:Ask HN: Videos on my website, youtube or selfhosted? by zaroth on Wednesday December 18, 2013 @02:51AM (#6926366)
Seems like a good idea for a startup. Product: self-hosted video. Which ultimately could take you in so many different directions, so many different market opportunities there.

Which means, someone has already thought of this and is trying to provide this service. So 'superice' you want to see what's out there and report back?

Re:Ask HN: Videos on my website, youtube or selfhosted? by superice on Wednesday December 18, 2013 @03:20AM (#6926446)
I poked around for a bit, but I can't find what you mean. However, I did find an awful lot of websites that discourage self hosting video's :P

Seems like a great idea for a startup indeed: submit your video and in a few minutes, you get an e-mail with a link pointing to a zip with an example html file, 3 different HTML5 supported video formats and a flv file.

Re:Ask HN: Videos on my website, youtube or selfhosted? by zaroth on Tuesday December 24, 2013 @12:02AM (#6958305)
Just saw a post in /new from Mediacrush

https://blog.mediacru.sh/2013/12/23/The-right-way-to-encode-...

Their code is open-source now all we need is a Docker image for it :-)

Re:Ask HN: Videos on my website, youtube or selfhosted? by yen223 on Wednesday December 18, 2013 @05:28AM (#6926841)
Youtube or Vimeo, unless videos are your product.

Video streaming is a major pain point that should be outsourced if possible.

Re:Ask HN: Videos on my website, youtube or selfhosted? by fbm on Thursday December 19, 2013 @02:07AM (#6933319)
Youtube won't show suggestions after playing the video if you append ?rel=0 at the end of the URL (the iframe src). Here you have all the parameters you can use: https://developers.google.com/youtube/player_parameters
Re:Ask HN: Videos on my website, youtube or selfhosted? by superice on Thursday December 19, 2013 @02:14AM (#6933332)
Thanks! I didn't know that, but that really comes in handy :)
Re:Ask HN: Videos on my website, youtube or selfhosted? by zaroth on Wednesday December 18, 2013 @02:45AM (#6926356)
HTTP hosting has progressed so far - look at Web Platform Benchmarks as the perfect example. The situation for self-hosting video seems remarkably stark.

I would love for someone to chime in here on what options to consider for self-hosting video at low-cost/high-scale.

Re:Ask HN: Videos on my website, youtube or selfhosted? by superice on Wednesday December 18, 2013 @03:10AM (#6926417)
The biggest tradeoff here is my time vs my visitors time. I could ofcourse just convert all video's myself, but every video again that takes a sh*tload of time, whereas youtube (or other video websites) are relatively simple to use and not very time intensive, but have a dramatic effect on my pageload time.
Re:Ask HN: Videos on my website, youtube or selfhosted? by lauriswtf on Wednesday December 18, 2013 @02:39AM (#6926338)
Have you tried vimeo? IMO it has better quality and has a pro subscription if needed.
Re:Ask HN: Videos on my website, youtube or selfhosted? by superice on Wednesday December 18, 2013 @03:06AM (#6926406)
Will look into it, seems like a great website. Thanks!
Re:Ask HN: Videos on my website, youtube or selfhosted? by slugslog on Wednesday December 18, 2013 @03:31AM (#6926469)
Re:Ask HN: Videos on my website, youtube or selfhosted? by superice on Wednesday December 18, 2013 @03:36AM (#6926479)
Absolutely interesting! Do you happen to know how page load time is affected by those services?
Re:Ask HN: Videos on my website, youtube or selfhosted? by jason_slack on Thursday December 26, 2013 @06:41PM (#6968664)
I use video.js and host them myself, HTML5, no plug-ins, works on all devices. I host a very video intensive site that attracts a lot of visitors each day.
Re:Ask HN: Videos on my website, youtube or selfhosted? by justhw on Wednesday December 18, 2013 @03:55AM (#6926524)
I'd stick with YouTube and customize it using their parameters. Youtube has a CDN and also detect browsers and servers html5 or flash.
Re:Ask HN: Videos on my website, youtube or selfhosted? by jamesjguthrie on Wednesday December 18, 2013 @11:31AM (#6928472)
Don't try to 'reinvent the wheel' just put it on YouTube or similar.
Re:Ask HN: Videos on my website, youtube or selfhosted? by Irishsteve on Wednesday December 18, 2013 @05:26AM (#6926835)
Vimeo is the way to go.
Re:Ask HN: Videos on my website, youtube or selfhosted? by OafTobark on Wednesday December 18, 2013 @03:28AM (#6926463)
Check out Wistia