简体   繁体   English

实时视频流转换

[英]Live video Streaming Conversion

I am able to show the live streaming from my ip camera through jframe and applet, I need to convert this mpg stream to mp4 format so that i can show this in html5 video tag..Can anybody suggest how to do that and video should be still live without any time lag....One more thing to view streaming I am hitting the public ip of camera and this is how I am capturing video, is there any effect on the efficiency if large number of people are watching the video at the same time.. Please suggest...thanks in advance I am able to show the live streaming from my ip camera through jframe and applet, I need to convert this mpg stream to mp4 format so that i can show this in html5 video tag..Can anybody suggest how to do that and video should be仍然没有任何时间延迟......观看流媒体的另一件事我正在公开ip相机,这就是我捕捉视频的方式,如果有很多人在观看视频,是否会对效率产生影响同时..请建议...提前谢谢

First, know that you can't do live streaming with regular MP4 video format. 首先,要知道您无法使用常规MP4视频格式进行实时流式传输。 "Progressive download" MP4 files have an index at the beginning of the file, this cannot be written before you finished encoding the entire movie. “渐进式下载” MP4文件在文件的开头有一个索引,在完成对整个影片的编码之前,无法将其写入。 There is a variant of MP4 which indexes every small chunk of video separately, but it is not widely supported by HTML5 browsers. MP4有一个变体,可以分别索引视频的每个小片段,但是HTML5浏览器并未广泛支持它。

I can suggest several options: 我可以提出几种选择:

  1. Use FLASH rather than HTML5 and convert the video to FLV. 使用FLASH而不是HTML5,然后将视频转换为FLV。 However, I'm not aware of a Java tool to do this conversion. 但是,我不知道执行此转换的Java工具。
  2. Use HTTP live streaming and set up a dedicated streaming server to do the transcoding. 使用HTTP实时流传输并设置专用的流传输服务器来进行转码。 There is plenty of server software that can do that, such as Wowza server, Adobe FMS, and even Microsoft's Expression Encoder+IIS. 有很多服务器软件可以做到这一点,例如Wowza服务器,Adobe FMS,甚至是Microsoft的Expression Encoder + IIS。 You can also find SaaS solutions for that and EC2 images of such servers. 您也可以找到用于该服务器的SaaS解决方案以及此类服务器的EC2映像。

You can use the Robot class to take a screenshot of your applet, but it's just one approach.您可以使用机器人 class 为您的小程序截屏,但这只是一种方法。 Next, it imports the jCodec library that allows handling certain types of video and streaming formats.接下来,它导入允许处理某些类型的视频和流格式的 jCodec 库。

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

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