Skip to content

Instantly share code, notes, and snippets.

@mkrupczak3
Last active August 16, 2021 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkrupczak3/212801456d40fec72b8cb8aea98c7627 to your computer and use it in GitHub Desktop.
Save mkrupczak3/212801456d40fec72b8cb8aea98c7627 to your computer and use it in GitHub Desktop.
A set of notes for how I set up my twitch stream
Twitch official notes:
https://stream.twitch.tv/encoding/
Why use I NVENC (NVIDIA Turing and better) GPU ASIC encoding instead of CPU encoding?
https://youtu.be/6fyP7kg0QAc?t=434
NVENC is available on Maxwell arch. GPU's (GTX 10XX and later), but is vastly improved starting w/ the RTX (Turing & Ampere) cards.
GPU encoding = Fast but dumb
CPU encoding = Smart but slow:
https://venturebeat.com/2018/10/15/nvenc-vs-x264-does-cpu-or-rtx-gpu-encoding-work-best-for-twitch/
Video stream debugging tools and more info:
https://inspector.twitch.tv
https://stream.twitch.tv
GPU encoding is usually preferable for my use case:
https://www.reddit.com/r/Twitch/comments/c8ec2h/guide_x264_encoding_is_still_the_best_slow_isnt/
(I disagree with some of this link, the author didn't have a RTX GPU, and I've found that)
(double-pass NVENC encoding with the "Max Quality" setting provides superior visual quality)
(than I could reasonably achieve with CPU encoding on my platform)
Open Broadcaster Studio settings:
Plugins:
github.com/univrsal/input-overlay
Streaming
----MAIN----
(This works best for the majority of viewers, esp. those with slow internet)
Rate Control: CBR
Bitrate: 6000 Kbps
FRAMERATE: I have found using 59.97 fps instead of 60 has solved some screen tearing issues
Resolution: 3840x2160 59.97fps
Downscale to: 1664x936 59.97fps (MOAR bits/pixel = less potato!)
(or whatever, stick to green:)
https://pacoup.com/2011/06/12/list-of-true-169-resolutions/
Downscale Filter: Lanczos (or Area weighted sum)
Keyframe Interval: 2 (or your best judgement, but <= 4)
Psycho-visual tuning: enabled
Preset: Max Quality (this setting enables two-pass encoding for better visual per unit bitrate, very important)
Profile: high
Max B-frames: 2-4 (usually 4)
----ALT High Quality----
(This works best if you want a good looking picture)
Rate Control: CBR
Bitrate: 8000 Kbps
FRAMERATE: I have found using 59.97 fps instead of 60 has solved some screen tearing issues
Resolution: 3840x2160 59.97fps
Downscale to: 1920x1080 59.97fps
Downscale Filter: Lanczos (or Area weighted sum)
Keyframe Interval: 2 (or your best judgement, but <= 4)
Psycho-visual tuning: enabled
Preset: Max Quality (this setting enables two-pass encoding for better visual per unit bitrate, very important)
Profile: high
Max B-frames: 2
https://www.reddit.com/r/Twitch/comments/6wn3q1/why_do_big_streamers_use_1600x900/
https://www.reddit.com/r/Twitch/comments/fpkyvd/streaming_at_936p_or_900p/
Recording Locally:
Rate Control: CQP
CQP Target: 23
FRAMERATE: 59.97
Resolution: monitor native
Keyframe interval: 2 (or your best judgement, but <= 4)
Preset: Max Quality (note: some users may encounter errors using this setting for recording and streaming simultaneously)
Profile: high
Psycho-visual tuning: enabled
Max B-frames: 2-4 (usually 4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment