[英]Where can I find information on the WebM live http streaming?
我正在研究 HTML5 提供的视频播放功能。 我刚刚发现 Google Chrome 和 Firefox 的最新版本支持通过带有标签的 HTTP 播放 WebM 编码的实时视频流。
我无法在任何地方找到有关如何实际实施的信息。 在 Apple HTTP Live Streaming 协议上有很多链接,但在 WebM 流媒体上却不多。
任何有用的链接将不胜感激。
这是我在 Ubuntu 中的做法:
首先,从源代码构建 ffmpeg 以包含 libvpx 驱动程序(即使您使用具有它的版本,您也需要最新的(截至本月)到 stream webm,因为它们只是添加了包含全局标头的功能)。 我在 Ubuntu 服务器和桌面上执行此操作,本指南向我展示了如何 -可以在此处找到其他操作系统的说明。
一旦你获得了适当版本的 ffmpeg/ffserver,你就可以将它们设置为流式传输,在我的例子中,这是按如下方式完成的。
在视频捕获设备上:
ffmpeg -f video4linux2 -standard ntsc -i /dev/video0 http://<server_ip>:8090/0.ffm
相关 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>
这个 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 http://<server_ip>:8090/
的状态
希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.