Question / Help Lots of frames dropped from stream but game is fine

pwinky

New Member
Hi I'm getting extremely choppy streams however in-game I have no problems with no FPS drop and low ping. I'm using dxtory to capture the game fullscreen. I'll attach the logs I've done with different settings all with massive lag in the stream. What I've noticed is that the upload speed (is that what it is?) is normal at the menu until I go into a server then it starts to drop to 0 and very rarely spikes upwards.

Also here I made a really short VOD on twitch. http://www.twitch.tv/camelcast/b/337543503

My computer specs are:
i5 2500k running at 4.5ghz
AMD Radeon 7950
8GB Ram

My internet speedtest is as follows:


Code:
Open Broadcaster Software v0.43a - 32bit (´・ω・`)
-------------------------------
CPU Name: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
CPU Speed: 3299MHz
Physical Memory:  4095MB Total, 4095MB Free
stepping id: 7, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 4
------------------------------------------
Adapter 1
  Video Adapter: AMD Radeon HD 7900 Series
  Video Adapeter Dedicated Video Memory: 3195297792
  Video Adapeter Shared System Memory: 4016097280
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    quality: 6
    preset: veryfast
    i444: no
    max bitrate: 2000
    buffer size: 4300
------------------------------------------
Total frames rendered: 1960, number of frames that lagged: 9 (0.46%) (it's okay for some frames to lag)
=====Stream End=======================================================================
Send Buffer Size: 32768
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    quality: 6
    preset: veryfast
    i444: no
    max bitrate: 2000
    buffer size: 4300
------------------------------------------
Total frames rendered: 2127, number of frames that lagged: 7 (0.33%) (it's okay for some frames to lag)
Number of b-frames dropped: 1035, Number of p-frames dropped: 0
=====Stream End=======================================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 3.914 ms] [avg calls per frame: 1] [children: 82.7%] [unaccounted: 17.3%]
| scene->Preprocess - [31.8%] [avg time: 1.246 ms] [avg calls per frame: 1]
| video encoding and uploading - [50.9%] [avg time: 1.991 ms] [avg calls per frame: 1] [children: 23.6%] [unaccounted: 27.2%]
| | CopyResource - [0.23%] [avg time: 0.009 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [0.0511%] [avg time: 0.002 ms] [avg calls per frame: 0]
| | call to encoder - [23.4%] [avg time: 0.914 ms] [avg calls per frame: 0]
==============================================================

Code:
Open Broadcaster Software v0.43a - 32bit (´・ω・`)
-------------------------------
CPU Name: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
CPU Speed: 3299MHz
Physical Memory:  4095MB Total, 4095MB Free
stepping id: 7, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 4
------------------------------------------
Adapter 1
  Video Adapter: AMD Radeon HD 7900 Series
  Video Adapeter Dedicated Video Memory: 3195297792
  Video Adapeter Shared System Memory: 4016097280
Send Buffer Size: 8192
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 45
    width: 1280, height: 720
    quality: 6
    preset: veryfast
    i444: no
    max bitrate: 3000
    buffer size: 3500
