Question / Help stream lag for viewers

Status
Not open for further replies.

Karol401

Member
People say that stream lags for them but like video only and audio is continuing but not for few viewers but most of them....i tried a lot of settings so if somebody could help i would be gratefull

log: Loading up D3D10...
Playback device Default
------------------------------------------
Using desktop audio input: Speakers (Realtek High Definition Audio)
------------------------------------------
Using auxilary audio input: Microphone (Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
bitrate: 128
Using bitmap image
Using bitmap image
------------------------------------------
device: USB2.0_Camera,
device id \\?\usb#vid_093a&pid_2700&mi_00#7&273bd4ad&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global,
chosen type: YUY2, usingFourCC: false, res: 640x480 - 640x480, frameIntervals: 333333-10000000, fourCC: 'YUY2'
audio device: Disable,
audio device id Disabled,

Using directshow input
Using bitmap image
Using bitmap image
Using bitmap image
------------------------------------------
------------------------------------------
Using Monitor Capture
Using graphics capture
------------------------------------------
Video Encoding: x264
fps: 30
width: 1680, height: 1050
preset: veryfast
CBR: yes
CFR: no
max bitrate: 2000
------------------------------------------
Using RTMP service: Twitch / Justin.tv
Server selection: rtmp://live-ams.justin.tv/app
SO_SNDBUF was at 65536
SO_SNDBUF is now 65536
SharedTexCapture hooked
Total frames rendered: 90487, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
RTMPPublisher::SocketLoop: Aborting due to bStopping
Number of times waited to send: 0, Waited for a total of 0 bytes
Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
=====Stream End: 2013-05-03, 21:12:05=================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 2.254 ms] [avg calls per frame: 1] [children: 92%] [unaccounted: 7.99%]
| scene->Preprocess - [10.8%] [avg time: 0.244 ms] [avg calls per frame: 1]
| video encoding and uploading - [81.2%] [avg time: 1.83 ms] [avg calls per frame: 1] [children: 80.5%] [unaccounted: 0.71%]
| | CopyResource - [0.399%] [avg time: 0.009 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [0.222%] [avg time: 0.005 ms] [avg calls per frame: 0]
| | call to encoder - [75.4%] [avg time: 1.699 ms] [avg calls per frame: 0]
| | sending stuff out - [4.48%] [avg time: 0.101 ms] [avg calls per frame: 0]
==============================================================
 

hilalpro

Member
You're not dropping any frames but that bitrate is too low for that resolution.

Downscale by 1.25, disable cbr and try 1920 bitrate/bufsize at 7 quality
 

hilalpro

Member
More bitrate would mean more bandwidth requirement for your viewers. 1920 shouldn't look too bad since you're streaming LOL
 

dodgepong

Administrator
Community Helper
Leaving CBR enabled should improve viewer experience because bandwidth usage isn't as spiky.
 

dodgepong

Administrator
Community Helper
What exactly are these "tweaks"?

I'm interested to see the source that this data.image was taken from, if you have it.
 

hilalpro

Member
TriAtlasGaming said:
I want those + tweaks please!

Make sure you tick CBR and Then do the following.
[(1/yourFPS)*bitrate] = the custom vbv-bufsize you wanna set. This will ensure that your video buffer is one frame in size and should result in a 100% flat bitrate regardless of what's happening. as long as you're not currently having frame drop/lag issues.
 

hilalpro

Member
64, Though you don't wanna be using cbr just because it looks flat. try quality 7 see if that gives you problems first.
 

Karol401

Member
i tried but i had like few viewers but nobody said anythink about lags. So are there any steps in improving quality without having lags for viewers?
 

dodgepong

Administrator
Community Helper
Then lower your bit rate? If your viewers are lagging, then either their hardware can't watch 1680x1050 video, or their internet speeds can't download ~2000 bit rate video. The best way to make it more viewable for more people is to lower the bit rate, which will obviously lower the quality. At some point you need to decide what the tradeoff is.
 
hilalpro said:
Make sure you tick CBR and Then do the following.
[(1/yourFPS)*bitrate] = the custom vbv-bufsize you wanna set. This will ensure that your video buffer is one frame in size and should result in a 100% flat bitrate regardless of what's happening. as long as you're not currently having frame drop/lag issues.

Sorry, where do I type this in?

I stream at 3500/3500 and 30fps.

Would I do... [(1/30)*3500] = 3500

ahhh this doesn't seem right. I don't understand how to apply the tweaks. :(
 

Floatingthru

Community Helper
No you would do [(1/30)*3500] as the equation to find the vbv-bufsize. Which in your case would be 116.6666666666666667 so round up to 117 I suppose. So that means that number is your custom vbv-bufsize.

In the advanced settings in OBS check the Custom x264 Encoder Settings box then enter "vbv-bufsize=117" without the quotes of course.

And just like hilalpro said make sure you also check the CBR box in encoding otherwise it won't do what you want it to do.
 
Floatingthru said:
No you would do [(1/30)*3500] as the equation to find the vbv-bufsize. Which in your case would be 116.6666666666666667 so round up to 117 I suppose. So that means that number is your custom vbv-bufsize.

In the advanced settings in OBS check the Custom x264 Encoder Settings box then enter "vbv-bufsize=117" without the quotes of course.

And just like hilalpro said make sure you also check the CBR box in encoding otherwise it won't do what you want it to do.

OHHHHH!!! thank you thank you! :)
 

dehixem

Member
Going to try out the tweaks.

I had a question in the meantime though :
What does CBR do already ? I forgot. For the tweaks I'll be using quality 7, is using CBR better ?

My custom x264 params are : "CRF=18 vbv-bufsize=21" because my bitrate max is 620.

I'm used to use a custom buffer size of 2000, I unchecked that for this tweaking test.
 

hilalpro

Member
You don't have to be using a custom x264 setting (just change the buffer size directly) also you can't use CRF/quality settings with CBR (constant bitrate) rate control because it should disable it self when using a constant bitrate. unless you force it again from the custom settings which will result in a disabled CBR.
 

Karol401

Member
so i think that i finally fixed the problem with the viewers lag....at least what i know but i get a LOT of pixelation...i mean LOT....here is a preview http://www.twitch.tv/karol401/b/401240337 and log:
15:28:04: Open Broadcaster Software v0.522b - 64bit ( ^ω^)
15:28:04: -------------------------------
15:28:04: CPU Name: AMD FX(tm)-8350 Eight-Core Processor
15:28:04: CPU Speed: 4013MHz
15:28:04: Physical Memory: 16282MB Total, 14754MB Free
15:28:04: stepping id: 0, model 2, family 15, type 0, extmodel 0, extfamily 3, HTT 1, logical cores 8, total cores 4
15:28:04: monitor 1: pos={0, 0}, size={1680, 1050}
15:28:04: Windows Version: 6.2 Build 9200
15:28:04: Aero is Enabled
15:28:04: -------------------------------
15:28:04: OBS Modules:
15:28:04: Base Address Module
15:28:04: 00000000AC5D0000 OBS.exe
15:28:04: 00000000C3180000 OBSApi.dll
15:28:04: 00000000C81D0000 DShowPlugin.dll
15:28:04: 00000000C81A0000 GraphicsCapture.dll
15:28:04: 00000000CA2F0000 NoiseGate.dll
15:28:04: 00000000C82B0000 scenesw.dll
15:28:04: ------------------------------------------
15:28:04: Adapter 1
15:28:04: Video Adapter: AMD Radeon HD 7900 Series
15:28:04: Video Adapter Dedicated Video Memory: 3194155008
15:28:04: Video Adapter Shared System Memory: 3973548032
15:28:04: =====Stream Start: 2013-05-09, 15:28:04===============================================
15:28:04: Multithreaded optimizations: On
15:28:04: Base resolution: 1680x1050
15:28:04: Output resolution: 1344x840
15:28:04: ------------------------------------------
15:28:04: Loading up D3D10...
15:28:04: Playback device Default
15:28:04: ------------------------------------------
15:28:04: Using desktop audio input: Speakers (Realtek High Definition Audio)
15:28:04: ------------------------------------------
15:28:04: Using auxilary audio input: Microphone (Realtek High Definition Audio)
15:28:04: ------------------------------------------
15:28:04: Audio Encoding: AAC
15:28:04: bitrate: 128
15:28:04: ------------------------------------------
15:28:04: device: USB2.0_Camera,
15:28:04: device id \\?\usb#vid_093a&pid_2700&mi_00#7&273bd4ad&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global,
15:28:04: chosen type: YUY2, usingFourCC: false, res: 640x480 - 640x480, frameIntervals: 333333-10000000, fourCC: 'YUY2'
15:28:04: audio device: Disable,
15:28:04: audio device id Disabled,
15:28:04:
15:28:04: Using directshow input
15:28:05: Using Monitor Capture
15:28:05: Using custom x264 settings: "vbv-init=0.1 vbv-bufsize=64"
15:28:05: x264: VBV buffer size cannot be smaller than one frame, using 66 kbit
15:28:05: ------------------------------------------
15:28:05: Video Encoding: x264
15:28:05: fps: 30
15:28:05: width: 1344, height: 840
15:28:05: preset: veryfast
15:28:05: CBR: yes
15:28:05: CFR: no
15:28:05: max bitrate: 2000
15:28:05: ------------------------------------------
15:28:20: Using bitmap image
15:29:06: Using Slide Show
15:35:42: Total frames rendered: 13730, number of frames that lagged: 1 (0.01%) (it's okay for some frames to lag)
15:35:43: =====Stream End: 2013-05-09, 15:35:43=================================================
15:36:39: =====Stream Start: 2013-05-09, 15:36:39===============================================
15:36:39: Multithreaded optimizations: On
15:36:39: Base resolution: 1680x1050
15:36:39: Output resolution: 1344x840
15:36:39: ------------------------------------------
15:36:39: Loading up D3D10...
15:36:39: Playback device Default
15:36:39: ------------------------------------------
15:36:39: Using desktop audio input: Speakers (Realtek High Definition Audio)
15:36:39: ------------------------------------------
15:36:39: Using auxilary audio input: Microphone (Realtek High Definition Audio)
15:36:39: ------------------------------------------
15:36:39: Audio Encoding: AAC
15:36:39: bitrate: 128
15:36:39: Using Slide Show
15:36:39: ------------------------------------------
15:36:39: device: USB2.0_Camera,
15:36:39: device id \\?\usb#vid_093a&pid_2700&mi_00#7&273bd4ad&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global,
15:36:39: chosen type: YUY2, usingFourCC: false, res: 640x480 - 640x480, frameIntervals: 333333-10000000, fourCC: 'YUY2'
15:36:39: audio device: Disable,
15:36:39: audio device id Disabled,
15:36:39:
15:36:39: Using directshow input
15:36:39: Using Monitor Capture
15:36:39: Using custom x264 settings: "vbv-init=0.1 vbv-bufsize=64"
15:36:39: x264: VBV buffer size cannot be smaller than one frame, using 66 kbit
15:36:39: ------------------------------------------
15:36:39: Video Encoding: x264
15:36:39: fps: 30
15:36:39: width: 1344, height: 840
15:36:39: preset: veryfast
15:36:39: CBR: yes
15:36:39: CFR: no
15:36:39: max bitrate: 2000
15:36:39: ------------------------------------------
15:37:17: Total frames rendered: 1126, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
15:37:17: =====Stream End: 2013-05-09, 15:37:17=================================================
15:37:20: =====Stream Start: 2013-05-09, 15:37:20===============================================
15:37:20: Multithreaded optimizations: On
15:37:20: Base resolution: 1680x1050
15:37:20: Output resolution: 1344x840
15:37:20: ------------------------------------------
15:37:20: Loading up D3D10...
15:37:20: Playback device Default
15:37:20: ------------------------------------------
15:37:20: Using desktop audio input: Speakers (Realtek High Definition Audio)
15:37:20: ------------------------------------------
15:37:20: Using auxilary audio input: Microphone (Realtek High Definition Audio)
15:37:20: ------------------------------------------
15:37:20: Audio Encoding: AAC
15:37:20: bitrate: 128
15:37:20: Using Slide Show
15:37:20: ------------------------------------------
15:37:20: device: USB2.0_Camera,
15:37:20: device id \\?\usb#vid_093a&pid_2700&mi_00#7&273bd4ad&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global,
15:37:20: chosen type: YUY2, usingFourCC: false, res: 640x480 - 640x480, frameIntervals: 333333-10000000, fourCC: 'YUY2'
15:37:20: audio device: Disable,
15:37:20: audio device id Disabled,
15:37:20:
15:37:20: Using directshow input
15:37:20: Using Monitor Capture
15:37:20: Using custom x264 settings: "vbv-init=0.1 vbv-bufsize=64"
15:37:20: x264: VBV buffer size cannot be smaller than one frame, using 66 kbit
15:37:20: ------------------------------------------
15:37:20: Video Encoding: x264
15:37:20: fps: 30
15:37:20: width: 1344, height: 840
15:37:20: preset: veryfast
15:37:20: CBR: yes
15:37:20: CFR: no
15:37:20: max bitrate: 2000
15:37:20: ------------------------------------------
15:37:22: Using RTMP service: Twitch / Justin.tv
15:37:22: Server selection: rtmp://live-ams.justin.tv/app
15:37:24: SO_SNDBUF was at 65536
15:37:24: SO_SNDBUF is now 65536
18:27:39: Using bitmap image
18:27:47: Using graphics capture
18:27:48: SharedTexCapture hooked
18:28:51: Using bitmap image
18:29:09: Using bitmap image
18:29:25: Using bitmap image
18:29:55: Using Monitor Capture
20:07:37: Using text output
23:06:25: Total frames rendered: 808345, number of frames that lagged: 1 (0.00%) (it's okay for some frames to lag)
23:06:25: RTMPPublisher::SocketLoop: Aborting due to bStopping
23:06:25: Number of times waited to send: 0, Waited for a total of 0 bytes
23:06:25: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
23:06:25: =====Stream End: 2013-05-09, 23:06:25=================================================
23:06:26:
23:06:26: Profiler results:
23:06:26:
23:06:26: ==============================================================
23:06:26: frame - [100%] [avg time: 2.242 ms] [avg calls per frame: 1] [children: 90.2%] [unaccounted: 9.77%]
23:06:26: | scene->Preprocess - [13.5%] [avg time: 0.302 ms] [avg calls per frame: 1]
23:06:26: | video encoding and uploading - [76.8%] [avg time: 1.721 ms] [avg calls per frame: 1] [children: 76.1%] [unaccounted: 0.669%]
23:06:26: | | CopyResource - [0.401%] [avg time: 0.009 ms] [avg calls per frame: 0]
23:06:26: | | conversion to 4:2:0 - [0.223%] [avg time: 0.005 ms] [avg calls per frame: 0]
23:06:26: | | call to encoder - [74.3%] [avg time: 1.666 ms] [avg calls per frame: 0]
23:06:26: | | sending stuff out - [1.16%] [avg time: 0.026 ms] [avg calls per frame: 0]
23:06:26: ==============================================================
23:06:26:
if anyone could help i would be gratefull
 
Status
Not open for further replies.
Top