▶ Video & streaming

Setting up OBS Studio for clean live streams and recordings

Scenes, sources, encoders, bitrate and audio in OBS Studio: reasoned settings for stable live streams and quality recordings, plus the checks to run first.

OBS Studio is free, cross-platform software for recording and streaming video. It is used for online lessons, software demos, events and broadcasts on the main platforms. Its flexibility is also its limit: there are many settings and the defaults are not always suitable. This guide proposes a reasoned configuration, explaining the why of each choice, so you can adapt it to your own case.

The OBS logic: scenes and sources

OBS organises work on two levels:

  • sources: the individual elements, such as a webcam, a screen capture, an image, a microphone or some text;
  • scenes: compositions of sources arranged and layered, which you switch between during the stream.

A typical setup for a lesson might have three scenes: «Start» with a still image and music, «Presentation» with the screen and the webcam in a corner, «Break» with a holding message. Preparing scenes in advance makes the broadcast much calmer.

Video settings

In the video settings you define two resolutions:

  • base resolution (canvas): the workspace in which scenes are composed, usually the same as the monitor's;
  • output resolution: the one actually encoded and transmitted.

If the monitor is 2560×1440 and you stream in 1080p, OBS scales the picture. The Lanczos scaling filter gives sharper results, bilinear is lighter on the processor.

The frame rate should be chosen according to the content: 30 fps is enough for presentations and interviews, 60 fps is needed for games and fast motion. In Europe, under artificial lighting, 25 or 50 fps reduce the risk of flicker in webcam shots.

Choosing the encoder

OBS offers software and hardware encoders.

Encoder Type When to use it
x264 software, CPU powerful CPU free of other loads
NVENC hardware, NVIDIA cards games or a CPU already busy
Quick Sync hardware, Intel graphics laptops and computers without a dedicated card
AMF hardware, AMD cards systems with AMD graphics

Recent generations of hardware encoders reach quality close to x264 at medium presets, with minimal impact on performance. For anyone streaming games from the same computer, they are almost always the most sensible choice.

Settings for live streaming

A live stream needs a steady, regular flow. The general guidelines are:

  1. rate control: CBR, as required by most platforms;
  2. bitrate: according to the platform's recommendations for the chosen resolution, and in any case no more than about 70-80% of the upload bandwidth actually available;
  3. keyframe interval: 2 seconds, a value required or recommended by many platforms;
  4. profile: high, compatible with almost every player.

Measure upload speed several times and at different times of day: it is the minimum value, not the average, that decides whether the stream will hold.

Settings for recording

Local recording has different needs: there are no bandwidth limits, so you can aim for quality.

  • use constant quality rate control (CRF for x264, CQP or CQ for hardware encoders) instead of a fixed bitrate;
  • record in MKV or in the fragmented MP4 format offered by recent versions: if the computer crashes the file remains readable, while an interrupted traditional MP4 can become unusable;
  • if needed, convert the file to MP4 afterwards with the built-in remux feature, which does not re-encode.

Audio: the most neglected part

Viewers tolerate an imperfect picture far more than bad audio. A few precautions:

  • set the sample rate to 48 kHz, the video standard;
  • use level monitoring: the voice should sit steadily in the yellow zone, without reaching red;
  • add the built-in filters to the microphone: a noise gate or noise suppression for background noise, a compressor to even out volume, a limiter to prevent distortion on peaks;
  • split audio sources onto separate tracks in the recording, so that in editing microphone and system audio can be adjusted independently.

Before going live

A short checklist avoids most problems:

  1. make a test recording of a few minutes and listen back on headphones;
  2. check that no private window or notification appears in the screen capture;
  3. check the OBS statistics: frames dropped because of the network, rendering or encoding point to three different problems;
  4. prepare an emergency scene to use if something goes wrong;
  5. close unnecessary programs, especially those using the network.

Reading the statistics

The OBS statistics window distinguishes dropped frames:

  • due to encoding overload: the encoder cannot keep up; choose a faster preset or a hardware encoder;
  • due to rendering: the graphics card is overloaded, often because of a game; cap the game's frame rate;
  • due to the network: the connection cannot sustain the bitrate; lower it or use a wired connection.

In short

  • Prepare scenes in advance and distinguish base from output resolution.
  • Use a hardware encoder if the CPU is already busy.
  • Live: CBR, bitrate below real bandwidth and keyframes every 2 seconds.
  • Recording: constant quality and MKV or fragmented MP4.
  • Look after audio with filters, correct levels and separate tracks.
MM
Marco Marzaduri

Marco Marzaduri works in cybersecurity, digital forensics and web development. A computer science graduate, he combines rigorous technical analysis with attention to the people who use technology.

Read also