Encoding quality is similar to a fine art: taking it slow yields better results. When encoding at a slower pace, the encoder has more time to "look ahead" and optimize the process, resulting in higher quality. Latency is only a concern when real-time interaction is more important than video quality. For the most part, only the broadcaster is aware of any streaming delay when there is no immediate interaction.
Resource availability (CPU/GPU), slow encoding, extended keyframe intervals, and network buffer play a more significant role in streaming quality than resolution and bitrate. Streaming services typically suggest adjusting resolution and bitrate because it benefits them by reducing transcoding complexity and lowering costs. However, focusing on the other factors mentioned can help improve overall streaming performance.
Whenever possible, use a separate computer for streaming and other tasks (such as DJing or gaming).
Your streaming computer should be solely dedicated to streaming and recording during live sessions. It's also a good idea to close all other applications to prevent CPU and GPU usage from causing video artifacts. If using a single device is necessary, optimize operations to minimize the impact on CPU/GPU. Consider GPU transcoding or using a hardware video capture device if multiple applications are running on your streaming computer.
Have a powerful CPU or hardware-encoding capture card as a source?
If you have a robust CPU or device, use CPU x264 encoding for optimal quality fine-tuning. In OBS > output, set the output mode to advanced. Choose x264 as the encoder and set the fixed CPU usage preset to slower. If your CPU isn't powerful enough, consider using slow mode. Monitor your CPU usage while transcoding; it should never exceed 90%. If slow mode is still too demanding, opt for a GPU/hardware encoder (see below). Set the keyframe interval to 6 seconds, select the High profile (most CPU-intensive), and enable the b-frames checkbox if available. Refer to the guide below for resolutions and bitrates.
Limited CPU but powerful GPU or using a single PC for both operations and streaming?
Ensure your CPU isn't strong enough, as CPU settings offer better quality. Hardware encoders typically use a medium preset, resulting in lower quality than x264 slow or slower presets. However, it can enhance your performance if your PC isn't dedicated to streaming.
In OBS > output, set the output mode to advanced. Choose the hardware encoder (options vary depending on your PC, such as GPU, NVENC, Intel Quicksync, Apple VT H264 Hardware encoder, etc.). Set the keyframe interval to 6 seconds and choose the High profile (most GPU-intensive). Enable the B frames checkbox or set the maximum number of b-frames to 4 if available (dependent on your GPU). Refer to the guide below for resolutions and bitrates.
Use a wired network, focus on UPLOAD speed and VARIABILITY in speed tests, not download speed or peak bandwidth.
Avoid WiFi unless necessary. If required, opt for the latest generations like WiFi 6x for better bandwidth, reliability, and streaming performance. If latency isn't an issue, OBS and Xsplit provide settings to minimize connection variability with stream delay (increasing the delay between streaming and viewing). Start with 6 seconds, but reduce it if you have fiber (or don't use it if your connection is highly reliable), and increase it up to 10 seconds for 4G or ADSL. Finally, check if your streaming service offers region-specific publishing URLs (RTMP URLs), and select the nearest one (based on geography or latency, if you know how to ping a domain name).
Resolution, bitrates, and framerates: balancing compatibility and quality
ABR is the most efficient rate control, allocating more bits when needed for video quality. However, most streaming services require CBR or VBR for simpler operations. If your service allows ABR, use it. Otherwise, if your upload bandwidth is below 8 Mbps, opt for VBR with 80% of your upload bandwidth as the bitrate, and 95% as the maximum bitrate.
1080p has 225% more pixels than 720p. For the same video quality, the bitrate needs to more than double. With limited upload bandwidth, consider 720p at 4 Mbps instead of 1080p at 6 Mbps. 8 Mbps is suitable for most 1080p cases. If your service suggests a lower maximum, test these settings and adjust if necessary. 60 fps is standard, so stick to it unless you can't provide a 60 fps source or lack resources for 60 fps streaming
YouTube HLS - the new gold standard for YouTube
Recent OBS versions introduced many new streaming services accessible via the "Show all..." option. Among these is the lesser-known YouTube HLS output. What is HLS? Introduced by Apple over a decade ago, HLS has become a widely-used standard for transmitting every frame of streaming video, ensuring playback quality comparable to standard TV broadcasts or Netflix. Using HLS ensures none of your transmission gets lost between your computer and YouTube, offering a significant improvement over RTMP(S), which was reserved for professionals like DJing TV until 2021.
The Importance of Local Recording
Live transmission protocols can cause network packet losses (unless using HLS). These losses result in video freezing, image artifacts, audio drops, and other issues, which are inherent to RTMP(S) protocol transmission. Local recording is essential even if you think your live stream won't be worth rewatching. If your live stream becomes available for replay (catch-up) or in a VOD catalog or TV channel schedule (e.g., promotion in bars and music venues with DJing TV), having a locally recorded version ensures better quality. It's a good practice to save locally. Choose mp4 as the recording format since it's universal. If you follow the guidelines above, you can use the "use stream encoder" option in OBS. If your computer has enough power, choose ABR as the rate control and record at a higher bitrate (15 Mbps for 1080p, 25 Mbps for 4k) while maintaining the same settings as for your live stream.
When Latency Matters
If latency is a concern, prioritize it over quality and consider avoiding RTMP protocol in favor of WebRTC or SRT. However, only a few (mostly free) services currently support these technologies and large audiences (though services like Streamyard or Restream can help). If you still need to use RTMP output and latency is important, apply the following settings (x264 CPU encoder only) that will lower quality but reduce end-to-end delays:
- Profile: baseline (main for YouTube)
- Keyframe interval: 1
- CPU usage: ultrafast (fast for YouTube)
- Tune: zerolatency
- x264 options: bframes=0 scenecut=0
Does DJing.com streaming services comply to these recommendations?
Yes. When it comes to streaming services, DJing.com prioritizes top-notch quality for both publishers and viewers. Their services allow for unparalleled video quality for standard streaming viewers while still adhering to the best practices recommended above. In addition, they offer WebRTC and SRT subsecond streaming for real-time interaction, with up to 500 Kbps audio streaming for those using compatible software. Both types of streaming can be run simultaneously from the same software (such as OBS, XSplit, or directly from the browser). Furthermore, publishers can submit their locally recorded content for high-quality rebroadcasting after the live stream has ended.
Get additional information about OBS best settings, OBS Keyframe Interval and OBS frame rate on iReplay.TV