简体   繁体   English

在哪里可以找到有关 WebM 直播 http 流媒体的信息?

[英]Where can I find information on the WebM live http streaming?

I am doing some research on the video playback features provided by HTML5.我正在研究 HTML5 提供的视频播放功能。 I just found that recent versions of Google Chrome and Firefox support playback of WebM encoded live video streams via HTTP with the tag.我刚刚发现 Google Chrome 和 Firefox 的最新版本支持通过带有标签的 HTTP 播放 WebM 编码的实时视频流。

I could not find information anywhere on how this is actually implemented.我无法在任何地方找到有关如何实际实施的信息。 There are plenty of links to be found on the Apple HTTP Live Streaming protocol, but not much on WebM streaming.在 Apple HTTP Live Streaming 协议上有很多链接,但在 WebM 流媒体上却不多。

Any useful link would be greatly appreciated.任何有用的链接将不胜感激。

Here is how I did it in Ubuntu:这是我在 Ubuntu 中的做法:

First, build ffmpeg from source to include the libvpx drivers (even if your using a version that has it, you need the newest ones (as of this month) to stream webm because they just did add the functionality to include global headers).首先,从源代码构建 ffmpeg 以包含 libvpx 驱动程序(即使您使用具有它的版本,您也需要最新的(截至本月)到 stream webm,因为它们只是添加了包含全局标头的功能)。 I did this on an Ubuntu server and desktop, and this guide showed me how - instructions for other OSes can be found here .我在 Ubuntu 服务器和桌面上执行此操作,本指南向我展示了如何 -可以在此处找到其他操作系统的说明。

Once you've gotten the appropriate version of ffmpeg/ffserver you can set them up for streaming, in my case this was done as follows.一旦你获得了适当版本的 ffmpeg/ffserver,你就可以将它们设置为流式传输,在我的例子中,这是按如下方式完成的。

On the video capture device:在视频捕获设备上:

ffmpeg -f video4linux2 -standard ntsc -i /dev/video0 http://<server_ip>:8090/0.ffm
  • The "-f video4linux2 -standard ntsc -i /dev/video0" portion of that may change depending on your input source (mine is for a video capture card).其中的“-f video4linux2 -standard ntsc -i /dev/video0”部分可能会根据您的输入源而改变(我的是用于视频采集卡)。

Relevant ffserver.conf excerpt:相关 ffserver.conf 摘录:

Port 8090
#BindAddress <server_ip>
MaxHTTPConnections 2000
MAXClients 100
MaxBandwidth 1000000
CustomLog /var/log/ffserver
NoDaemon

<Feed 0.ffm>
File /tmp/0.ffm
FileMaxSize 5M
ACL allow <feeder_ip>
</Feed>
<Feed 0_webm.ffm>
File /tmp/0_webm.ffm
FileMaxSize 5M
ACL allow localhost
</Feed>

<Stream 0.mpg>
Feed 0.ffm
Format mpeg1video
NoAudio
VideoFrameRate 25
VideoBitRate 256
VideoSize cif
VideoBufferSize 40
VideoGopSize 12
</Stream>
<Stream 0.webm>
Feed 0_webm.ffm
Format webm
NoAudio
VideoCodec libvpx
VideoSize 320x240
VideoFrameRate 24
AVOptionVideo flags +global_header
AVOptionVideo cpu-used 0
AVOptionVideo qmin 1
AVOptionVideo qmax 31
AVOptionVideo quality good
PreRoll 0
StartSendOnKey
VideoBitRate 500K
</Stream>

<Stream index.html>
Format status
ACL allow <client_low_ip> <client_high_ip>
</Stream>
  • Note this is configured for a server at feeder_ip to execute the aforementioned ffmpeg command, and for the server at server_ip so server to client_low_ip through client_high_ip while handling the mpeg to webm conversation on server_ip (continued below).请注意,这是为 feeder_ip 上的服务器配置的,以执行上述 ffmpeg 命令,并为 server_ip 上的服务器配置,以便在处理 server_ip 上的 mpeg 到 webm 对话时通过 client_high_ip 服务器到 client_low_ip(下文继续)。

This ffmpeg command is executed on the machine previously referred to as server_ip (it handles the actual mpeg --> webm conversion and feeds it back into the ffserver on a different feed):这个 ffmpeg 命令在以前称为 server_ip 的机器上执行(它处理实际的 mpeg --> webm 转换并将其反馈到不同源的 ffserver 中):

ffmpeg -i http://<server_ip>:8090/0.mpg -vcodec libvpx http://localhost:8090/0_webm.ffm

Once these have all been started up (first the ffserver, then the feeder_ip ffmpeg process then then the server_ip ffmpeg process) you should be able to access the live stream at http://<server_ip>:8090/0.webm and check the status at http://<server_ip>:8090/ Once these have all been started up (first the ffserver, then the feeder_ip ffmpeg process then then the server_ip ffmpeg process) you should be able to access the live stream at http://<server_ip>:8090/0.webm and check the http://<server_ip>:8090/的状态

Hope this helps.希望这可以帮助。

Basically you need a server that can stream WebM for you.基本上,您需要一台可以为您提供 stream WebM 的服务器。

Wowza and Flumotion are some examples. WowzaFlumotion就是一些例子。

You can read a discussion about it here您可以在此处阅读有关它的讨论

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

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