简体   繁体   English

如何使用Java / Spring将视频流式传输到浏览器?

[英]How can I stream video to a browser using Java/Spring?

We a have jboss server running and have a basic web setup using Spring but now I would like to stream video into the browser. 我们运行jboss服务器,并使用Spring进行基本的Web设置,但现在我想将视频流式传输到浏览器中。 I am trying to use xuggle but then I read on their website that you can't put it into an Applet or use it with java webstart, so I'm assuming that means I can stream to a browser, is this assumption correct? 我正在尝试使用xuggle,但后来我在他们的网站上读到你不能把它放到Applet中或者用java webstart,所以我假设这意味着我可以流式传输到浏览器,这个假设是否正确? If so does anyone else know any libraries or how I should go about doing this? 如果有的话,其他人是否知道任何图书馆或我应该如何做到这一点? If you need any more info or have questions I'll be happy to answer although I'm very new to streaming video and relatively knew to Spring. 如果您需要更多信息或有疑问我会很乐意回答,虽然我对流媒体视频非常陌生并且相对知道Spring。

UPDATE: So I'm able to generate a video using xuggle, and then I can embed that video in my html code... but I can't generate and stream at the same time. 更新:所以我能够使用xuggle生成视频,然后我可以将该视频嵌入到我的html代码中......但我无法同时生成和流式传输。 Does anyone have any ideas how to make xuggle push date out to my tomcat server? 有没有人有任何想法如何使xuggle推送日期到我的tomcat服务器?

您可能想要查看Red5媒体服务器。

Since you are doing jsp, just have your code write out the HTML 5 video element . 由于您正在使用jsp,只需让您的代码写出HTML 5视频元素即可 That will provide basic video functionality. 这将提供基本的视频功能。 This will work in all HTML 5 compliant browsers as well as all mobile devices. 这适用于所有符合HTML 5标准的浏览器以及所有移动设备。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM