Question / Help Stream Lagging While playing

Powsa

New Member
So I have an issue....

When I dont start the stream and just preview the stream, its lagging and its lagging a lot.

When my scene is only overlay its fine but as soon as the game is in it starts to lag...

This is my log.

Code:
23:04:25.927: CPU Name: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
23:04:25.928: CPU Speed: 4008MHz
23:04:25.928: Physical Cores: 4, Logical Cores: 8
23:04:25.928: Physical Memory: 16303MB Total, 8256MB Free
23:04:25.928: Windows Version: 10.0 Build 15063 (revision: 674; 64-bit)
23:04:25.928: Running as administrator: false
23:04:25.928: Aero is Enabled (Aero is always on for windows 8 and above)
23:04:25.928: Windows 10 Gaming Features:
23:04:25.928:     Game Bar: Off
23:04:25.928:     Game DVR Allowed: Yes
23:04:25.928:     Game DVR: On
23:04:25.928:     Game DVR Background Recording: Off
23:04:25.928:     Game Mode: Off
23:04:25.928: Portable mode: false
23:04:25.937: OBS 20.1.1 (64bit, windows)
23:04:25.937: ---------------------------------
23:04:25.948: ---------------------------------
23:04:25.948: audio settings reset:
23:04:25.948:     samples per sec: 44100
23:04:25.948:     speakers:        2
23:04:26.003: ---------------------------------
23:04:26.003: Initializing D3D11...
23:04:26.003: Available Video Adapters:
23:04:26.004:     Adapter 1: NVIDIA GeForce GTX 1060 6GB
23:04:26.004:       Dedicated VRAM: 2048065536
23:04:26.004:       Shared VRAM:    4252753920
23:04:26.004:       output 1: pos={0, 0}, size={2560, 1440}, attached=true
23:04:26.004:       output 2: pos={2560, 188}, size={1920, 1080}, attached=true
23:04:26.006: Loading up D3D11 on adapter NVIDIA GeForce GTX 1060 6GB (0)
23:04:26.428: D3D11 loaded successfully, feature level used: 45056
23:04:26.920: ---------------------------------
23:04:26.920: video settings reset:
23:04:26.920:     base resolution:   1920x1080
23:04:26.920:     output resolution: 1920x1080
23:04:26.920:     downscale filter:  Bicubic
23:04:26.920:     fps:               30/1
23:04:26.920:     format:            NV12
23:04:26.921: Audio monitoring device:
23:04:26.921:     name: Default
23:04:26.921:     id: default
23:04:26.921: ---------------------------------
23:04:26.958: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/chrome_elf.dll' not found, loading of module failed
23:04:26.974: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
23:04:26.981: [AMF] Encountered Exception during AMF initialization: Unable to load 'amfrt64.dll', error code 126.
23:04:26.981: Failed to initialize module 'enc-amf.dll'
23:04:27.044: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libcef.dll' not found, loading of module failed
23:04:27.058: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libEGL.dll' not found, loading of module failed
23:04:27.083: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libGLESv2.dll' not found, loading of module failed
23:04:27.103: Failed to load 'en-US' text for module: 'obs-browser.dll'
23:04:27.103: [browser_source: 'Version: 1.29.0']
23:04:27.135: NVENC supported
23:04:27.352: Couldn't find VLC installation, VLC video source disabled
23:04:27.382: No blackmagic support
23:04:27.480: ---------------------------------
23:04:27.480:   Loaded Modules:
23:04:27.480:     win-wasapi.dll
23:04:27.480:     win-mf.dll
23:04:27.480:     win-dshow.dll
23:04:27.480:     win-decklink.dll
23:04:27.480:     win-capture.dll
23:04:27.480:     vlc-video.dll
23:04:27.480:     text-freetype2.dll
23:04:27.480:     rtmp-services.dll
23:04:27.480:     obs-x264.dll
23:04:27.480:     obs-vst.dll
23:04:27.480:     obs-transitions.dll
23:04:27.480:     obs-text.dll
23:04:27.480:     obs-qsv11.dll
23:04:27.480:     obs-outputs.dll
23:04:27.480:     obs-filters.dll
23:04:27.480:     obs-ffmpeg.dll
23:04:27.480:     obs-browser.dll
23:04:27.480:     image-source.dll
23:04:27.480:     frontend-tools.dll
23:04:27.480:     enc-amf.dll
23:04:27.480:     coreaudio-encoder.dll
23:04:27.480: ---------------------------------
23:04:27.480: ==== Startup complete ===============================================
23:04:27.481: All scene data cleared
23:04:27.481: ------------------------------------------------
23:04:27.514: WASAPI: Device 'Speakers (Realtek High Definition Audio)' initialized
23:04:27.518: WASAPI: Device 'Microphone (AT2020USB+)' initialized
23:04:27.542: ---------------------------------
23:04:27.542: [DShow Device: 'Video Capture Device'] settings updated:
23:04:27.542:     video device: Logitech HD Pro Webcam C920
23:04:27.542:     video path: \\?\usb#vid_046d&pid_082d&mi_00#6&1c146c2d&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083}
23:04:27.542:     resolution: 1920x1080
23:04:27.542:     fps: 30.00 (interval: 333333)
23:04:27.542:     format: I420
23:04:27.564: adding 46 milliseconds of audio buffering, total audio buffering is now 46 milliseconds
23:04:40.603: warning: deprecated pixel format used, make sure you did set range correctly
23:04:40.604: warning: Warning: data is not aligned! This can lead to a speed loss
23:04:40.667: warning: deprecated pixel format used, make sure you did set range correctly
23:04:40.853: warning: deprecated pixel format used, make sure you did set range correctly
23:04:40.880: warning: deprecated pixel format used, make sure you did set range correctly
23:04:40.915: warning: deprecated pixel format used, make sure you did set range correctly
23:04:40.959: warning: deprecated pixel format used, make sure you did set range correctly
23:04:41.161: warning: deprecated pixel format used, make sure you did set range correctly
23:04:41.387: warning: deprecated pixel format used, make sure you did set range correctly
23:04:41.602: warning: deprecated pixel format used, make sure you did set range correctly
23:04:41.772: warning: deprecated pixel format used, make sure you did set range correctly
23:04:41.788: Switched to scene 'InGame'
23:04:41.789: ------------------------------------------------
23:04:41.789: Loaded scenes:
23:04:41.789: - scene 'Start':
23:04:41.789:     - source: 'Overlay' (browser_source)
23:04:41.789: - scene 'InGame':
23:04:41.790:     - source: 'Window Capture' (window_capture)
23:04:41.790:     - source: 'Game Capture' (game_capture)
23:04:41.790:     - source: 'Video Capture Device' (dshow_input)
23:04:41.790:     - source: 'Overlay1' (browser_source)
23:04:41.790: - scene 'Waiting':
23:04:41.790:     - source: 'Video Capture Device' (dshow_input)
23:04:41.790:     - source: 'Image Slide Show' (slideshow)
23:04:41.790:     - source: 'Overlay2' (browser_source)
23:04:41.790: - scene 'BRB':
23:04:41.790:     - source: 'Overlay3' (browser_source)
23:04:41.790: - scene 'End':
23:04:41.790:     - source: 'Overlay4' (browser_source)
23:04:41.790: ------------------------------------------------
23:05:20.157: [game-capture: 'Game Capture'] attempting to hook fullscreen process: TslGame.exe
23:05:20.160: [game-capture: 'Game Capture'] using helper (compatibility hook)
23:05:20.400: [game-capture: 'Game Capture'] hook not loaded yet, retrying..
23:05:23.188: [game-capture: 'Game Capture'] attempting to hook fullscreen process: TslGame.exe
23:05:24.487: [game-capture: 'Game Capture'] capture stopped
23:05:27.222: [game-capture: 'Game Capture'] attempting to hook fullscreen process: TslGame.exe
23:05:27.254: [game-capture: 'Game Capture'] capture stopped
23:05:31.278: [game-capture: 'Game Capture'] attempting to hook fullscreen process: TslGame.exe
23:05:31.373: [game-capture: 'Game Capture'] shared texture capture successful
23:06:20.654: [game-capture: 'Game Capture'] capture window no longer exists, terminating capture
23:06:20.656: [game-capture: 'Game Capture'] capture stopped
 
