Bug Report OBS Studio - lags when recording and streaming

Lampeskærm

New Member
Hi

I have lags when recording and streaming Overwatch in OBS - and I know for a fact, that it's not my computer which is not good enough. When I use another program for streaming or recording (Mirillis Action) there are no problems whatsoever.

My specs are:
CPU: i7-5820k - 6 cores and 3.3 GHz (not overclocked yet)
GPU: ASUS Strix Geforce 970
RAM: 16 GB DDR4

Settings tested (works in mirillis):
Downscaled output: 1280x720
Frames: 30
Encoder: NVENC (it's the same result if I choose x264)
Bitrate: 2000

I run the latest updated version of Windows 10.

The rest of my computer is working flawlessly with no recognizable drop in performance, but the recordings and streaming are horribly laggy and can't be watched.

I would really like to use OBS for streaming since it supports CLR Browser plugin and Mirillis doesn't, but I simply can't get it to work!

Can somebody out there help me?

Finally - here is a log file of an overwatch recording. I tried with several different settings - all of which is working in Mirillis. The last settings tried is the one discussed above.

Code:
10:56:53.712: CPU Name: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
10:56:53.712: CPU Speed: 3300MHz
10:56:53.713: Physical Cores: 6, Logical Cores: 12
10:56:53.713: Physical Memory: 16296MB Total, 12058MB Free
10:56:53.713: Windows Version: 10.0 Build 14393 (revision: 0)
10:56:53.713: Running as administrator: false
10:56:53.713: Aero is Enabled (Aero is always on for windows 8 and above)
10:56:53.722: OBS 0.15.4 (64bit, windows)
10:56:53.722: ---------------------------------
10:56:53.722: ---------------------------------
10:56:53.722: audio settings reset:
10:56:53.722:     samples per sec: 44100
10:56:53.722:     speakers:        2
10:56:53.723: ---------------------------------
10:56:53.723: Initializing D3D11..
10:56:53.723: Available Video Adapters:
10:56:53.725:     Adapter 1: NVIDIA GeForce GTX 970
10:56:53.725:      Dedicated VRAM: 4256104448
10:56:53.725:      Shared VRAM:    4248993792
10:56:53.725:      output 1: pos={0, 0}, size={1920, 1080}, attached=true
10:56:53.725:      output 2: pos={-1920, 0}, size={1920, 1080}, attached=true
10:56:53.725:      output 3: pos={1920, 0}, size={1920, 1080}, attached=true
10:56:53.730: Loading up D3D11 on adapter NVIDIA GeForce GTX 970 (0)
10:56:53.787: D3D11 loaded sucessfully, feature level used: 45056
10:56:54.324: ---------------------------------
10:56:54.324: video settings reset:
10:56:54.324:     base resolution:   1920x1080
10:56:54.324:     output resolution: 1920x1080
10:56:54.324:     fps:               60/1
10:56:54.324:     format:            NV12
10:56:54.325: ---------------------------------
10:56:54.327: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
10:56:54.330: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libcef.dll' not found, loading of module failed
10:56:54.331: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libEGL.dll' not found, loading of module failed
10:56:54.331: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libGLESv2.dll' not found, loading of module failed
10:56:54.332: Failed to load 'en-US' text for module: 'obs-browser.dll'
10:56:54.333: NVENC supported
10:56:54.335: Failed to load 'da-DK' text for module: 'obs-qsv11.dll'
10:56:54.461: Failed to load 'da-DK' text for module: 'vlc-video.dll'
10:56:54.461: Couldn't find VLC installation, VLC video source disabled
10:56:54.805: No blackmagic support
10:56:54.844: ---------------------------------
10:56:54.844:   Loaded Modules:
10:56:54.844:     win-wasapi.dll
10:56:54.844:     win-mf.dll
10:56:54.844:     win-dshow.dll
10:56:54.844:     win-decklink.dll
10:56:54.844:     win-capture.dll
10:56:54.844:     vlc-video.dll
10:56:54.844:     text-freetype2.dll
10:56:54.844:     SceneSwitcher.dll
10:56:54.844:     rtmp-services.dll
10:56:54.844:     obs-x264.dll
10:56:54.844:     obs-transitions.dll
10:56:54.844:     obs-qsv11.dll
10:56:54.844:     obs-outputs.dll
10:56:54.844:     obs-filters.dll
10:56:54.844:     obs-ffmpeg.dll
10:56:54.844:     obs-browser.dll
10:56:54.844:     image-source.dll
10:56:54.844:     coreaudio-encoder.dll
10:56:54.844: ==== Startup complete ===============================================
10:56:54.847: All scene data cleared
10:56:54.847: ------------------------------------------------
10:56:54.896: WASAPI: Device 'Højttalere (3- Logitech G930 Gaming Headset)' initialized
10:56:54.901: WASAPI: Device 'Mikrofon (Blue Snowball)' initialized
10:56:54.924: ---------------------------------
10:56:54.924: [DShow Device: 'Video Optagelsesenhed 1'] settings updated:
10:56:54.924:     video device: USB Video Device
10:56:54.924:     video path: \\?\usb#vid_0c45&pid_6341&mi_00#7&705889e&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
10:56:54.924:     resolution: 640x480
10:56:54.924:     fps: 33.00 (interval: 303030)
10:56:54.924:     format: YUY2
10:56:54.925: DShow: HDevice::ConnectPins: failed to connect pins (0x80070004):
10:56:54.934: adding 23 milliseconds of audio buffering, total audio buffering is now 23 milliseconds
10:56:55.029: Video Optagelsesenhed: data.GetDevice failed
10:56:55.029: Video Optagelsesenhed: Video configuration failed
10:56:55.049: DShow: HDevice::ConnectFilters: RenderStream failed (0x80070057):
10:56:55.075: Switched to scene 'Default Scene'
10:56:55.075: ------------------------------------------------
10:56:55.075: Loaded scenes:
10:56:55.075: - scene 'Default Scene':
10:56:55.075:     - source: 'Spil optager' (game_capture)
10:56:55.075:     - source: 'Video Optagelsesenhed 1' (dshow_input)
10:56:55.075:     - source: 'WebcamOverlayPurple' (image_source)
10:56:55.075:     - source: 'CLR' (browser_source)
10:56:55.075: - scene 'League of Legends':
10:56:55.075:     - source: 'LoL' (game_capture)
10:56:55.075:     - source: 'Video Optagelsesenhed' (dshow_input)
10:56:55.075:     - source: 'LoLMapOverlayPurple' (image_source)
10:56:55.075:     - source: 'LoLHudOverlayPurple' (image_source)
10:56:55.075:     - source: 'WebcamOverlayPurple' (image_source)
10:56:55.075:     - source: 'CLR' (browser_source)
10:56:55.075: - scene 'GameCapture':
10:56:55.075:     - source: 'Skærm optager 1' (monitor_capture)
10:56:55.075: - scene 'WebcamCapture':
10:56:55.075:     - source: 'Video Optagelsesenhed 1' (dshow_input)
10:56:55.075: ------------------------------------------------
11:00:37.751: Settings changed (outputs)
11:00:37.751: ------------------------------------------------
11:01:04.082: User added source 'Skærm optager' (monitor_capture) to scene 'Default Scene'
11:01:17.571: User switched to scene 'GameCapture'
11:01:18.173: User switched to scene 'League of Legends'
11:01:19.453: User switched to scene 'Default Scene'
11:02:01.195: ---------------------------------
11:02:01.195: [NVENC encoder: 'recording_h264'] settings:
11:02:01.195:     rate_control: CBR
11:02:01.195:     bitrate:      3500
11:02:01.195:     cqp:          0
11:02:01.195:     keyint:       250
11:02:01.195:     preset:       hq
11:02:01.195:     profile:      main
11:02:01.195:     level:        auto
11:02:01.195:     width:        1280
11:02:01.195:     height:       720
11:02:01.195:     2-pass:       true
11:02:01.195:     GPU:          0
11:02:01.195:
11:02:01.196: warning: This encoder is deprecated, use 'h264_nvenc' instead
11:02:02.398: [Media Foundation AAC: 'Track1']: encoder created
11:02:02.398:     bitrate: 160
11:02:02.398:     channels: 2
11:02:02.398:     sample rate: 44100
11:02:02.398:     bits-per-sample: 16
11:02:02.398:
11:02:02.404: ==== Recording Start ===============================================
11:02:02.404: [ffmpeg muxer: 'adv_file_output'] Writing file 'E:/Videoer/Streams/2017-02-09 11-02-01.mp4'...
11:02:54.592: adding 23 milliseconds of audio buffering, total audio buffering is now 46 milliseconds
11:04:41.176: [ffmpeg muxer: 'adv_file_output'] Output of file 'E:/Videoer/Streams/2017-02-09 11-02-01.mp4' stopped
11:04:41.176: Output 'adv_file_output': stopping
11:04:41.176: Output 'adv_file_output': Total encoded frames: 9525
11:04:41.176: Output 'adv_file_output': Total drawn frames: 9527
11:04:41.176: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 4775 (50.1%)
11:04:41.176: ==== Recording Stop ================================================
11:06:10.606: Settings changed (outputs)
11:06:10.606: ------------------------------------------------
11:06:12.489: ---------------------------------
11:06:12.489: [NVENC encoder: 'recording_h264'] settings:
11:06:12.489:     rate_control: CBR
11:06:12.489:     bitrate:      2000
11:06:12.489:     cqp:          0
11:06:12.489:     keyint:       250
11:06:12.489:     preset:       hq
11:06:12.489:     profile:      main
11:06:12.489:     level:        auto
11:06:12.489:     width:        1280
11:06:12.489:     height:       720
11:06:12.489:     2-pass:       true
11:06:12.489:     GPU:          0
11:06:12.489:
11:06:12.489: warning: This encoder is deprecated, use 'h264_nvenc' instead
11:06:13.491: [Media Foundation AAC: 'Track1']: encoder created
11:06:13.491:     bitrate: 160
11:06:13.491:     channels: 2
11:06:13.491:     sample rate: 44100
11:06:13.491:     bits-per-sample: 16
11:06:13.491:
11:06:13.493: ==== Recording Start ===============================================
11:06:13.493: [ffmpeg muxer: 'adv_file_output'] Writing file 'E:/Videoer/Streams/2017-02-09 11-06-12.mp4'...
11:07:45.458: [ffmpeg muxer: 'adv_file_output'] Output of file 'E:/Videoer/Streams/2017-02-09 11-06-12.mp4' stopped
11:07:45.458: Output 'adv_file_output': stopping
11:07:45.458: Output 'adv_file_output': Total encoded frames: 5512
11:07:45.458: Output 'adv_file_output': Total drawn frames: 5517
11:07:45.458: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 2916 (52.9%)
11:07:45.458: ==== Recording Stop ================================================
 

Rotab

New Member
Running a game without vertical sync or a frame rate limiter will frequently cause performance issues with OBS because your GPU will be maxed out. Enable vsync or set a reasonable frame rate limit that your GPU can handle without hitting 100% usage. If that's not enough you may also need to turn down some of the video quality options in the game.
 

Lampeskærm

New Member
Running a game without vertical sync or a frame rate limiter will frequently cause performance issues with OBS because your GPU will be maxed out. Enable vsync or set a reasonable frame rate limit that your GPU can handle without hitting 100% usage. If that's not enough you may also need to turn down some of the video quality options in the game.

I just tried activating VSync - it didn't help. Also if I can use those exact settings in other recording and streaming programs, then I believe it should be possible to run with those setttings in OBS as well?
 

EBrito

Active Member
When only recording, you get this:
11:04:41.176: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 4775 (50.1%)

Your CPU can´t handle game and rendering. So, you need to limit ingame graphics settings and set Vsync.

So, when you record and stream at a time, this will be worse.
Your GPU would have to render 1080p for recording and 720p for streaming.
 
Hi,

The current log is only showing recording and not streaming.

When recording as you are going to use Nvenc if not do so :-) then you can record at 1080p 30fps VBR 40k or CQP 20 without any issues, can even do 60fps but this will affect your stream as OBS only allows one fps setting shared across both record and steam atm. Note if you have the birate for 60fps stream tweak as required.

The stream use x264 software that cpu is capable of this without any issues, use the following and tweak if required. (also overclock it :-)))

x264 software
CPU Preset - veryfast (tweak depending on cpu load higher or lower. If you OC the cpu you will be able to run this no issues and lower until you find the fps is taking a hit)
720p
30fps
CRB

repost log if any issues.

(The lags in the log currently are from Nvnec given the settings this should even be an issue so check the Nvidia drivers also. for your GPU)
 
Top