OBS Studio: Best Twitch custom x264 options

OBS Best Twitch custom x264 options for live streaming and maximising the juice for your streams!

 

Guide for best settings using custom x264 parameters

When it comes to streaming on Twitch, having the right OBS settings can make all the difference in terms of image quality and overall performance. While there are many different settings to consider, here’s a guide on why the following OBS settings are a great choice for streaming on Twitch:

Encoder: x264

Resolution: 1080p or 918p
Streaming at 1080p is the standard for most streamers on Twitch. While you can certainly stream at higher resolutions, doing so can put a strain on your computer and internet connection.
Using 918p over 900p or even 936p When downscaling from 4k Res…
While 900p and 936p are commonly used resolutions for streaming, they are not true 16:9 when downscaled from a 4K source. This can result in stretched or distorted images, affecting the overall visual quality of the stream. On the other hand, 1632×918 is a true 16:9 downscaled resolution that is also divisible by 16, making it ideal for encoding and streaming. By using 918p, streamers can achieve better visual quality and avoid any distort

Bitrate: 6000-8000
Bitrate refers to the amount of data transmitted per second during a stream. A higher bitrate generally results in better image quality, but it also requires more bandwidth.

Keyframe interval: 40
The keyframe interval determines how often a full frame is transmitted during a stream. A shorter interval can result in better image quality, but it also requires more bandwidth. A keyframe interval of 40 strikes a good balance between image quality and bandwidth usage.

B-frames: 3
B-frames refer to bidirectional frames, which are frames that reference both past and future frames. Using B-frames can result in smoother video and better image quality, but it also requires more processing power. 3 is a good number of B-frames to use for most streamers.

Reference frames: 4
Reference frames are frames that are used as a reference point for other frames. Using more reference frames can result in better image quality, but it also requires more processing power. 4 is a good number of reference frames to use for most streamers.

ME method: dia
The ME method determines how motion estimation is performed during the encoding process. Dia is generally considered to be the best option for image quality, as it performs a more detailed analysis of motion than other methods. (DIA is mainly good for fast motion paced games, Hex and UMH provide more quality)

(The me= (motion estimation) parameter in x264 controls the method used to analyze motion in the video frames during the encoding process. Here are some of the different parameters for me= and why each one is good:

  • me=hex: Uses hexagonal search patterns to analyze motion, which can be more efficient than traditional square search patterns in detecting complex motion.
  • me=umh: Uses the Uneven Multi-Hexagon (UMH) method to analyze motion, which can provide a higher level of detail and accuracy in detecting motion.
  • me=esa: Uses the Exhaustive Search Algorithm (ESA) to analyze motion, which involves examining all possible motion vectors in the search range. This method can be more accurate but also more computationally intensive.
  • me=tss: Uses the Transform Skip Search (TSS) method to analyze motion, which can provide faster encoding times while maintaining good visual quality.
  • me=dia
    Uses a diamond-shaped search pattern to analyze motion, which can be more efficient than square patterns in detecting motion while still maintaining good visual quality.

Overall, the choice of me= parameter depends on factors such as the complexity of the video content, the desired level of visual quality, and the available computing resources. Using the appropriate me= parameter can help to achieve a better balance between visual quality and encoding speed.)

Subpixel ME: 8
Subpixel motion estimation determines how motion is estimated on a smaller, subpixel level. A higher value can result in better image quality, but it also requires more processing power. 8 is a good value to use for most streamers.

Psy-rd: 3.0:2.0
Psy-rd is a technique that adjusts the encoding process based on perceived visual quality. A higher value can result in better image quality, but it also requires more processing power. 3.0:2.0 strikes a good balance between image quality and processing power usage.

Weightb: 1
The weighted prediction settings (weightb=1) help improve the overall image quality by allowing the encoder to more accurately predict pixel values. This results in less noise and pixelation in areas of the video with a lot of movement. The combination of weightb=1 and b-adapt=2 allows for the best possible use of the available B-frames, leading to smoother and clearer video. It’s important to note that not all encoders support weighted prediction, but OBS’s x264 encoder does, and it’s definitely worth enabling for better quality streams.

No-mbtree: 0
The “no-mbtree=0” setting in OBS refers to macroblock tree hierarchical structure prediction. When this setting is enabled (i.e., set to 0), the encoder uses a tree-like structure to predict the motion and other characteristics of macroblocks within the video frame. This can improve video quality and reduce compression artifacts, but it requires more computational resources and can slow down the encoding process. Therefore, enabling this setting can be beneficial for improving video quality, but may not be necessary in all cases.

Aq-strength: 1.0
AQ-Strength is a setting in x264 that adjusts the level of quantization used in different parts of a video frame to improve visual quality and compression efficiency. It dynamically increases quantization in simpler areas and decreases it in more complex areas, resulting in better visual quality and a more efficient use of bits.

Trellis: 2
The trellis= parameter in x264 controls the level of refinement used in trellis quantization, which adjusts the quantization step sizes of neighboring pixels based on the relationship between them to improve compression efficiency and visual quality. Here are the different parameters for trellis= and what they do:

  • trellis=0: Disables trellis quantization, using traditional quantization methods instead.
  • trellis=1: Enables trellis quantization with a moderate level of refinement, providing some compression gains without significantly impacting encoding times.
  • trellis=2: Enables trellis quantization with a higher level of refinement, resulting in improved visual quality and compression efficiency. This setting is generally considered a good balance between encoding speed and visual quality.
  • trellis=3: Enables trellis quantization with the highest level of refinement, resulting in the best possible visual quality and compression efficiency. However, this setting can significantly increase encoding times.

Overall, the trellis= parameter is a useful tool for achieving better compression efficiency and visual quality in compressed video. The optimal setting for trellis= may vary depending on the content of the video and the desired balance between visual quality and encoding speed.

By using these OBS settings, you can ensure that your stream looks great and runs smoothly on Twitch. While there are certainly other settings and options to consider, these settings provide a solid foundation for most streamers to build upon.

If your unsure about anything, please do some research.

my exact code (might be slightly diff and updated) is below.

keyint=20 min-keyint=60 rc-lookahead=60 bframes=3 b-adapt=2 ref=3 me=dia subme=8 direct=auto trellis=2 weightb=1 aq-mode=2 aq-strength=1.0 no-mbtree=0 psy-rd=3.0:2.0 psy-rdoq=1.0 merange=24 threads=18

More Guides:

Leave a Comment

ArabicEnglishFrenchGermanItalianJapaneseKoreanPortugueseSpanish