Question / Help Can I set CBR to be constant, not jump like a #*^@?

My issue is that (I don't know why) but when bitrate jumps like crazy, my upload is being messed and I tend to drop frames... This apply to whatever bitrate I set when using CBR... I can set it to 1500 with CBR, it's going crazy, I set it to 500 kbps and it is going crazy as well... Someone have any solution for this?

On upload meter it looks like this, when I set it for example to 500kbps on bitrate, it drops to 125kbps then suddenly jumps back to 1200kbps and I am droping frames and icon turns orange and red :/ When I am using 1500kbps on bitrate I found myself suddenly using 3000 or even 4500 kbps of bitrate when my max upload speed is only something around 2.22~2.23mbps... (I was supposed to have only 2mbps but this is what speedtest shows me, I am on Cable Modem)
 
Kharay said:
Thanks :D on bitrate 1500 this is keeping my bitrate between 1400 and 1760 kbps ^^ Only one time my upload meter went into the orange zone and dropped 1 frame, but that was when my game freezed for couple seconds and people who ware helping me test my stream are saying that the stream wasn't laggy at all. Now the only issue that I have to resolve is this -> http://obsproject.com/forum/viewtopic.php?f=5&t=6686 Why my FPS isn't stable on 30FPS anymore but drops down to low values :/

Btw. I will be doing more tests on this bitrate thingy still, I want to be 100% sure that I won't be dropping any more frames... I am very tired with all this BS already that prevents me from streaming :/
 

Kharay

Member
That actually makes very little sense; either it works or it does not. It does however depend a bit on the content in question. My point being -- What changed is what you were playing/doing, not OBS and not these settings. ;)

Also, the figure listed in OBS' lower right corner isn't necessarily the actually used bandwidth. Do not focus on it too much. Instead, go by your OBS logs and by the feedback of your viewers.
 
Kharay said:
That actually makes very little sense; either it works or it does not. It does however depend a bit on the content in question. My point being -- What changed is what you were playing/doing, not OBS and not these settings. ;)

Also, the figure listed in OBS' lower right corner isn't necessarily the actually used bandwidth. Do not focus on it too much. Instead, go by your OBS logs and by the feedback of your viewers.
It is laging as hell, I am droping ton of frames, people who is helping me test this says that the stream is freezed. And from my side I am noticing that the bitrate is going berserk and frames are being dropped.
 

Kharay

Member
Run an upload test here, making sure to test to a server near the one you have been streaming to. Thing is, there is no way to guarantee a 100% fixed CBR and even if there were, I am guessing there is more going on here.
 
Kharay said:
Run an upload test here, making sure to test to a server near the one you have been streaming to. Thing is, there is no way to guarantee a 100% fixed CBR and even if there were, I am guessing there is more going on here.
I was doing an upload test from Speedtest because TestMy.net never worked for me even when I had previous internet provider in my country, and the servers are very far away from poland.

This is how it present's with speedtest:
http://www.speedtest.net/my-result/2914622151

and pingtest:
85333022.png


but, let's see TestMy.net as well:
I live in Poland in Europe so the closest (yet still very far) is "Northern Europe >> Amsterdam, NL" let's test to this server
Results: http://img203.imageshack.us/img203/884/jt7w.jpg
 

Kharay

Member
The fact the Testmy.net servers are far from Poland has no bearing on this situation really. Thing is, there is a Testmy.net server really close to a Twitch.TV server (Amsterdam). And there are no Twitch.TV servers in Poland either.

So, testing to Amsterdam for both Twitch and Testmy.net will give the most accurate reading of what you can realistically accomplish from your location. Since Amsterdam would be the recommended Twitch.TV server anyhow, for Poland. Given the fact that Frankfurt has been known to be somewhat troublesome.
 
