What Is A Streaming Media Protocol?and What Is The Difference?

choosing a streaming technology involves multiple considerations, including an understanding of the pluses and minuses of the streaming protocol used by the technology. this article defines a streaming protocol and then discusses the relative merits of the protocols used by today’s leading streaming technologies.

what's a communications protocol?

communications protocols are rules governing how data is communicated, defining elements like the syntax of file headers and data, authentication, and error handling. there are easily dozens of protocols involved in sending a simple data packet over the internet, and it’s important to understand how they work together.

briefly, the international organization for standardization (iso) created theopen systems interconnection model which defines seven logical layers for communications functions. all streaming protocols are in the application layer, which means they can use any layer beneath it for plumbing functions like transmitting data packets. this enables protocols within each layer to focus on a particular function, rather than having to recreate the entire stack of functions.

hopefully, this brief overview will help you understand where streaming protocols live and how they interact with other, lower level protcols. this is as technical as we get, folks, so from here on out it should be smooth sailing.

in the beginning there was http, and it was good

with this as background, let’s start examining the application-layer protocols used to stream video, starting with the granddaddy of them all, http. as you probably know, http stands for hypertext transfer protocol, which is the lingua franca for the web. http governs the communications between web servers and browsers and is the protocol used to distribute all the content on websites to remote viewers, including html text, gif and jpg graphics, pdf files and other web-based (as opposed toftp) downloads.

early experiments with delivering video via http were less than satisfactory for a number of reasons, not the least of which was the limited bandwidth available in the 28/56kbps modems of the day. the first video files posted on the web were delivered via download and play, which mean they had to be fully downloaded before playback began. then apple pioneered the concept of progressive download, where the video could start to play as it was downloaded, which helped a bit, but didn’t provide functionality like lookahead seeking or random access.

the other big negatives of http-delivered video were cost and quality of service issues. http delivery is accomplished as fast as available bandwidth will allow. if a viewer connected via a high-speed connection, the entire video file was sent as quickly as possible. if the viewer stopped watching after a few moments, much of that transfer was wasted.

in addition, this mode of delivery made it difficult to serve multiple viewers. when viewer a clicked on the video, the server started sending the video as quickly as possible. when viewers b, c, d, and e clicked on the video, outbound bandwidth might be insufficient to serve them any video until the transfer to viewer a was complete.

first was the existence of a streaming server, or a software program charged solely with delivering streaming content. these streaming servers worked in conjunction with traditional http servers so that when a viewer clicked a link on the http server, it initiated a connection between the streaming server and the player that persisted until the viewer stopped watching. because of this connection, these protocols are considered “stateful,” as compared to http, which is stateless and has no connection between server and player.

this connection addressed most of the negatives of http delivery. streaming protocols enabled seeking to random points in the video file, and adaptive streaming, where multiple encoded files could be distributed to the player based upon available bandwidth and cpu power. the server could meter out the flow of video to the player on a just in time basis, so if the viewer stopped watching, little extra bandwidth was wasted. because the outbound flow was metered, a streaming server could more effectively serve multiple users, improving overall quality of service.

http - back to the future

over time, as flash video rose to dominate the streaming video landscape, rtmp became the dominant streaming protocol, and is still widely used today. however, with the introduction of microsoft’s http-based smooth streaming and apple’s http live streaming (hls), http-based streaming technologies began a resurgence for multiple reasons, both having to do with perceived negatives of rtmp and innovations in http technologies that addressed many of its negatives.

perceived shortcomings in rtmp include:

rtmp packets may be blocked by certain firewalls, though the adobe media server has workarounds if these problems are experienced.

rtmp packets can’t leverage standard http caching mechanisms available within the networks of isps, corporations, and other organizations, which can improve distribution efficiency and quality of service.

the required server may also limit scalability as compared to http-based streaming, since there are many more http servers than rtmp.

rtmp is still used by sites likebloomberg and the street.com, which tends to cast doubt on the notion that rtmp can’t get through to heavily firewalled viewers. espn and mtv also use rtmp, which makes you question the scalability and cost issues.

these doubts aside, there’s a general perception among technical cognoscenti that http-based technologies are more effective at delivering high-quality streams. plus, adobe introduced http dynamic streaming (hds) in 2010, providing a flash-based alternative for those seeking http-based streaming to the desktop. all of a sudden, changing to http-based online video delivery no longer involved a seismic shift to a totally new technology; flash users could continue to leverage their investment in flash development and infrasture and leverage the benefits of httpstreaming.

as mentioned, several innovations in http streaming also addressed previous limits of the technology. as before, there is no persistent connection between the server and the player; the video resides on any http server and the technology remains stateless. however, now all http-based streams are broken into chunks, either separate files or segments within a larger file. rather than retrieving a single large file with a single request, http-based technologies retrieve consecutive short chunks on as needed basis.

this has multiple benefits. first, there’s little waste because the video is delivered as it is watched. this effectively meters out the video, enabling a single http server to efficiently serve more streams. seeking is no problem; if the viewer drags the playhead forward, the player can just retrieve the appropriate chunks. these technologies also enable the efficient switching between streams, so all the listed technologies (smooth streaming, hls, and hds) stream adaptively.

since these technologies are delivered via http, they sidestep the issues faced by rtmp. http-based technologies are firewall friendly and can leverage http caching mechanisms. because no streaming server is required, they are less expensive to implement and can scale more cheaply and effectively to serve available users.

final points

again, rtmp distribution is still widely and beneficially used by many websites today. however, while there may be little impetus for some sites to change, at this point if you’re considering a streaming technology, the overwhelming sentiment is to deliver via http. of course, for adaptive delivery to apple devices (and android 3.0 and higher), hls is your only option.

it’s also useful to recognize that most video content is delivered via plain old http progressive download. sure, there are limitations, like the lack of adaptive streaming, but you can’t say it’s worked out too badly for youtube, who delivers about 70% of video over the web, exclusively via progressive download. however, this approach prevents youtube from deploying the digital rights management (drm) techniques available via hds, smooth streaming, and hls to protect their videos, which is a key reason sites with branded content use these technologies.

finally, the focus of this article has been general internet streaming. particularly for intranet use, streaming-server-based protocols like ip multicast and applications like peer-to-peer delivery provide lots of value and even more promise. so don’t throw out the baby with the bathwater; streaming servers aren’t “bad” and http isn't "good." rather, choose the best tool for the job.