Question / Help Lagging stream vs pixelated stream - can't find balance

rolnik591

New Member
Okay, so i'm using obs for about 1 month and i think i've tried almost everything, but i don't know what i didn't tried yet (i just got lost :| )
So, at the beginning when i started setting up the obs, stream was very, VERY pixelated... It was running smoothly but it was VERY pixelated (standing parts was ok, but whenever camera moved it was not watchable...)
I was starting to give up and yesterday I started to look more about my PC specs and streaming...
Now i have another problem... Stream is very clear, HD, 0 pixelating, BUT VERY LAGGY (pixels was better but still not watchable :P )
My PC specs:
CPU: AMD Phenom II x4 965 BE 3.4 ghz
GPU: ASUS nVidia gtx 550 ti
RAM: 8 gb

I think it's enough you need to know...
Link to the lagging video (l4d2, today): http://www.twitch.tv/rolnik591/b/427409273

Log from this stream:
05:25:37: Open Broadcaster Software v0.522b - 32bit (´・ω・`)
05:25:37: -------------------------------
05:25:37: CPU Name: AMD Phenom(tm) II X4 965 Processor
05:25:37: CPU Speed: 3422MHz
05:25:37: Physical Memory: 4095MB Total, 4095MB Free
05:25:37: stepping id: 3, model 4, family 15, type 0, extmodel 8, extfamily 0, HTT 1, logical cores 4, total cores 4
05:25:37: monitor 1: pos={0, 0}, size={1680, 1050}
05:25:37: Windows Version: 6.1 Build 7601 S
05:25:37: Aero is Enabled
05:25:37: -------------------------------
05:25:37: OBS Modules:
05:25:37: Base Address Module
05:25:37: 00F60000 OBS.exe
05:25:37: 6D5F0000 OBSApi.dll
05:25:37: 70190000 DShowPlugin.dll
05:25:37: 70170000 GraphicsCapture.dll
05:25:37: 70150000 NoiseGate.dll
05:25:37: ------------------------------------------
05:25:37: Adapter 1
05:25:37: Video Adapter: NVIDIA GeForce GTX 550 Ti
05:25:37: Video Adapter Dedicated Video Memory: 1025179648
05:25:37: Video Adapter Shared System Memory: 3220779008
05:25:37: Using automatic low latency mode
05:25:37: =====Stream Start: 2013-07-08, 05:25:37===============================================
05:25:37: Multithreaded optimizations: On
05:25:37: Base resolution: 1280x720
05:25:37: Output resolution: 1280x720
05:25:37: ------------------------------------------
05:25:37: Loading up D3D10...
05:25:37: Playback device Default
05:25:37: ------------------------------------------
05:25:37: Using desktop audio input: Głośniki (Realtek High Definition Audio)
05:25:37: ------------------------------------------
05:25:37: Using auxilary audio input: Mikrofon (Realtek High Definition Audio)
05:25:37: ------------------------------------------
05:25:37: Audio Encoding: AAC
05:25:37: bitrate: 128
05:25:37: Using graphics capture
05:25:38: ------------------------------------------
05:25:38: Video Encoding: x264
05:25:38: fps: 30
05:25:38: width: 1280, height: 720
05:25:38: preset: veryfast
05:25:38: CBR: no
05:25:38: CFR: no
05:25:38: max bitrate: 5000
05:25:38: buffer size: 5000
05:25:38: quality: 7
05:25:38: ------------------------------------------
05:25:38: SharedTexCapture hooked
05:25:39: Using RTMP service: Twitch / Justin.tv
05:25:39: Server selection: rtmp://live-ams.justin.tv/app
05:25:41: SO_SNDBUF was at 8192
05:25:41: SO_SNDBUF is now 65536
05:26:21: GraphicsCaptureSource::NewCapture: eliminating old capture
05:26:21: SharedTexCapture hooked
05:28:26: Total frames rendered: 5048, number of frames that lagged: 19 (0.38%) (it's okay for some frames to lag)
05:28:26: RTMPPublisher::SocketLoop: Aborting due to bStopping
05:28:26: Number of times waited to send: 0, Waited for a total of 0 bytes
05:28:26: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
05:28:26: =====Stream End: 2013-07-08, 05:28:26=================================================
05:33:26: =====Stream Start: 2013-07-08, 05:33:26===============================================
05:33:26: Multithreaded optimizations: On
05:33:26: Base resolution: 1280x720
05:33:26: Output resolution: 1280x720
05:33:26: ------------------------------------------
05:33:26: Loading up D3D10...
05:33:26: Playback device Default
05:33:26: ------------------------------------------
05:33:26: Using desktop audio input: Głośniki (Realtek High Definition Audio)
05:33:26: ------------------------------------------
05:33:26: Using auxilary audio input: Mikrofon (Realtek High Definition Audio)
05:33:26: ------------------------------------------
05:33:26: Audio Encoding: AAC
05:33:26: bitrate: 128
05:33:26: Using graphics capture
05:33:26: Using graphics capture
05:33:26: ------------------------------------------
05:33:26: Video Encoding: x264
05:33:26: fps: 30
05:33:26: width: 1280, height: 720
05:33:26: preset: veryfast
05:33:26: CBR: no
05:33:26: CFR: no
05:33:26: max bitrate: 5000
05:33:26: buffer size: 5000
05:33:26: quality: 7
05:33:26: ------------------------------------------
05:33:32: SharedTexCapture hooked
Warning -- D3D10Texture::CreateFromSharedHandle: Failed to open shared handle, result = 0x80070057
Warning -- SharedTexCapture::Init: Could not create shared texture
05:35:04: SharedTexCapture hooked
05:35:21: Total frames rendered: 3401, number of frames that lagged: 9 (0.26%) (it's okay for some frames to lag)
05:35:21: =====Stream End: 2013-07-08, 05:35:21=================================================
05:35:25: Using automatic low latency mode
05:35:25: =====Stream Start: 2013-07-08, 05:35:25===============================================
05:35:25: Multithreaded optimizations: On
05:35:25: Base resolution: 1280x720
05:35:25: Output resolution: 1280x720
05:35:25: ------------------------------------------
05:35:25: Loading up D3D10...
05:35:25: Playback device Default
05:35:25: ------------------------------------------
05:35:25: Using desktop audio input: Głośniki (Realtek High Definition Audio)
05:35:25: ------------------------------------------
05:35:25: Using auxilary audio input: Mikrofon (Realtek High Definition Audio)
05:35:25: ------------------------------------------
05:35:25: Audio Encoding: AAC
05:35:25: bitrate: 128
05:35:25: Using graphics capture
05:35:25: Using graphics capture
05:35:25: ------------------------------------------
05:35:25: Video Encoding: x264
05:35:25: fps: 30
05:35:25: width: 1280, height: 720
05:35:25: preset: veryfast
05:35:25: CBR: no
05:35:25: CFR: no
05:35:25: max bitrate: 5000
05:35:25: buffer size: 5000
05:35:25: quality: 7
05:35:25: ------------------------------------------
05:35:25: SharedTexCapture hooked
05:35:27: Using RTMP service: Twitch / Justin.tv
05:35:27: Server selection: rtmp://live-ams.justin.tv/app
05:35:28: SO_SNDBUF was at 8192
05:35:28: SO_SNDBUF is now 65536
05:35:51: GraphicsCaptureSource::NewCapture: eliminating old capture
05:35:51: SharedTexCapture hooked
05:36:47: Total frames rendered: 2440, number of frames that lagged: 4 (0.16%) (it's okay for some frames to lag)
05:36:47: RTMPPublisher::SocketLoop: Aborting due to bStopping
05:36:47: Number of times waited to send: 0, Waited for a total of 0 bytes
05:36:47: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
05:36:47: =====Stream End: 2013-07-08, 05:36:47=================================================
05:37:29: Using automatic low latency mode
05:37:29: =====Stream Start: 2013-07-08, 05:37:29===============================================
05:37:29: Multithreaded optimizations: On
05:37:29: Base resolution: 1280x720
05:37:29: Output resolution: 1280x720
05:37:29: ------------------------------------------
05:37:29: Loading up D3D10...
05:37:29: Playback device Default
05:37:29: ------------------------------------------
05:37:29: Using desktop audio input: Głośniki (Realtek High Definition Audio)
05:37:29: ------------------------------------------
05:37:29: Using auxilary audio input: Mikrofon (Realtek High Definition Audio)
05:37:29: ------------------------------------------
05:37:29: Audio Encoding: AAC
05:37:29: bitrate: 128
05:37:29: Using graphics capture
05:37:29: Using graphics capture
05:37:29: ------------------------------------------
05:37:29: Video Encoding: x264
05:37:29: fps: 30
05:37:29: width: 1280, height: 720
05:37:29: preset: veryfast
05:37:29: CBR: no
05:37:29: CFR: no
05:37:29: max bitrate: 5000
05:37:29: buffer size: 5000
05:37:29: quality: 7
05:37:29: ------------------------------------------
05:37:29: SharedTexCapture hooked
05:37:31: Using RTMP service: Twitch / Justin.tv
05:37:31: Server selection: rtmp://live-ams.justin.tv/app
05:37:33: SO_SNDBUF was at 8192
05:37:33: SO_SNDBUF is now 65536
06:09:32: Total frames rendered: 57638, number of frames that lagged: 176 (0.31%) (it's okay for some frames to lag)
06:09:32: RTMPPublisher::SocketLoop: Aborting due to loop exit
06:09:32: librtmp error: WriteN, RTMP send error 10035 (79 bytes)
06:09:32: librtmp error: WriteN, RTMP send error 10038 (42 bytes)
06:09:32: Number of times waited to send: 65620, Waited for a total of 216802819 bytes
06:09:32: Number of b-frames dropped: 12789 (22%), Number of p-frames dropped: 31615 (55%), Total 44404 (77%)
06:09:32: =====Stream End: 2013-07-08, 06:09:32=================================================
07:29:25: Using automatic low latency mode
07:29:25: =====Stream Start: 2013-07-08, 07:29:25===============================================
07:29:25: Multithreaded optimizations: On
07:29:25: Base resolution: 1280x720
07:29:25: Output resolution: 1280x720
07:29:25: ------------------------------------------
07:29:26: Loading up D3D10...
07:29:26: Playback device Default
07:29:26: ------------------------------------------
07:29:26: Using desktop audio input: Głośniki (Realtek High Definition Audio)
07:29:26: ------------------------------------------
07:29:26: Using auxilary audio input: Mikrofon (Realtek High Definition Audio)
07:29:26: ------------------------------------------
07:29:26: Audio Encoding: AAC
07:29:26: bitrate: 128
07:29:26: Using graphics capture
07:29:26: Using graphics capture
07:29:26: ------------------------------------------
07:29:26: Video Encoding: x264
07:29:26: fps: 30
07:29:26: width: 1280, height: 720
07:29:26: preset: veryfast
07:29:26: CBR: no
07:29:26: CFR: no
07:29:26: max bitrate: 1500
07:29:26: buffer size: 1500
07:29:26: quality: 7
07:29:26: ------------------------------------------
07:29:27: Using RTMP service: Twitch / Justin.tv
07:29:27: Server selection: rtmp://live-ams.justin.tv/app
07:29:29: SO_SNDBUF was at 8192
07:29:29: SO_SNDBUF is now 65536
07:29:30: SharedTexCapture hooked
07:32:13: GraphicsCaptureSource::NewCapture: eliminating old capture
07:32:13: SharedTexCapture hooked
07:33:13: Total frames rendered: 6803, number of frames that lagged: 30 (0.44%) (it's okay for some frames to lag)
07:33:13: RTMPPublisher::SocketLoop: Aborting due to loop exit
07:33:13: librtmp error: WriteN, RTMP send error 10035 (79 bytes)
07:33:13: librtmp error: WriteN, RTMP send error 10038 (42 bytes)
07:33:13: Number of times waited to send: 5154, Waited for a total of 15439733 bytes
07:33:13: Number of b-frames dropped: 1292 (19%), Number of p-frames dropped: 1729 (26%), Total 3021 (45%)
07:33:13: =====Stream End: 2013-07-08, 07:33:13=================================================
07:42:49: =====Stream Start: 2013-07-08, 07:42:49===============================================
07:42:49: Multithreaded optimizations: On
07:42:49: Base resolution: 1280x720
07:42:49: Output resolution: 1280x720
07:42:49: ------------------------------------------
07:42:49: Loading up D3D10...
07:42:49: Playback device Default
07:42:49: ------------------------------------------
07:42:49: Using desktop audio input: Głośniki (Realtek High Definition Audio)
07:42:49: ------------------------------------------
07:42:49: Using auxilary audio input: Mikrofon (Realtek High Definition Audio)
07:42:49: ------------------------------------------
07:42:49: Audio Encoding: AAC
07:42:49: bitrate: 128
07:42:49: Using graphics capture
07:42:49: Using graphics capture
07:42:49: ------------------------------------------
07:42:49: Video Encoding: x264
07:42:49: fps: 25
07:42:49: width: 1280, height: 720
07:42:49: preset: veryfast
07:42:49: CBR: no
07:42:49: CFR: no
07:42:49: max bitrate: 1920
07:42:49: buffer size: 1920
07:42:49: quality: 7
07:42:49: ------------------------------------------
07:42:49: SharedTexCapture hooked
07:42:50: Using RTMP service: Twitch / Justin.tv
07:42:50: Server selection: rtmp://live-ams.justin.tv/app
07:42:52: SO_SNDBUF was at 8192
07:42:52: SO_SNDBUF is now 65536
07:59:58: Total frames rendered: 25726, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
07:59:58: RTMPPublisher::SocketLoop: Aborting due to loop exit
07:59:58: librtmp error: WriteN, RTMP send error 10035 (79 bytes)
07:59:58: librtmp error: WriteN, RTMP send error 10038 (42 bytes)
07:59:58: Number of times waited to send: 384, Waited for a total of 1323674 bytes
07:59:58: Number of b-frames dropped: 2042 (8%), Number of p-frames dropped: 13202 (52%), Total 15244 (60%)
07:59:58: =====Stream End: 2013-07-08, 07:59:58=================================================
08:01:16:
08:01:16: Profiler results:
08:01:16:
08:01:16: ==============================================================
08:01:16: frame - [100%] [avg time: 3.131 ms] [avg calls per frame: 1] [children: 80.5%] [unaccounted: 19.5%]
08:01:16: | scene->Preprocess - [0.0319%] [avg time: 0.001 ms] [avg calls per frame: 1]
08:01:16: | video encoding and uploading - [80.5%] [avg time: 2.521 ms] [avg calls per frame: 1] [children: 68.4%] [unaccounted: 12.1%]
08:01:16: | | CopyResource - [0.798%] [avg time: 0.025 ms] [avg calls per frame: 0]
08:01:16: | | conversion to 4:2:0 - [1.79%] [avg time: 0.056 ms] [avg calls per frame: 0]
08:01:16: | | call to encoder - [64.4%] [avg time: 2.015 ms] [avg calls per frame: 0]
08:01:16: | | sending stuff out - [1.47%] [avg time: 0.046 ms] [avg calls per frame: 0]
08:01:16: ==============================================================
08:01:16:

And i took settings from this thread: https://obsproject.com/forum/viewtopic.php?f=5&t=2900
This guy had the same pc specs and that config worked well for him so i thought it will work as well for me... aaand, i've never been so wrong :/

in this log there is also streams with higher and lower bitrate (1500 and 5000) but it all just looks the same :/

EDIT: Oh, and now i've read that i put this thread in wrong place X.x (at least i think so...)
 

Kharay

Member
Reducing the frameloss in OBS:

Step 1: Lower the settings in whatever game you're playing to the point where it does not look all that different but you do increase the FPS. Things to consider are reducing shadows, reducing or disabling physics, reducing or disabling post-processing, lowering the shader quality level a bit.

Step 2: Grab the test version of OBS.

Step 3: Enable OpenCL in OBS (Advanced, custom x264 parameters, add opencl=true

The goal here is to free up enough CPU and GPU cycles to make sure the frameloss in OBS is reduced as much as possible whilst not making the game look all that different. Honestly, on-stream things like post-processing and physics aren't nearly as important as high quality textures and so forth. A game can still look very much the same even without all the fluff.

Finding the balance

Step 1: Run an upload test on testmy.net, to a server near you or near the Twitch.TV server you're streaming to (make sure both are as near as you as possible).

Step 2: Encoding -> Quality 7. Max Bitrate: Use the information provided by testmy.net to find some reasonable max bitrate. For the record, 5000 really is excessive and actually is frowned upon by the Twitch.TV staff themselves. Their own recommendation is to never go over 3500-ish. You don't need OVER9000 bitrate to find the proper balance between fidelity and framerate. In most cases 3000 actually is more than sufficient to even stream 1080p in 30 FPS at a very watchable quality.
 

rolnik591

New Member
I'm not sure about lowering the settings in game will help because the game runs like a charm but not stream, but i'll try everything you suggested and post the results.
 

FerretBomb

Active Member
The problem here is your network connection.

A) You have it set to 5000kbps. This is EXTREMELY high, and unnecessary for a 720p stream. Also, the Twitch servers dislike being sent a stream any higher than 3500kbps.

B) The extreme amount of frame-droppage means that you do NOT have 5000kbps constant throughput available. Even if your ISP says so, even if speedtest.net says so (it tests dead-file transfers), you don't. Go run a 6MB test at http://testmy.net/upload to get a real-world read on about how much actual constant upstream throughput you have available. Note that you'll also need to leave some margin for any online-multiplayer communication for the game itself, as well as some for upstream congestion and other unexpected conditions/routing problems/etc.

Dropped frames = network issue. End of.
Lagged frames = local issue with your system.

If possible (and within the testmy results) I'd drop to 3000 or 3500kbps bitrate, quality of 8-10 (or just go to CBR if you don't want to mess with it) and see how things run from there.
 

Kharay

Member
FerretBomb said:
quality of 8-10
10 is retarded and unnecessary... end of.

It adds VERY little quality, if any at all, over 7... at the cost of a massive increase in bandwidth. Tested, tried and thrown into the trash, end of.
 

FerretBomb

Active Member
Kharay said:
FerretBomb said:
quality of 8-10
10 is retarded and unnecessary... end of.

It adds VERY little quality, if any at all, over 7... at the cost of a massive increase in bandwidth. Tested, tried and thrown into the trash, end of.
Says the guy advising people to use Quality 0?
And no, I've noticed significantly greater image fidelity at Q10, even compared to Q8.

Please stop giving people bad advice.
 

dodgepong

Administrator
Community Helper
Later on in his log he tried 1500 and 1920kbps and they both still dropped frames, so I'm sure it's an issue with upload speed.

I actually recommend using CBR and forgetting the issue of Quality balance. The estimator needs to be updated to not recommend VBR...

Can you run ShaperProbe and post the results? http://www.cc.gatech.edu/~partha/diffpr ... probe.html
 
Top