开发者

What type of streaming protocols and sockets to use for live video streaming

开发者 https://www.devze.com 2023-04-05 04:10 出处:网络
I am a building a video server written in C++ to stream live video to a web video client written in php and html to implement video chatting.

I am a building a video server written in C++ to stream live video to a web video client written in php and html to implement video chatting.

What type of protocols eg. "UDP,TCP, RTP, RTSP, MMS, blocking, non-blocking" should i use to stream the live and constantly changing video to to my web client.

I have tried to stream video using non-blocking socket using TCP protocol but the video stops after playing the first clip streamed, it does not continue to play the clips proceedingly streamed.

An example i know is using Windows Media Encoder to stream the content from your webcam and access it using your browser with just a simple embed tag like this:

<object ID="MediaPlayer" WID开发者_JS百科TH="320" HEIGHT="240" CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
<param name="autoStart" value="True">
<param name="filename" value="http://127.0.0.1:8888">
<param NAME="ShowControls" VALUE="False">
<param NAME="ShowStatusBar" VALUE="False">
<embed TYPE="application/x-mplayer2" SRC="http://127.0.0.1:8888" NAME="MediaPlayer" WIDTH="320" HEIGHT="240" autostart="1" showcontrols="0"></embed></object>

I also like to know what type of streaming protocol does Windows Media Encoder use to achieve this ?


There are protocols dedicated to video streaming.... You should read about RTP and HTTP Live Streaming to begin with.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号