Live Video Streaming: How It WorksDecember 5, 2018
Let’s talk about the process of live video streaming. It starts at the camera. Today’s cameras are digital and can capture images at a stunning 4K resolution (2160p). This resolution requires a very high bitrate to support the “raw” digital video signal coming out of the camera, so cables used to transfer this signal must be able to handle large amounts of data. HDMI or ethernet cables can be used in some cases. But most often, a 4K signal transferred over long distances requires an SDI cable that can manage the bandwidth requirements.
Some live streaming is done with a smartphone, but more serious live productions employ additional cameras. Common live productions often use a three-camera studio setup. These cameras, and other video sources, are connected to a switcher that transitions between them. Audio for a production is transferred to a mixer via XLR cables. Generally, the switcher adds the audio from the mixer into the final output signal. It may also include the ability to add graphics, titles, and even animations. The switcher could be hardware, software, or a little of both when capture cards are required.
Encoding Live Videos into a Streamable File Format
For the final output signal to be stored or streamed, the video signal needs to be compressed through an encoder into a codec. Codecs come in all shapes and sizes. A standard in the industry is H.264, which is often used for broadcasting and distribution. H.264 compresses the video to be easily streamed, which means compressing gigabytes to megabytes.
The encoder itself might be built into the camera, but it can also be a stand-alone appliance, computer software, or mobile app. In many cases it’s built into modern broadcast software.
Once the video stream is compressed through the encoder, the video data still needs to be packaged into a real-time transfer protocol (RTP) for delivery across the internet. As a large stream of continuous data, it needs to be broken up into digestible chunks, or information packets. These packets will later be recombined and decoded into a continuous signal by the media player. Many encoders use RTMP as a standard for first-mile contribution.
Delivering Streaming Media to Servers
After packaging, the stream is either pulled or pushed to a media server. The media server might be on the same system as the encoder, or remote somewhere in the cloud. We offer the Wowza Streaming Engine™ software as media server software that you can install on your own servers — whether they’re on premises or a third-party cloud platform — to manage and customize on your own. We also have the Wowza Streaming Cloud™ service for those who want to get up and running quickly without any hassles.
Transcoding, Transizing, Transrating, and Transmuxing
Media servers ingest the stream from the encoder and convert the video as needed. Ingress is the amount of data entering the media server. Media servers can transcode the data into a new codec. They can transize the video into different resolutions and even transrate the data, creating different bitrates. Media servers can also repackage, or transmux, the data into different protocols. The data transferred out of a media server is known as egress. But let’s talk about why a media server is necessary by looking at who’s viewing the live stream and what makes a great viewing experience.
Adaptive Bitrate Streaming
You want your live stream to reach as many viewers as possible, but they’re not all going to consume your stream in the same manner. Some viewers will have big screens, some will have mobile phones, some will be on amazing internet, and some could be on awful Wi-Fi or even LTE.
That’s where adaptive bitrate (ABR) streaming becomes so important. A media server creates ABR ‘renditions,’ which are like items on a menu consisting of all the different resolutions and bitrates created. Then, the technology playing the video can choose the best rendition for viewing based on the size of the screen and network bandwidth available — while dynamically switching between options as resources fluctuate. In short, ABR ensures your viewers have the best quality live stream for their viewing conditions.
Streaming Video to Any Device on Any Connection
Your viewers could be watching on a set-top box, through an internet browser, or viewing through an app on their mobile device. Depending on what they’re using, they might require a different protocol. While a set-top box connected to your TV may still use RTMP, your iPhone only accepts HLS and your browser player may be running MPEG DASH. Again, your media server can convert your live stream into whatever protocol is required, called transmuxing, and ensure delivery to your viewers no matter their device of choice.
There are more things a media server can do, too, such as injecting additional information, saving the stream as a video file, and doing similar conversions to the audio. And keep in mind, with one stream coming into a media server (ingest) and multiple renditions coming out (egress) you’ll need more bandwidth for egress to support a large audience.
Delivering Great Streaming Experiences to Audiences Around the World
Back to viewers. Because we don’t know where they’re located, there’s still the issue of distance. The farther they are from the media server, the longer it takes for the signal to get to them. That distance can cause latency and buffering.
To resolve some of these issues, many broadcasters employ a content delivery network (CDN). It’s a network of media servers spread all over the world that’s capable of handling large amounts of data. The servers closest to the viewer are called edge servers. The data stream is delivered throughout the network, finally connecting with viewers at the edge server closest to them. Some broadcasters build their own networks using Wowza Streaming Engine for both pass-through and as edge servers. Others use services out there such as our Wowza CDN.
Live Video Streaming on Social Media
The last thing to think about are social media networks with their own CDN. Networks such as Facebook, YouTube Live, and Twitch often accept RTMP and have their own content delivery network for user-generated videos. Many stream directly from their encoders to these social media networks. We offer the Wowza ClearCaster™ appliance as an encoder that streams directly to Facebook Live and beyond. Through a media server, social media networks can be simultaneously targeted together in conjunction with your own delivery network, further increasing your live stream’s reach.
End-to-End Streaming Solutions for Live Video Delivery Across the Globe
Live video streaming today is about employing the right tools. Even with a global viewing audience on a variety of platforms, the highest quality live video streaming experience is possible.
I hope this helps you understand more about the complexities of live streaming and gets you excited about the endless possibilities to engage audiences.