Common problem for a lot of streamers, you are trying to hook two display sources at the same time in the same scene:

23:04:41.789: - scene 'InGame':
23:04:41.790: - source: 'Window Capture' (window_capture)
23:04:41.790: - source: 'Game Capture' (game_capture)

Window/Desktop Capture and Game Capture conflict as they compete directly with each other for frames that are drawn... Essentially you are trying to not only render what you are seeing in-game, render what you see with game capture, also trying to render what Window/Desktop capture is displaying... All at the same time!

Remove Window Capture from the scene 'InGame', this will most likely solve all of your issues with loss of performance.

Game Capture is the preferred method of image capturing as it directly hooks into the rendering pipeline for each game, removing the need to render the desktop and anything else (Browsers, etc) you have running as well as the game.

You should only use Desktop/Window Capture if you can't record/stream via Game Capture at all (Should troubleshoot/post a logfile with a recording/streaming attempt here before switching capture methods)

If you still have issues after removing one of those two, upload a logfile via OBS Studio after you have recorded/streamed for a few minutes or more:

Help --> Logfiles --> Upload Current/Last Logfile.
Copy and paste the hyperlink OBS Studio gives you into a reply on this thread you have going and I or someone else will/should be able to assist you with further troubleshooting.

It gives a much more verbose logfile than you can copy/paste due to the character limits in Code format on the forum.
 

Powsa

New Member
Common problem for a lot of streamers, you are trying to hook two display sources at the same time in the same scene:

23:04:41.789: - scene 'InGame':
23:04:41.790: - source: 'Window Capture' (window_capture)
23:04:41.790: - source: 'Game Capture' (game_capture)

