开发者

Force Quality for YouTube (or other) Video

Being new to streaming videos:

  1. I don't know how to properly ask the question
  2. I don't know of the proper place to ask the question
  3. I'll use YouTube as the base example

Let's say I render a video in high quality and I want to play it on my website with the embedded YouTube player (or jw). The video is hosted from my server, not YouTube.

Is there a way to force one set of users to see low quality vid and one set of users to have the option of seeing it in high quality (b/c of connection speeds they may not want 开发者_如何学JAVAhq)? I'm hoping to run a forum and the quality of the video would be a benefit to contributors or registered members.

I'd like to know how to do this server-side. I know the YouTube player has a quality param, but I'd like to be able to force the quality. If a scripting language is needed, I'm using Perl, but I'm open to a PHP alternative.

One other question that ties into this: if you have a video in hq, is it possible to play that in low quality, or would I have to render different versions of the same vid?

Thank you in advance.


Well, if you are hosting it yourself, the youtube player seems to be out of question, doesn't it?

To achieve what you are planning, the player plugin you are using has to support multiple qualities. Now, when generating the player embedding code in php, check if the current visitor is a user, if yes, supply the player with all video qualities, if not, just with the lowest one.

To display different qualities, you'd have to seperately render the videos.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