------------------------------------------
Total frames rendered: 6958, number of frames that lagged: 11 (0.16%) (it's okay for some frames to lag)
Number of b-frames dropped: 3468, Number of p-frames dropped: 0
=====Stream End=======================================================================
Send Buffer Size: 16384
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 45
    width: 1280, height: 720
    quality: 6
    preset: veryfast
    i444: no
    max bitrate: 3000
    buffer size: 3500
------------------------------------------
Total frames rendered: 3826, number of frames that lagged: 5 (0.13%) (it's okay for some frames to lag)
Number of b-frames dropped: 2348, Number of p-frames dropped: 0
=====Stream End=======================================================================
Send Buffer Size: 32768
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 45
    width: 1280, height: 720
    quality: 6
    preset: veryfast
    i444: no
    max bitrate: 3000
    buffer size: 3500
------------------------------------------
Total frames rendered: 3656, number of frames that lagged: 5 (0.14%) (it's okay for some frames to lag)
Number of b-frames dropped: 2226, Number of p-frames dropped: 0
=====Stream End=======================================================================
Send Buffer Size: 32768
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 45
    width: 1280, height: 720
    quality: 9
    preset: veryfast
    i444: no
    max bitrate: 3000
    buffer size: 3500
------------------------------------------
Total frames rendered: 5623, number of frames that lagged: 7 (0.12%) (it's okay for some frames to lag)
Number of b-frames dropped: 3373, Number of p-frames dropped: 0
=====Stream End=======================================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 3.776 ms] [avg calls per frame: 1] [children: 88.5%] [unaccounted: 11.5%]
| scene->Preprocess - [30.9%] [avg time: 1.167 ms] [avg calls per frame: 1]
| video encoding and uploading - [57.6%] [avg time: 2.176 ms] [avg calls per frame: 1] [children: 26.9%] [unaccounted: 30.7%]
| | CopyResource - [0.371%] [avg time: 0.014 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [0.106%] [avg time: 0.004 ms] [avg calls per frame: 0]
| | call to encoder - [26.4%] [avg time: 0.997 ms] [avg calls per frame: 0]
==============================================================
 

R1CH

Forum Admin
Developer
Try changing which server you are streaming to and maybe try a lower send buffer like 8k or 4k. Dropped frames occur when network conditions prevent OBS from sending data fast enough to the streaming server.
 

pwinky

New Member
You were right thanks! I think the server was having trouble receiving my data. I get smoother streams when I connect to a server on the other side of the world instead of the country I live in.

Just to clarify what exactly does max bitrate and buffersize actually affect? If I leave all other settings the same and change these 2 what would that achieve? From what I have read it seems that a higher value improves the quality of the image. Correct me if I'm wrong.

Also what does send buffer size do?

Thanks for the quick reply and advice.
 

R1CH

Forum Admin
Developer
Bitrate determines how many kbps the stream is generally encoded at. This has the biggest effect on quality, the higher the bitrate, the better the stream, but keep in mind your viewers also need a similar bitrate on their internet connection to be able to watch (eg streaming at 3000kbps means no one with 2mbps internet can watch).

Buffersize determines how big of a buffer is used that x264 fills with frames. The smaller the buffer, the closer to the bitrate setting the stream will be. A larger buffer means it can spike a lot higher than the bitrate you set. It essentially trades consistency for quality. In general, your buffer size should be the same as your bitrate if you don't wany any surprises.
 

pwinky

New Member
So if I were to use a way higher buffer size that would mean that if the stream were to spike it would result in dropped frames if my connection is not able to upload all the data?

You should add your examples into the next version of the help file.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
The "send buffer" in advanced settings keeps data stored until it reaches a certain amount, then (usually) sends it out all at once in bigger bursts. The benefit of doing this in layman terms is that you can get much better bandwidth usage by doing so, but you don't want to set it high if you're streaming multiplayer games as it can affect the game, so it's recommended to just leave it at default.

As for video encoding buffer size, I don't quite understand the entire math behind it, but from my tests it can seem to cause larger "spikes" if you set it too high above the bitrate. It does not change your average overall stream bitrate, however. It could result in dropped frames if it's too high.. Feel free to experiment with it if you wish. Worst thing you'd get is dropped frames.
 

ruxxar

New Member
pwinky said:
So if I were to use a way higher buffer size that would mean that if the stream were to spike it would result in dropped frames if my connection is not able to upload all the data?

Correct. This is essentially what I had an issue with. The solution is to lower your buffer size.

Use this formula : (1 sec + (bufsize/maxrate)) * maxrate/1 = max spike over 1 second.
 

pwinky

New Member
Alright thanks so much for the replies. Now I feel more informed and better equipped to help some of my friends setup their own streams.
 
Top