Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browser Based Streaming Video/Audio (not progressive download)

I am trying to understand conceptually the best way to deliver real streaming audio and video content. I would want it to be consumed with a web browser, utilizing the least amount of proprietary technology. I wouldn't be serving static files and using progressive download, this would be real audio streams being captured live. How does one broadcast a stream that will be reasonably in sync with the source? What kind of protocol is suitable?

Edit:

In research I've found that there are a few protocols: RTSP, HTTP Streaming, RTMP, and RTP.

HTTP streaming is somewhat unsuitable if you are streaming a live performance/communication of some kind because it relies on TCP (as its HTTP based) and you don't lose packets. In a low bandwidth situation, the client can get significantly behind in playback. ref

RTMP is a proprietary technology, requiring flash media server. Crap on that. The reason I looked at flash is because they are extremely flexible as far as user experience goes. SoundManager2 provides an excellent javascript interface for playing media with flash. This is what I would look for in a client application.

RTSP/RTP is what Microsoft switched to using, deprecating their MMS protocol. RTSP is the control protocol. Its similar to HTTP with a few distinct difference -- server can also talk to the client, and there are additional commands, like PAUSE. Its also a stateful protocol, which is maintained with a session id. RTP is the protocol for delivering the payload (encoded audio or video). There are a few open sourced projects, one of them being supported by apple here. It seems like this might do what I want it to, and it looks like quite a few players support it. It sounds like it would be suitable for a "live" broadcast from this page here.

Thanks, Josh

like image 204
Josh Avatar asked Sep 15 '09 03:09

Josh


1 Answers

First, let me knock off two incorrect points quickly. Details to follow below:

  • RTMP can be done over other servers than Flash Media Server
  • TCP is fine for live. There is too much F.U.D. from the UDP-loving folks out there. Apple has just released a draft specification of doing simple, live streaming over HTTP (and hence TCP) for the iPhone. I expect it'll end up in browsers too. Also, TCP has the bonus of getting through corporate firewalls much more frequently and easily.

My read is that complex and UDP-based streaming is tapering off. I'm not forecasting death, just a lesser and lesser share of the market. UDP-based streaming servers consume huge resources, relative to TCP-based solutions (like 10x or more), and the benefits just aren't that tangible.

You say you don't want proprietary technology, and "crap on [Flash]", but you still want to do Real streaming? Hate to break it to you, but both RealAudio and RealVideo are both proprietary.

If going Open Source really is that important to you, which I can understand, then you'll need to ignore the vast majority of the streaming media market. Have a look at

  • Theora: a royalty-free, open standard, lossy video compression technology
  • Vorbis: a free software / open source project that produces an audio format specification and software implementation for lossy audio compression.
  • Ogg: a free, open standard container format

If pragmatism gets the best of you, then reconsider your aversion to Adobe products. Remember, Flash is more widely distributed than any other browser-based player (namely Windows Media Player, Quick Time and Real Players.)

You can still use RTMP with open source: Red5 is probably of greatest interest--it can stream live to Flash-enabled browsers.

I would recommend thinking about your priorities. Spell them out for us in your question.

like image 114
Stu Thompson Avatar answered Sep 30 '22 00:09

Stu Thompson