Question / Help OBS losing frames

ZerueLX11

New Member
Hello!



So I use an RTMP Server setup to stream occasionally.


On my gaming PC I use OBS to stream to my RTMP server and my server re-encodes the stream to send of to Twitch. It seems that OBS is losing frames. It is supposed to be outputting a solid 60fps but it dips into the high 30s occasionally.

Here is the hardware setup layout.

Gaming PC: i7 4770k + GTX 980
RTMP Server: i7 4710HQ + GTX 850
X264: CPU Preset Fast - 4500kbps - FPS 60 - 1280x720

Gaming PC ----[20000kbps]---> RTMP Server ----[4500kbps] ---> Twitch
cxY1fSo.jpg

You can see in the Photo OBS is outputting 40fps when it should be a solid 60fps

Also here is the OBS Log file:

22:50:36.686: CPU Name: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
22:50:36.686: CPU Speed: 3492MHz
22:50:36.686: Physical Cores: 4, Logical Cores: 8
22:50:36.686: Physical Memory: 16256MB Total, 10749MB Free
22:50:36.686: Windows Version: 10.0 Build 16299 (revision: 192; 64-bit)
22:50:36.686: Running as administrator: true
22:50:36.686: Aero is Enabled (Aero is always on for windows 8 and above)
22:50:36.686: Windows 10 Gaming Features:
22:50:36.686: Game Bar: Off
22:50:36.686: Game DVR: Off
22:50:36.686: Game DVR Background Recording: Off
22:50:36.687: Sec. Software Status:
22:50:36.688: Windows Defender Antivirus: enabled (AV)
22:50:36.688: Windows Firewall: enabled (FW)
22:50:36.688: Windows Defender Antivirus: enabled (ASW)
22:50:36.688: Portable mode: false
22:50:36.703: OBS 21.0.1 (64bit, windows)
22:50:36.703: ---------------------------------
22:50:36.703: ---------------------------------
22:50:36.703: audio settings reset:
22:50:36.703: samples per sec: 44100
22:50:36.703: speakers: 2
22:50:36.705: ---------------------------------
22:50:36.705: Initializing D3D11...
22:50:36.705: Available Video Adapters:
22:50:36.706: Adapter 1: NVIDIA GeForce GTX 980
22:50:36.706: Dedicated VRAM: 4250206208
22:50:36.706: Shared VRAM: 4227952640
22:50:36.706: output 1: pos={0, 0}, size={2560, 1440}, attached=true
22:50:36.706: output 2: pos={2560, 0}, size={1920, 1080}, attached=true
22:50:36.706: Adapter 2: Intel(R) HD Graphics 4600
22:50:36.706: Dedicated VRAM: 117964800
22:50:36.706: Shared VRAM: 2147483648
22:50:36.709: Loading up D3D11 on adapter NVIDIA GeForce GTX 980 (0)
22:50:36.738: D3D11 loaded successfully, feature level used: 45056
22:50:37.422: ---------------------------------
22:50:37.422: video settings reset:
22:50:37.422: base resolution: 1920x1080
22:50:37.422: output resolution: 1920x1080
22:50:37.422: downscale filter: Bicubic
22:50:37.422: fps: 60/1
22:50:37.422: format: NV12
22:50:37.425: Audio monitoring device:
22:50:37.425: name: Default
22:50:37.425: id: default
22:50:37.425: ---------------------------------
22:50:37.426: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/chrome_elf.dll' not found, loading of module failed
22:50:37.441: [CoreAudio encoder]: Adding CoreAudio AAC encoder
22:50:37.481: [AMF] <obs_module_load> AMF not supported (no AMD graphics)
22:50:37.481: Failed to initialize module 'enc-amf.dll'
22:50:37.502: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libcef.dll' not found, loading of module failed
22:50:37.503: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libEGL.dll' not found, loading of module failed
22:50:37.503: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libGLESv2.dll' not found, loading of module failed
22:50:37.504: Failed to load 'en-US' text for module: 'obs-browser.dll'
22:50:37.504: [browser_source: 'Version: 1.29.0']
22:50:37.554: NVENC supported
22:50:37.562: [obs-ndi] hello ! (version 4.1.3)
22:50:37.562: [obs-ndi] Trying 'C:\Program Files\NewTek\NewTek NDI Redist\v3'
22:50:37.562: [obs-ndi] Found NDI library at 'C:/Program Files/NewTek/NewTek NDI Redist/v3/Processing.NDI.Lib.x64.dll'
22:50:37.566: [obs-ndi] NDI runtime loaded successfully
22:50:37.570: [obs-ndi] NDI library initialized successfully
22:50:37.649: Couldn't find VLC installation, VLC video source disabled
22:50:37.662: No blackmagic support
22:50:38.012: ---------------------------------
22:50:38.012: Loaded Modules:
22:50:38.012: win-wasapi.dll
22:50:38.012: win-mf.dll
22:50:38.012: win-dshow.dll
22:50:38.012: win-decklink.dll
22:50:38.012: win-capture.dll
22:50:38.012: vlc-video.dll
22:50:38.012: text-freetype2.dll
22:50:38.012: rtmp-services.dll
22:50:38.012: obs-x264.dll
22:50:38.012: obs-vst.dll
22:50:38.012: obs-transitions.dll
22:50:38.012: obs-text.dll
22:50:38.012: obs-qsv11.dll
22:50:38.012: obs-outputs.dll
22:50:38.012: obs-ndi.dll
22:50:38.012: obs-filters.dll
22:50:38.012: obs-ffmpeg.dll
22:50:38.012: obs-browser.dll
22:50:38.012: image-source.dll
22:50:38.012: frontend-tools.dll
22:50:38.012: enc-amf.dll
22:50:38.012: coreaudio-encoder.dll
22:50:38.012: ---------------------------------
22:50:38.012: ==== Startup complete ===============================================
22:50:38.025: All scene data cleared
22:50:38.025: ------------------------------------------------
22:50:38.091: WASAPI: Device 'Realtek Digital Output(Optical) (Realtek High Definition Audio)' initialized
22:50:38.102: WASAPI: Device 'Microphone (RODE NT-USB)' initialized
22:50:38.147: adding 46 milliseconds of audio buffering, total audio buffering is now 46 milliseconds
22:50:38.336: ---------------------------------
22:50:38.336: [DShow Device: 'Logitech_C920'] settings updated:
22:50:38.336: video device: Logitech HD Pro Webcam C920
22:50:38.336: video path: \\?\usb#vid_046d&pid_082d&mi_00#7&26cc60e0&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083}
22:50:38.336: resolution: 640x480
22:50:38.336: fps: 30.00 (interval: 333333)
22:50:38.336: format: I420
22:50:38.630: Switched to scene 'Scene'
22:50:38.630: ------------------------------------------------
22:50:38.630: Loaded scenes:
22:50:38.630: - scene 'Scene':
22:50:38.630: - source: 'Image' (image_source)
22:50:38.630: - source: 'Game Capture' (game_capture)
22:50:38.630: - source: 'Display Capture' (monitor_capture)
22:50:38.630: - source: 'Main_Overlay' (image_source)
22:50:38.630: - source: 'Logitech_C920' (dshow_input)
22:50:38.630: ------------------------------------------------
22:51:22.915: Settings changed (stream 1)
22:51:22.915: ------------------------------------------------
23:06:48.423: [qsv encoder: 'streaming_h264'] settings:
23:06:48.423: rate_control: CBR
23:06:48.423: target_bitrate: 20000
23:06:48.423: fps_num: 60
23:06:48.423: fps_den: 1
23:06:48.423: width: 1920
23:06:48.423: height: 1080
23:06:48.423: [qsv encoder: 'streaming_h264'] debug info:
23:06:48.428: impl: D3D11
23:06:48.428: surf: D3D11
23:06:48.444: m_nSurfNum: 16
23:06:48.445: m_nTaskPool: 4
23:06:48.445: major: 1
23:06:48.445: minor: 20
23:06:48.447: [CoreAudio AAC: 'Track1']: settings:
23:06:48.447: mode: AAC
23:06:48.447: bitrate: 160
23:06:48.447: sample rate: 44100
23:06:48.447: cbr: on
23:06:48.447: output buffer: 1536
23:06:48.447: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtmp://192.168.1.162/transcoder/...
23:06:48.449: [rtmp stream: 'adv_stream'] Interface: Intel(R) Ethernet Connection I217-V (ethernet, 1000 mbps)
23:06:48.531: [rtmp stream: 'adv_stream'] Connection to rtmp://192.168.1.162/transcoder/ successful
23:06:48.533: ==== Streaming Start ===============================================
23:07:21.892: [game-capture: 'Game Capture'] attempting to hook fullscreen process: TslGame.exe
23:07:21.895: [game-capture: 'Game Capture'] using helper (compatibility hook)
23:07:21.908: [game-capture: 'Game Capture'] hook not loaded yet, retrying..
23:07:24.924: [game-capture: 'Game Capture'] attempting to hook fullscreen process: TslGame.exe
23:07:25.252: [game-capture: 'Game Capture'] shared texture capture successful
23:07:25.260: [game-capture: 'Game Capture'] d3d11 shared texture capture successful
23:23:16.848: adding 46 milliseconds of audio buffering, total audio buffering is now 92 milliseconds
23:23:29.884: [rtmp stream: 'adv_stream'] User stopped the stream
23:23:29.884: Output 'adv_stream': stopping
23:23:29.884: Output 'adv_stream': Total frames output: 60063
23:23:29.884: Output 'adv_stream': Total drawn frames: 57719 (60086 attempted)
23:23:29.884: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 2367 (3.9%)
23:23:29.888: ==== Streaming Stop ================================================
23:23:41.437: Settings changed (outputs)
23:23:41.437: ------------------------------------------------
23:23:43.028: [qsv encoder: 'streaming_h264'] settings:
23:23:43.028: rate_control: CBR
23:23:43.028: target_bitrate: 20000
23:23:43.028: fps_num: 60
23:23:43.028: fps_den: 1
23:23:43.028: width: 1920
23:23:43.028: height: 1080
23:23:43.028: [qsv encoder: 'streaming_h264'] debug info:
23:23:43.034: impl: D3D11
23:23:43.034: surf: D3D11
23:23:43.056: m_nSurfNum: 16
23:23:43.057: m_nTaskPool: 4
23:23:43.057: major: 1
23:23:43.057: minor: 20
23:23:43.060: [CoreAudio AAC: 'Track1']: settings:
23:23:43.060: mode: AAC
23:23:43.060: bitrate: 160
23:23:43.060: sample rate: 44100
23:23:43.060: cbr: on
23:23:43.060: output buffer: 1536
23:23:43.060: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtmp://192.168.1.162/transcoder/...
23:23:43.061: [rtmp stream: 'adv_stream'] Interface: Intel(R) Ethernet Connection I217-V (ethernet, 1000 mbps)
23:23:43.143: [rtmp stream: 'adv_stream'] Connection to rtmp://192.168.1.162/transcoder/ successful
23:23:43.147: ==== Streaming Start ===============================================
23:34:00.858: [game-capture: 'Game Capture'] capture window no longer exists, terminating capture
23:34:00.859: [game-capture: 'Game Capture'] capture stopped
 

FerretBomb

Active Member
99% of the time, fps drops of the rate counter at the bottom-right of OBS are due to the GPU being overloaded. Happens especially commonly when it comes to badly-coded games like PUBG and Battlefield. You need to either use vsync or an in-game frame limiter to ensure that the GPU has processing time left for the operations OBS uses it to calculate; stuff like colorspace conversion, scaling, frame composition, etc.

In fact, you can see that happening in the left side of your image: GPU Load 99%

Cap the framerate, or turn on vsync/fastsync. Something to take a bit of strain off your graphics card.
 
Top