Window/Desktop Capture and Game Capture conflict as they compete directly with each other for frames that are drawn... Essentially you are trying to not only render what you are seeing in-game, render what you see with game capture, also trying to render what Window/Desktop capture is displaying... All at the same time!

Remove Window Capture from the scene 'InGame', this will most likely solve all of your issues with loss of performance.

Game Capture is the preferred method of image capturing as it directly hooks into the rendering pipeline for each game, removing the need to render the desktop and anything else (Browsers, etc) you have running as well as the game.

You should only use Desktop/Window Capture if you can't record/stream via Game Capture at all (Should troubleshoot/post a logfile with a recording/streaming attempt here before switching capture methods)

If you still have issues after removing one of those two, upload a logfile via OBS Studio after you have recorded/streamed for a few minutes or more:

Help --> Logfiles --> Upload Current/Last Logfile.
Copy and paste the hyperlink OBS Studio gives you into a reply on this thread you have going and I or someone else will/should be able to assist you with further troubleshooting.

It gives a much more verbose logfile than you can copy/paste due to the character limits in Code format on the forum.
its still lagging so here is the log

https://gist.github.com/d3a9a1c20fa2c4c49522c75970319f01
 

Harold

Active Member
14:22:31.523: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 12082 (31.9%)
You're overloading your video card.
 

Powsa

New Member
14:22:31.523: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 12082 (31.9%)
You're overloading your video card.

Im pretty new with stream so how do I fix this XD and not a pro with computers
 
I don't own a 1060 6GB GPU & i7 6700k, so can't give you an idea of what to expect in terms of performance.
I also do not play PUBG so I can't help you much with game optimization for PUBG...

If you do not, cap your fps to 60 (61-63 if you notice screen-tearing might help reduce it) This will help greatly to reduce load on your GPU.
If you are still having rendering lag after capping your fps or you already cap your fps, you need to lower your graphics settings in-game.

I did a 1060 6GB graphics comparison for PUBG on YouTube, came up with:
https://www.youtube.com/watch?v=yCYaWc9UX-g

Noting his CPU is an i7 7700k, which on the market is currently the best bang for buck for gaming, your fps if you overclock your 6700k will be a little lower than his, then a little lower again when streaming.

In terms of graphics settings quality vs. performance cost the general rule of thumb for GPU load (In order of highest to lowest load) is:
Anti-Aliasing - MSAA options
View Distance
Shadows
Particle Effects
Ambient Occlusion
Texture Quality - Environment
Texture Quality - Player/NPC
Post Processing Anti-Aliasing - FXAA/SMAA

To optimize the quality vs. performance cost of graphics settings, find multiple locations (Similar to in the video, doesn't have to be the same) and test each change individually, you will need to test each change multiple times as PUBG is a multiplayer game, so it can be variable on system resources. This will take a while.

You could also try 720p60fps, CBR 3500 for streaming, it will likely look a bit better as well than 1080p30fps. Your CPU & GPU should be able to handle 1080p60fps streaming though.

Lastly, I don't stream and never intend to, so can't really assist with very technical streaming issues, though your current logfile shows you aren't having any bandwidth issues whilst streaming. Your settings for streaming are pretty low though, go for getting the streaming output smooth first, then work on this part after.

Can you upload another logfile after you troubleshoot, hopefully can assist in getting a good quality smooth stream output for you.

Hope this helps!
 

That_Deep_One

New Member
13:56:01.734: video device: Logitech HD Pro Webcam C920
13:56:01.734: video path: \\?\usb#vid_046d&pid_082d&mi_00#6&1c146c2d&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083}
13:56:01.734: resolution: 1920x1080
13:56:01.734: fps: 30.00 (interval: 333333)
13:56:01.734: format: I420

your webcams resolution is way too high, takes alot of resources try to scale it down
 

Powsa

New Member
So this lag only occurs when I stream on 64bit but on 32bit its fine. But I have a 64bit system for ma pc....
 
13:56:01.734: video device: Logitech HD Pro Webcam C920
13:56:01.734: video path: \\?\usb#vid_046d&pid_082d&mi_00#6&1c146c2d&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{bbefb6c7-2fc4-4139-bb8b-a58bba724083}
13:56:01.734: resolution: 1920x1080
13:56:01.734: fps: 30.00 (interval: 333333)
13:56:01.734: format: I420

your webcams resolution is way too high, takes alot of resources try to scale it down
Missed that one, sorry about that. Definitely need to reduce your webcam resolution, 720p30fps is about the max you want to go for a webcam.

So this lag only occurs when I stream on 64bit but on 32bit its fine. But I have a 64bit system for ma pc....
There should not be any reason for less performance with the 64-bit client, if anything it should be the opposite.

Can you try running OBS in high priority (There is a setting available in OBS --> Settings --> Advanced, top of the list) as well as an Administrator (Right-click on the desktop icon, select Properties, select Compatibility tab, bottom of that tab check the box next to 'Run this program as an Administrator')

Can you do another stream attempt for a few minutes please then upload the current logfile, will try to troubleshoot more.
 
Top