OBS is an application that many creators use to
stream into Livepeer because it is easy to use, open source, and offers a high
degree of customization.
Follow our previous guide on
creating a stream to get a stream key to
provide to the creator on your platform. They will need to use this for their
OBS configuration.
Click the + icon under sources and select Video Capture Device if
you’d like to stream using a camera or webcam. If you’d like to stream a
browser window, select Window Capture.
Select Show All… and then Livepeer Studio for the service.
Keep the Default Server and paste the Stream Key provided by Livepeer
Studio into the OBS “Stream Key” fields. It is highly recommended to not
ignore the streaming service recommendations. If you choose to do this,
please see the low latency section below.
After they save their settings, OBS will return to the stream console.Press start streaming (from the output they selected when inputting your stream
settings above). Any player will now be able to
play back the livestream with the
playback ID.
Achieving the right balance between low latency and stream quality is essential
for providing the best possible user experience. Two settings that significantly
impact your stream quality, latency, and user experience are:
Rate Control: This setting dictates the bitrate or “quality” of the
stream. A high amount of bandwidth usually means better quality, but keep in
mind that your output can never improve the quality of your stream beyond your
input.
Keyframe Interval: Video streams consist of full frames and data relative
to the full frames. This setting determines how often a full frame appears,
which heavily influences latency.
Low latency is primarily determined by the keyframe interval. Having keyframes
appear more frequently allows viewers to “hook onto” a point closer to the
actual live point. However, full frames can’t (re)use references to other
frames, so more bandwidth is needed to generate a stream of the same quality
compared to one with a lower number of keyframes.
We also require that the user turns off B-frames for lowest latency. B-frames,
or bidirectional frames, are a type of video frame that makes use of
references from the past as well as the future. They improve video compression
by having more context, but also increase latency because they require a
bigger encode buffer. Furthermore, in WebRTC video playback, B-frames will
appear out-of-order on most systems.
Stream quality and user experience are mainly decided by the rate control of the
stream. When optimizing for user experience, consider the stability of the video
playback and the smoothness of the video. This is mostly decided by the peak
bitrate of the video. A high peak bitrate can cause playback problems like
buffering or skips in video playback for some viewers.
Since Livepeer is mostly HLS-based, a 2-second keyframe interval is generally
encouraged, as HLS has a minimum latency of around 3-5 keyframe intervals. This
choice would prioritize low latency.However, if the connection is fairly poor, a 5-second keyframe interval will
allow for higher quality per bit at the expense of more latency. If quality is
valued over latency, this is a better choice, and you could even consider going
for longer intervals. It is essential to understand the impact of each setting
and adapt them to your specific requirements and priorities. The optimal stream
settings may vary depending on your specific requirements.
The following profiles provide a good starting point for balancing low latency
with stream quality and user experience. You may need to adjust the settings to
suit your specific situation.
A good balance between reasonable latency and reasonable quality, but with a
consistent bit rate that should be comfortably viewable for most modern internet
connections.
Copy
Ask AI
Rate Control: CBRBit Rate: 2000Keyframe Interval: 2CPU Usage Preset: Very fastProfile: HighTune: NoneNo additional x264 optionsResolution: Up to 1080p