A media server delivers video and audio content to clients who request it. The term is used to refer both to a software application that performs this function and a host that’s running the media server software.
The most common use of media servers is probably to deliver video on demand (VOD), in which the media server retrieves prerecorded video content from storage and delivers it across the Internet. In the simplest case, the video file is embedded in a web page and stored on the same host as the other components of the page. But perhaps the most common use case for VOD is subscription services like Netflix, Amazon, and Hulu, where media servers located all over the world deliver video to millions of customers from content delivery networks (CDNs). As discussed further below, there are several techniques for VOD, and a media server needs to support some or all of them depending on the kinds of video players it supports.
Live streaming is another increasingly popular use of media-streaming servers. In this case, the media server delivers content as it is generated in real time (or with only a slight delay). Pay-per-view sporting events are examples of live streaming. In contrast to VOD, with live streaming the content provider determines when users view the video (as with broadcast television). Live streams can also be recorded for later access as VOD.
Supporting Multiple VOD Techniques
Techniques for delivering video vary quite a bit in the amount of control the player has over playback. They’re listed here in order of increasing sophistication:
- File download – The video is in a single file, and viewing cannot begin until the entire file has downloaded from the media server to the player.
- Progressive download – The video is in a single file, but metadata at the beginning of the file enables playback to begin as soon as the metadata and a small amount of video data have been downloaded. Download continues in the background as the video plays.
- Pseudo-streaming – The player buffers and plays the video data instead of downloading it to storage. It can specify the start and end time for the portion of the video it is requesting, and the media server (now often called a streaming media server) retrieves and delivers (“streams”) the corresponding part of the media file. This enables the user to fast-forward/reverse or even skip around in the video as it streams. Flash and MP4 are popular formats for pseudo-streaming.
- Adaptive bitrate streaming – The media file is segmented into many small files and a playlist is created as a table of contents for the segments, making it even easier for users to skip around in the video. Additionally, the content provider can create several versions of the video encoded at different bitrates to provide different levels of sound and picture quality. By requesting segments encoded at the appropriate bitrate, the player can switch seamlessly between versions in reaction to changing network conditions. Popular encodings for adaptive bitrate streaming include HTTP Live Streaming (HLS) from Apple and HTTP Dynamic Streaming (HDS) from Adobe.
How Can NGINX Plus Help?
NGINX Plus and NGINX are the best-in-class media server solutions used by high-traffic websites such as Dropbox, Netflix, and Zynga. More than 400 million websites worldwide rely on NGINX Plus and NGINX Open Source to deliver their content quickly, reliably, and securely.
NGINX Plus supports all of the techniques, formats, and encodings described in this article, including Flash, MP4, HLS, and HDS for VOD. For HLS, it can even create the segments and the playlist dynamically if they don’t already exist. For live streaming, NGINX Plus supports Adobe’s Real Time Messaging Protocol (RTMP), HLS, and Dynamic Adaptive Streaming over HTTP (DASH).
Unlike some other media servers that specifically target and limit themselves to media delivery, NGINX Plus is a comprehensive application delivery platform that provides reverse proxying, advanced load balancing, caching, and web serving along with features specifically designed for streaming media.
For a complete discussion of the media-streaming capabilities of NGINX Plus (and how to configure them), check out our whitepaper, Serving Media with NGINX Plus.