Kharay said:
Given the fact that Frankfurt has been known to be somewhat troublesome.
oh? This I didn't know, what is happening to Frankfurt? Maybe I should consider switching to Amsterdam then. And todays tests ware done to a completely different website. I was testing streaming to http://hashd.tv/ given twitch recent issues, and 0 issues to hashd I've done couple first tests to twitch, then the rest to hashd. (I've chosen Frankfurt server for Hashd, and basically 90% of my today's test's are based on hashd)

and Three most recent logs:
http://pastebin.com/uwCAySSe

http://pastebin.com/96MWSDqF

http://pastebin.com/wTBQRbg5
 

Kharay

Member
Well, from what I've been able to gather, Frankfurt's capacity is quite limited. So it has a tendency to congest rather quickly. Looking at the last log there, I can say that my suspicion was accurate. The connection you have to Twitch seems to be the primary issue indeed. So you may be forced to tone down the bitrate.

One particular example:
15:15:22: Video Encoding: x264
15:15:22: fps: 30
15:15:22: width: 640, height: 360
15:15:22: preset: veryfast
15:15:22: CBR: yes
15:15:22: CFR: no
15:15:22: max bitrate: 1500
15:15:22: ------------------------------------------
15:15:22: MMDeviceAudioSource: Frequency for device 'Speakers (Realtek High Definition Audio)' is 384000, samples per sec is 48000
15:15:22: MMDeviceAudioSource: Frequency for device 'Line 1 (Virtual Audio Cable)' is 352800, samples per sec is 44100
15:15:24: Using RTMP service: Hashd.tv
15:15:24: Server selection: rtmp://ingest-ffm1.hashd.tv/live
15:15:24: Interface: Realtek PCIe GBE Family Controller (ethernet, 100 mbps)
15:15:25: SO_SNDBUF was at 8192
15:15:25: SO_SNDBUF is now 65536
15:25:06: RTMPPublisher::SocketLoop: Aborting due to FD_CLOSE, error 10053
15:25:08: Total frames rendered: 8630, number of late frames: 234 (2.71%) (it's okay for some frames to be late)
15:25:08: Number of times waited to send: 170, Waited for a total of 620310 bytes
15:25:08: Number of b-frames dropped: 572 (6.7%), Number of p-frames dropped: 602 (7.1%), Total 1174 (14%)
Could you try 1250 Kbps and the rest similar to what it was in that example and see if it feels better?
 
Kharay said:
Well, from what I've been able to gather, Frankfurt's capacity is quite limited. So it has a tendency to congest rather quickly. Looking at the last log there, I can say that my suspicion was accurate. The connection you have to Twitch seems to be the primary issue indeed. So you may be forced to tone down the bitrate.

One particular example:
15:15:22: Video Encoding: x264
15:15:22: fps: 30
15:15:22: width: 640, height: 360
15:15:22: preset: veryfast
15:15:22: CBR: yes
15:15:22: CFR: no
15:15:22: max bitrate: 1500
15:15:22: ------------------------------------------
15:15:22: MMDeviceAudioSource: Frequency for device 'Speakers (Realtek High Definition Audio)' is 384000, samples per sec is 48000
15:15:22: MMDeviceAudioSource: Frequency for device 'Line 1 (Virtual Audio Cable)' is 352800, samples per sec is 44100
15:15:24: Using RTMP service: Hashd.tv
15:15:24: Server selection: rtmp://ingest-ffm1.hashd.tv/live
15:15:24: Interface: Realtek PCIe GBE Family Controller (ethernet, 100 mbps)
15:15:25: SO_SNDBUF was at 8192
15:15:25: SO_SNDBUF is now 65536
15:25:06: RTMPPublisher::SocketLoop: Aborting due to FD_CLOSE, error 10053
15:25:08: Total frames rendered: 8630, number of late frames: 234 (2.71%) (it's okay for some frames to be late)
15:25:08: Number of times waited to send: 170, Waited for a total of 620310 bytes
15:25:08: Number of b-frames dropped: 572 (6.7%), Number of p-frames dropped: 602 (7.1%), Total 1174 (14%)
Could you try 1250 Kbps and the rest similar to what it was in that example and see if it feels better?
Since two days I have better upload speed, 2,23mbps right now, previously I had 1,07mb. About 1week and a half before dota 2 events on twitch, I was broadcasting to twitch with my 800 kbps variable bitrate just fine. Previously, I was testing CBR with that 800 kbps bitrate as well, it worked, but I've switched back to variable, because when I was playing Minecraft, Minecraft didn't have any upload speed to use for the multiplayer therefore I was lagging there. But everything was fine with OBS, no dropped frames or issues. Then, at dota 2 weekend and after that twitch started to f**&&* up, so I've done some broadcast testing to Hashd. My bitrate was set on variable 800 kbps = everything fine.

This week, I got new upload speed. Set CBR on, and as you see problems are even on 800 kbps bitrate while trying to broadcast (I already told before that I had problems even on 800 kbps). I will run more tests today, this time to Amsterdam server on twitch today (just started my day), but I am getting a little bit annoyed with what is happening and I am about to say F & U to "CBR" and use only variable bitrate, and see if this BS occurs with variable bitrate as well. I've took this extra upload just to up my stream quality and upload videos to YouTube faster and now bad luck is telling me that the stream doesn't even want to work properly on my old settings I was using when I had 1mbps upload and 800 bitrate on stream.

You want me to post logs from Amsterdam tests? (though I might not know which one will be at what bitrate, I might go with the bitrate you wrote first, and give a last chance to CBR before I say F & U to CBR.
 
Ok the results to Twitch Amsterdam server are here:

Could you try 1250 Kbps and the rest similar to what it was in that example and see if it feels better?
Not only did it dropped 30 frames after like maybe a minute of streaming or less, it also disconnected from the server :/ And as always, upload meter was jumpy like I won't say what because I would have to censor every word.

Here is a log (1250 Kbps bitrate to Twitch server Amsterdam):
http://pastebin.com/CFpseWAP

and also a log for a couple seconds test with old 1500 bitrate to Amsterdam, I only tested for couple seconds because when I saw he already dropped 1 frame I turned off the stream:
(1500 Kbps bitrate to Twitch server Amsterdam) http://pastebin.com/EnGhed04
 

Kharay

Member
08:13:59: Total frames rendered: 9093, number of late frames: 8 (0.09%) (it's okay for some frames to be late)
08:13:59: RTMPPublisher::SocketLoop: Graceful loop exit
08:14:00: Number of times waited to send: 0, Waited for a total of 0 bytes
08:14:00: Number of b-frames dropped: 4 (0.044%), Number of p-frames dropped: 0 (0%), Total 4 (0.044%)
Is in that last log. Now, dropping 4 frames out of 9093 really isn't so bad. As it says, that's 0.044%. This is the Internet, a certain margin of error is to be expected. Particularly if you're so far away from a Twitch server as you are.
 
Kharay said:
08:13:59: Total frames rendered: 9093, number of late frames: 8 (0.09%) (it's okay for some frames to be late)
08:13:59: RTMPPublisher::SocketLoop: Graceful loop exit
08:14:00: Number of times waited to send: 0, Waited for a total of 0 bytes
08:14:00: Number of b-frames dropped: 4 (0.044%), Number of p-frames dropped: 0 (0%), Total 4 (0.044%)
Is in that last log. Now, dropping 4 frames out of 9093 really isn't so bad. As it says, that's 0.044%. This is the Internet, a certain margin of error is to be expected. Particularly if you're so far away from a Twitch server as you are.
I've done a test with variable bitrate yesterday, been streaming for 1h 6minutes, In first couple minutes it dropped 34 frames and then everything was fine. My bitrate was set to 1500 Kbps with video buffer to 1500 as well and variable bitrate, and upload was even calm. I think that I will stay for as long as possible with variable bitrate, it gives me less issues since clearly I can't stream at all with CBR unless I would be streaming at 50 Kbps bitrate. My Internet seems like it isn't tolerating that kind of upload outbreaks that CBR is giving it to him and is saying "F" to it.

I wish that twitch will punch themselves with a hammer onto the head and drop with that stupid requirements... Also One funny fact as well! Kayframe interval was set to 2 seconds but Twitch is telling me that I don't have set keyframe to 2 seconds... This system that is checking that requirements is pure fail... It even is telling me that I am not using CBR when I am using it... I wish I was a bigger broadcaster on twitch so I could just bitchslap them about this...
 

Kharay

Member
VBR actually is far more spikey than CBR, unless the content you are streaming is very static. Anyhow, to make CBR more strict you can always just toy with Custom Buffer Size. Decreasing the Buffer Size while having CBR enabled will enforce a more strict CBR. Don't decrease it all the way down to 0 though. ;)

Personally, I like the decision of making CBR a requirement. The thing is, VBR streams are far harder to load balance because of their unpredictable nature. Which is in fact part of the reason Twitch's quality of service has seen a steady decline for quite some time now. Moving to enforcing CBR will make it so they can balance the load more reliably, which should in turn help to improve their overall reliability. Or at least, in theory. We'll have to see what happens in reality though. But I have good hopes it will turn out for the better in the end.

Thing is, lately even on my massively overpowered Internet connection I have been unable to watch any stream at its native resolution. And I have confirmed time and time ago that it's not a local issue, it's Twitch. Something needed to be done.
 
I know what you are speaking but so far VBR is more "stable" and less spikey than CBR is :/ I find myself making 10mbps of bitrate with CBR (while on 2mbps upload) and on VBR everything is working as intended. I have couple days before 1st of next month so I can not give a sh*** about CBR and rest a little from all this BS. Then maybe I will consider CBR again. So far CBR is way more spikey than actual VBR which works just fine and do theirs job. But I think I already know the results, those couple days won't make that magically CBR will start to work like a charm.

ah btw. I was testing everything on Minecraft, I stream Minecraft the most of times recently.
 

Kharay

Member
Peculiar, I haven't had any such issues with Minecraft myself. If anything, the only real challenge with Minecraft as far as streaming is concerned is getting it to look crystal clear. Which I suspect may simply be impossible. I have gotten very close, probably got the best looking Minecraft "stream" out there right now but there are still moments it pixelates more than I would like. Minecraft is quite challenging for the encoder. ;)
 
Top