Bug Report Lagging when streaming in youtube and any platform

carlmmii

Active Member
Your GPU is getting overloaded, which is causing rendering and encoding lag.

First off, turn off game mode (follow these directions). After that, ensure you have a cap on your game's framerate (either by using vsync or by setting a maximum framerate limit), and lower your graphics settings so that you're able to maintain that framerate.

Also, you can try turning off psycho visual tuning, as that uses extra GPU power.
 

medusagg

New Member
Your GPU is getting overloaded, which is causing rendering and encoding lag.

First off, turn off game mode (follow these directions). After that, ensure you have a cap on your game's framerate (either by using vsync or by setting a maximum framerate limit), and lower your graphics settings so that you're able to maintain that framerate.

Also, you can try turning off psycho visual tuning, as that uses extra GPU power.


thankyou for response . ill try everything to make my gpu can load more .
but will u recomend if im using x264 ?
can my ryzen 5 1500x handle it ?
 

medusagg

New Member
Your GPU is getting overloaded, which is causing rendering and encoding lag.

First off, turn off game mode (follow these directions). After that, ensure you have a cap on your game's framerate (either by using vsync or by setting a maximum framerate limit), and lower your graphics settings so that you're able to maintain that framerate.

Also, you can try turning off psycho visual tuning, as that uses extra GPU power.


well everythings looks so good now , but i have 1 more question . why is my live stream looks so bad .i put res 720 but looks like 360 , im using 3500-4000 bitrate
 

choper

Member
Your GPU is getting overloaded
Since past saturday; https://obsproject.com/forum/threads/one-day-to-another-youtube-streaming-is-lagging-choppy.102669/

I'm getting more or less the same problem, I try to stream with no changes on configs, no new software installed and same parameters.. and my stream on YT is choppy.

But my GPU ( 1080ti ) is working "only" at 56% or a bit more (because is not a huge demand game at all). So my gpu is not overloaded by any means. Is weird and I'm turning mad cause I dont get the point of this. Maybe a normal windows update... I don't know.

I started to use new OBS with new nvenc since Wenesday and no problems at all, I made 3 lives in YT at 1440p perfectly but this saturday I was preparing all and was hell of choopy.

If you or anyother can bring me some help please I will be very glad.
 

choper

Member
Same thing, need to see a log file.
There is one inside that thread I post it.

Anyway I'm doing lot of testing and for exacple in the last one I change B-frames to 1, in Sekiro, and the test stream was awesome like before (not that much)
 
Last edited:

carlmmii

Active Member
That log doesn't show any type of recording/streaming attempt, so there's nothing to go off of for what problems you may be having.

Make sure you grab the correct log file for an actual recording/streaming session.
 

carlmmii

Active Member
That's what I'm trying to tell you -- there's not a stream attempt in those logs. It's the wrong log file.
 

choper

Member
That's what I'm trying to tell you -- there's not a stream attempt in those logs. It's the wrong log file.
I found these lines on another log, what do you think about this:
01:44:10.747: ==== Startup complete ===============================================
01:44:10.753: All scene data cleared
01:44:10.753: ------------------------------------------------
01:44:10.768: WASAPI: Device 'Altavoces (Realtek High Definition Audio)' initialized
01:44:10.904: adding 85 milliseconds of audio buffering, total audio buffering is now 85 milliseconds (source: Mic/Aux)
01:44:10.904:
01:44:10.946: adding 21 milliseconds of audio buffering, total audio buffering is now 106 milliseconds (source: Mic/Aux)
01:44:10.946:
01:44:10.953: WASAPI: Device 'Micrófono (Realtek High Definition Audio)' initialized
01:44:11.133: warning: deprecated pixel format used, make sure you did set range correctly
01:44:11.133: warning: Warning: data is not aligned! This can lead to a speed loss
01:44:11.173: Switched to scene 'Escena'
01:44:11.174: [game-capture: 'Capturar Juego'] attempting to hook process: sekiro.exe
01:44:11.175: ------------------------------------------------
01:44:11.175: Loaded scenes:
01:44:11.175: - scene 'Escena':
01:44:11.175: - source: 'Imagen' (image_source)
01:44:11.175: - source: 'Capturar Juego' (game_capture)
01:44:11.175: - source: 'Imagen 2' (image_source)
01:44:11.175: - filter: 'Corrección de color' (color_filter)
01:44:11.176: - source: 'Dispositivo de captura de video' (dshow_input)
01:44:11.176: - filter: 'Fondro croma' (chroma_key_filter)
01:44:11.176: - filter: 'Filtro de enfoque' (sharpness_filter)
01:44:11.176: - filter: 'Desplazamiento' (scroll_filter)
01:44:11.176: - filter: 'Recortar/Acolchar' (crop_filter)
01:44:11.176: - source: 'Imagen 4' (image_source)
01:44:11.176: ------------------------------------------------
01:44:11.176: [game-capture: 'Capturar Juego'] shared texture capture successful
01:44:11.196: ---------------------------------
01:44:11.196: [DShow Device: 'Dispositivo de captura de video'] settings updated:
01:44:11.196: video device: c922 Pro Stream Webcam
01:44:11.196: video path: \\?\usb#vid_046d&pid_085c&mi_00#6&1fd2bc46&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
01:44:11.196: resolution: 960x720
01:44:11.196: fps: 30.00 (interval: 333333)
01:44:11.196: format: MJPEG
01:44:11.218: using video device audio: no
01:44:11.218: audio device: Micrófono (Realtek High Definition Audio)
01:44:11.218: sample rate: 44100
01:44:11.218: channels: 2
01:44:11.218: audio type: Capture
01:44:11.218: DShow: HDevice::ConnectPins: failed to connect pins (0x80040207):
01:46:55.009: [jim-nvenc] settings:
01:46:55.009: rate_control: CBR
01:46:55.009: bitrate: 18000
01:46:55.009: cqp: 20
01:46:55.009: keyint: 120
01:46:55.009: preset: mq
01:46:55.009: profile: high
01:46:55.009: width: 2560
01:46:55.009: height: 1440
01:46:55.009: 2-pass: true
01:46:55.009: b-frames: 2
01:46:55.009: lookahead: false
01:46:55.009: psycho_aq: true
01:46:55.009:
01:46:55.020: [CoreAudio AAC: 'Track1']: settings:
01:46:55.020: mode: AAC
01:46:55.020: bitrate: 160
01:46:55.020: sample rate: 48000
01:46:55.020: cbr: on
01:46:55.020: output buffer: 1536
01:46:55.020: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtmp://a.rtmp.youtube.com/live2...
01:46:55.068: [rtmp stream: 'adv_stream'] Interface: Intel(R) Ethernet Connection (2) I219-V (ethernet, 1000 mbps)
01:46:55.488: [rtmp stream: 'adv_stream'] Connection to rtmp://a.rtmp.youtube.com/live2 successful
01:46:55.491: ==== Streaming Start ===============================================
01:46:56.494: adding 85 milliseconds of audio buffering, total audio buffering is now 192 milliseconds (source: Dispositivo de captura de video)
01:46:56.494:
01:46:56.556: [game-capture: 'Capturar Juego'] d3d11 shared texture capture successful
01:46:56.559: [game-capture: 'Capturar Juego'] shared texture capture successful
01:52:11.316: [game-capture: 'Capturar Juego'] capture window no longer exists, terminating capture
01:52:11.316: [game-capture: 'Capturar Juego'] capture stopped
01:52:11.326: [game-capture: 'Capturar Juego'] attempting to hook process: sekiro.exe
01:52:11.330: [game-capture: 'Capturar Juego'] d3d11 shared texture capture successful
01:52:11.342: [game-capture: 'Capturar Juego'] shared texture capture successful
01:52:11.708: [game-capture: 'Capturar Juego'] capture window no longer exists, terminating capture
01:52:11.709: [game-capture: 'Capturar Juego'] capture stopped
01:52:22.242: [rtmp stream: 'adv_stream'] User stopped the stream
01:52:22.242: Output 'adv_stream': stopping
01:52:22.242: Output 'adv_stream': Total frames output: 19586
01:52:22.242: Output 'adv_stream': Total drawn frames: 16465 (19634 attempted)
01:52:22.242: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 3169 (16.1%)
01:52:22.242: Video stopped, number of skipped frames due to encoding lag: 3559/19602 (18.2%)
01:52:22.244: ==== Streaming Stop ================================================
 

