Hopp til innhold

The basics of streaming

The picture above shows a simple streaming setup. You got a camera sending live video to a computer (you need a capture card in your computer or connected by USB). The streaming computer encodes the video (this takes a lot of computer power so an i5 or higher is recommended).
A datastream containing the encoded video is sent via your router to a Content Delivery Network. This could be Youtube live, Ustream or any other provider. The Content Delivery Network works like a relay and makes it possible for a viewer to watch your stream.

Uploading

Notice on the picture above how we on the streaming side use upload speed while on the viewer side use download speed. Most internet connections are tailored for consumers downloading and not content creators like us that need a good upload speed. ADSL is a good example. It is typical that an ADSL line has a download speed of 10+ Mbit/s but only 1 Mbit/s upload. Getting an satisfactory  internet connection from the streaming venue is there for often the biggest problem you will encounter when streaming. Some places (like Norway where I live) using high-speed cellular connection might be the best and only possibility for getting the required upload bandwidth to stream 720p or higher at the venue.

Basics of Content Delivery Network (CDN)

We use a Content delivery network for multiple reasons but the most important is to be able to have multiple viewers at the same time without this overloading your own upload speed limit. The CDN is between you and your viewers and will take the load. If you have one or a thousand viewers makes no difference to you when it comes to the hardware or broadband connection requirements at the venue.

Beware that some CDN charge per hour streamed. So if you think that you will have many viewers then be sure that you have the right CDN.

To transcode or not to transcode

The CDN will work in one of two modes. Either they will transcode your data stream or they won't. Transcoding means that the video data stream is decoded to raw video and then encoded again before it is sent out to the viewers. Both modes have their flaws but the gist of it is as follows.

If your CDN don't transcode then all the viewers will have to watch the stream at the same bitrate and resolution as you are streaming in. This could be a problem if some of them have a slow internet connection. it would work out as shown on the picture below.

The good thing with not transcoding is that the delay between you streaming the live content and the viewer will be as close as possible. less then one minute in most cases.

If the CDN transcodes the video stream the delay will be longer. Dependent on the CDN this might be 2-3 minutes. This takes a lot more processor power for the CDN and for some providers this is therefor a function reserved only for paying streamers or streamers with high viewer count.

With transcoding the viewers can now choose what bitrate and resolution they want to watch the stream in. Especially if you are streaming in a very high bitrate or resolution transcoding is very important so that all your viewers independent of internet capacity can watch your stream.