When encoding a live video stream, the most important factor in determining the quality and experience of the video stream is the bitrate. The bitrate is the actual amount of data going out at what speed. This is usually measured in "bits per second". Keeping in mind that a byte is made up of 8 bits, that means that a live video stream encoded at 800 Kbps will deliver 100 Kilobytes of data every second it's running
The bitrate used for live video streaming should meet three goals:
The network being used must be able to deliver the live stream to the media server
The viewers must be able to receive it from the media server
The quality of the video must be acceptable while meeting goal #1 and #2
Sending When you stream live video, you are using your network "uplink" to send a stream to a server. Your connection to that server must support that bit rate for the duration of the stream. That is not always easy, because you may have enough bandwidth to stream "now", but 10 minutes later someone on your network could consume available bandwidth and affect your uplink stream. While running a test of your network speed on sites such as speedtest.net can give you an idea of your connection speed, it can't tell you what your bandwidth will look like 10 minutes from "now". It could also be useful to test the steadiness and consistency of your internet connection by testing the "ping" of your connection on sites like pingtest.net.
Receiving You send at a bit rate higher than a viewer can receive. If you send a live stream at 1,000 Kbps (1 Mbps), and a viewer is on a low speed connection, they will have a poor experience. You must send your live stream at a rate viewers can receive. Today, about 500 Kbps is a good choice to reach most viewers.
Quality Use a frame rate and resolution that meets your needs. Some video producers are so concerned about quality that they lose sight of a viewer's ability to receive it. In live streaming, everything is a compromise. Lower resolution and frame rate may give a superior result. Garbage-In, garbage-out is also to be avoided. Your stream will never look better than the source, so use good lighting, and keep camera movement to a minimum if possible.
Guidelines Here are some of the most popular live encoding settings:
500 Kbps video
64 Kbps audio
640 x 360 resolution (16:9), or 640 x 480 (4:3)
IFrame (Key Frame): 120 frames (one I frame about every two seconds)
Reference Frames: 4 (this sets the GOP size, or "Group Of Pictures")
B-Frames: 4 (number of B frame in a GOP, marginal affect on quality and can be set to 0)