carlmmii

Active Member
There we go, that's the information that's needed.
Code:
01:52:22.242: Output 'adv_stream': stopping
 01:52:22.242: Output 'adv_stream': Total frames output: 19586
 01:52:22.242: Output 'adv_stream': Total drawn frames: 16465 (19634 attempted)
01:52:22.242: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 3169 (16.1%)
01:52:22.242: Video stopped, number of skipped frames due to encoding lag: 3559/19602 (18.2%)
The rendering lag is your main issue. The encoding lag is a byproduct.


Code:
01:46:55.009: [jim-nvenc] settings:
 01:46:55.009:     rate_control: CBR
 01:46:55.009:     bitrate:      18000
 01:46:55.009:     cqp:          20
 01:46:55.009:     keyint:       120
 01:46:55.009:     preset:       mq
 01:46:55.009:     profile:      high
 01:46:55.009:     width:        2560
 01:46:55.009:     height:       1440
 01:46:55.009:     2-pass:       true
 01:46:55.009:     b-frames:     2
 01:46:55.009:     lookahead:    false
 01:46:55.009:     psycho_aq:    true
Change your preset from "Max Quality" to "Quality", and turn off Psycho Visual Tuning. Both of these options leverage CUDA, which requires more GPU usage for encoding... which is more than likely causing both the rendering and encoding lag.
 

choper

Member
Change your preset from "Max Quality" to "Quality", and turn off Psycho Visual Tuning. Both of these options leverage CUDA, which requires more GPU usage for encoding... which is more than likely causing both the rendering and encoding lag.
But is weird because I'm using those settings in the last tests that were nicely with good quality. And the game is using 45 to 50% GPU usage and even less cpu (is Sekiro), in a 1080ti... In fact My 3 first streams were with those settings cause was the fist config I use following the "official" guide for new nvenc so I'm still confuse about why first three days ok and the next one bad.

Anyway I'm goint to test with those two parameters and let's see, thanks for the help mate.


What do you think about the last post the user "Hope" made ?; https://obsproject.com/forum/threads/stutters-in-preview-window-and-stream.102798/#post-398762

That difference between fullscreen and windowed..
 
Last edited:

carlmmii

Active Member
Going to be 100% dependent on the game, how windows is feeling, how relative loading is on GPU and CPU, what other programs you're running, etc. There's no way to know what's going to work better until you try it for yourself, in your own environment.

That said, for most things fullscreen will force windows to allocate more priority to the fullscreen application... which is why one of the big recommendations is to turn off full screen optimizations for the program, so that it doesn't steal GPU resources from OBS.
 

choper

Member
I'm testing right now; one with Max Quality and Psycho off and another one with Quality and Psycho on.. and I would say that the last one with pyscho on and quality preset looks and runs better. Pretty much like ingame.

I made another with Quality and Psycho off, and it looks worst than the other two. Supposed to runs better but is worse wtf..

(Hope I found the good spot)
 
Last edited:
Top