Proper way to stream live video feed from java servlet via ajax request

雨燕双飞 提交于 2020-01-03 07:01:08

问题


Im currently creating a custom surveillance application. And i was curious is it possible to take the live stream and and redirect it to a webpage via an ajax request. If so whats an example of how the ajax request would look. I'm working on the video feed aspect with java and was planning on using a servlet to push video feed to a request by the user whos on the appropriate webpage.


回答1:


Only by using ajax + servlet you can not do that, but you need to have a media streaming server to generate the streaming and you can use servlet (and ajax) to redirect it to the custom page.

one good open source media streaming server I can suggest is the Red5 server developed with Java. They have a special module called red5-web which you can simply used for your requirement with a few configurations. It uses RTP/RTMP protocols to do that.

refer HERE for nice tutorial.

And also you can refer to HTTP streaming also using VLCJ. A very good example can be found HERE

I hope you can get a help through those links.



来源:https://stackoverflow.com/questions/30509940/proper-way-to-stream-live-video-feed-from-java-servlet-via-ajax-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!