Rails中的HTTP视频流3+ [英] HTTP Video Streaming in Rails 3+

查看:66
本文介绍了Rails中的HTTP视频流3+的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以下帮助:

好的情况是这样的:我正在与服务器联系,并且从服务器获取此URI:

Ok the scenario is this: I am contacting a server and from the server I am getting this URI:

http://<camera_ip_address>/<type_ID>/<part_ID>

此Web服务的文档说:

The documentation of this webservice says:

"The part_ID will vary from part_start and part_end."

我得到了所有需要的数据.现在我不明白的是这与HTTP视频流有何关系?

I got all the data needed. Now what I dont get is how this is related to HTTP video streaming?

如果我的part_start = 1和part_end = 10,那意味着我将下载" 10个帧? 如何?卷曲吗? wget?滑轨?

If I have part_start = 1 and part_end = 10, that means that I will "download" 10 frames? How? with curl? wget? Rails?

应该实现循环(例如):

Should a loop be implemented like (example):

for i=1; i<10 i++
   download "http://127.0.0.1/34/i"
end

例如"http://127.0.0.1/34/10"将是什么? png/jpeg框架文件? 任何帮助将非常有用.非常感谢.

What will "http://127.0.0.1/34/10" for example be? a png/jpeg frame file? Any help will be very useful. Thanks very much.

推荐答案

好吧,rails在这里并不重要.

well, rails isn't really relevant here.

看起来您只需要在此处使用一些Flash Player,其中最受欢迎的之一就是

It looks like you just need to utilize some flash player here, one of the most popular ones is jwplayer

请参阅"SWFOBJECT"部分.基本上,您必须执行以下操作:

See the SWFOBJECT section. basically, you have to do something like:

<script type="text/javascript">
  var flashvars = { file:'http://<camera_ip_address>/<type_ID>/',autostart:'true' };
  var params = { allowfullscreen:'true', allowscriptaccess:'always' };
  var attributes = { id:'player1', name:'player1' };

  swfobject.embedSWF('player.swf','container1','480','270','9.0.115','false',
    flashvars, params, attributes);
</script> 

这篇关于Rails中的HTTP视频流3+的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