簡體   English   中英

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

[英]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
  • 其中的“-f video4linux2 -standard ntsc -i /dev/video0”部分可能會根據您的輸入源而改變(我的是用於視頻采集卡)。

相關 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>
  • 請注意,這是為 feeder_ip 上的服務器配置的,以執行上述 ffmpeg 命令,並為 server_ip 上的服務器配置,以便在處理 server_ip 上的 mpeg 到 webm 對話時通過 client_high_ip 服務器到 client_low_ip(下文繼續)。

這個 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/的狀態

希望這可以幫助。

基本上,您需要一台可以為您提供 stream WebM 的服務器。

WowzaFlumotion就是一些例子。

您可以在此處閱讀有關它的討論

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM