How do I transfer real-time data in HTTP Streaming Protocol.

As I know, streaming is action that transfer of real-time data. And UDP is usually used for transfer of real-time data as RTP (Real-time transfer protocol). While HTTP Streaming used TCP, so how do it ensure real-time ?

asked Aug 9, 2011 at 10:51 1 1 1 silver badge 1 1 bronze badge

Define what you mean by real-time , describe the data you want to transfer and in what way it is time-sensitive.

Commented Aug 9, 2011 at 10:56

2 Answers 2

For streaming using input buffers on the client, imagine a flash video player (like youtube's one).. a part of the content is buffered first on the client and then begins to play; if the buffer runs out of information you have to stop to refill the buffer and resume playing.

You can use TCP for low bandwith consumption apps in real time, such as chats; but when you need a lot of bandwith it's not the best suited protocol, you should use UDP because it isn't connection oriented (for example VoD or Cable TV).

Hope this helps.

answered Aug 9, 2011 at 11:01 Packet Tracer Packet Tracer 3,904 4 4 gold badges 27 27 silver badges 37 37 bronze badges

I disagree. Your distinction regarding bandwidth is inaccurate. Just because you want to transfer a lot of data, doesn't mean you pick UDP. It really depends on the application and it's requirements for and/or the consequences of latency, jitter, out-of-order reception and packet loss.

Commented Aug 9, 2011 at 11:23

@MattH: So, can you show me some ways to ensure real-time in HTTP Streaming protocol. Because I must build a streaming video server in Windows Media Http Streaming protocol and i must solve this solution.

Commented Aug 9, 2011 at 11:50

I agree with you matth, everything depends on the QoS you need. A chat is a real time app but does not influence jitter, a small latency. The question should define what he means with real time and what kind of streaming. What i intended to say is that if your application don't have to guarantee a QoS you can use TCP.

Commented Aug 9, 2011 at 11:54 @Feida Kila : As i said, i want to streaming video in Windows Media Http Streaming Protocol. Commented Aug 9, 2011 at 11:56

you cannot stream video in real-time over tcp with a QoS. you need to use big buffers. so it's not real-time really.

Commented Aug 9, 2011 at 11:57

in the manual you got all the requests and responses, for example play

The following example shows a Play request.

GET /welcome HTTP/1.1 Accept: */* User-Agent: NSPlayer/12.0.7724.0 Host: SampleServer X-Accept-Authentication: Negotiate, NTLM, Digest, Basic Pragma: version11-enabled=1 Pragma: no-cache,rate=1.000,stream-time=0,stream-offset=4294967295:4294967295,packet-num=4294967295,max-duration=0 Pragma: xPlayStrm=1 Pragma: client-id=2338761264 Pragma: LinkBW=2147483647, AccelBW=2147483647, AccelDuration=18000, Speed=91268.055 Supported: com.microsoft.wm.srvppair, com.microsoft.wm.sswitch, com.microsoft.wm.startupprofile Pragma: playlist-seek-id=64 Pragma: xClientGUID= Pragma: stream-switch-count=2 Pragma: stream-switch-entry=ffff:1:0 ffff:2:0 Accept-Language: en-us, *;q=0.1 

The following example shows a Play response.

HTTP/1.1 200 OK Content-Type: application/x-mms-framed Server: Servername1/9.5.6001.18281 Date: Mon, 08 Mar 2010 18:39:44 GMT Pragma: no-cache, client-id=2338761264, features="", timeout=60000, AccelBW=3500000, AccelDuration=18000, Speed=5.000 Cache-Control: no-cache, x-wms-content-size=51077, max-age=86399, user-public, must-revalidate, proxy-public, proxy-revalidate Last-Modified: Tue, 22 Jan 2008 22:54:31 GMT Etag: "51077" Transfer-Encoding: chunked X-StartupProfile: Rate=10,12,15,20,30;MaxBytes=459,459,459,459,459;Time=0,0,0,0,0;StartTime=3290;LastTime=15120;MaxDiffTime=0;MaxDiffSndTime=0;ByteRate=2538,2538,2538,2538,2538; Supported: com.microsoft.wm.srvppair, com.microsoft.wm.sswitch, com.microsoft.wm.predstrm, com.microsoft.wm.fastcache, com.microsoft.wm.startupprofile