Serving user uploaded video
I am currently implementing a video upload service on a website. Video is not the primary function of the website but the users will upload a fair amount. The "problem" is that users are uploading all kinds of formats to the server and Flowplayer which I'm using naturally can't handle all of them. Currently I'm recoding the video on upload in a background task to h264 which plays fine. When someone uploads the server slows down noticeably even if I set the "nice" level to 10 in this case.
My real question is, what would be the best way of 开发者_C百科serving video content on a relatively busy website (60k unique/month)?
Ideas I have right now:
- Continue like I do now, but add a dedicated server for the encoding (zencoder?)
- Only upload the content and serve the content as a sort of h264 stream (rtmp?).
Server info: nginx + rails 2.2.2.
Video transcoding and delivery is one of those things which it is quite easy to get to a 70-80% right level.
It is the last 10-20% which is a killer.
If you have a site which is generating 60K uniques a month and video is going to be a big part of your user experience and business, I would strongly recommend that you look at replacing your homegrown solution with a commercial video platform.
Acknowledging my bias here - I work for Ooyala - I honestly believe that this is something that the average web master does not want to tackle on their own. The number of issues to be addressed and corner cases that exist is mind boggling.
In addition, if you want to look at monetizing this content, you are going to be better able to do that with the facilities available in a commercial platform.
Of course, I think Ooyala is a great choice (heck the best choice), wouldn't be working here otherwise, but their are a number of options out there.
What you will want to look for are:
- Ability to upload UGC (User Generated Content)
- Flexible and robust transcoding
- Content management
- Analytics
- Ad Network Integration
- APIs for customization and integration both for the player and the backend
- Availability and reliability
精彩评论