Question / Help Gamecapture freezes (seemingly) at random

Deomew

New Member
Howdy peeps.

After having switched from video capture (with Dxtory) to Gamecapture, I've come across an issue I can't seem to resolve on my own, so I wanted to come here for some help as I'm really at a loss here.

The issue is as follows:
Every time I stream a game with gamecapture, OBS seems to freeze or lower its frames at certain places, moments, scenes, ... in the games. It's happened with a lot of games already and it always seems to occur at random. The game itself is always fine, but OBS and the stream suffer tremendously from this lag / frame drop.

Last time it happened, was yesterday during left 4 dead, when the stream froze every time I looked or hung around a certain fire.

I've tried the following things to fix this issue, but nothing has seemed to work yet.

- Lowering the resolution of my webcam
- Lowering the game resolution and graphics (Which has worked to a certain extend, but didn't solve it)
- Experimenting with different OBS settings

Logs:
https://gist.github.com/anonymous/d1ada8ad3bfa0747430f

If anyone could help me out here, I would really appreciate it. I'm probably overseeing something really stupid, but I really can't put my finger on it.

Cheers,
Deomew
 

dping

Active Member
Howdy peeps.

After having switched from video capture (with Dxtory) to Gamecapture, I've come across an issue I can't seem to resolve on my own, so I wanted to come here for some help as I'm really at a loss here.

The issue is as follows:
Every time I stream a game with gamecapture, OBS seems to freeze or lower its frames at certain places, moments, scenes, ... in the games. It's happened with a lot of games already and it always seems to occur at random. The game itself is always fine, but OBS and the stream suffer tremendously from this lag / frame drop.

Last time it happened, was yesterday during left 4 dead, when the stream froze every time I looked or hung around a certain fire.

I've tried the following things to fix this issue, but nothing has seemed to work yet.

- Lowering the resolution of my webcam
- Lowering the game resolution and graphics (Which has worked to a certain extend, but didn't solve it)
- Experimenting with different OBS settings

Logs:
https://gist.github.com/anonymous/d1ada8ad3bfa0747430f

If anyone could help me out here, I would really appreciate it. I'm probably overseeing something really stupid, but I really can't put my finger on it.

Cheers,
Deomew
your bitrate is to high for your connection. 720@30 only needs 2000-2500 for x264 and for NVENC, maybe 2500-3000 max.

run this tool for your region and post a screenshot of the results.
http://www.teamliquid.net/forum/tech-support/478845-twitchtest-twitch-bandwidth-tester
 

Deomew

New Member
your bitrate is to high for your connection. 720@30 only needs 2000-2500 for x264 and for NVENC, maybe 2500-3000 max.

run this tool for your region and post a screenshot of the results.
http://www.teamliquid.net/forum/tech-support/478845-twitchtest-twitch-bandwidth-tester

Thanks for the reply! I've run the tool and it presented me with the following results.

Bandwith test.png


I reckon it's better for me to switch to the Amsterdam server then? And is there anything else I should do next to the server and bitrate adjustments?

Cheers,
Deomew
 
Last edited:

Deomew

New Member
Also, it might be good to mention that the lag also occurs in OBS when I'm only previewing the stream. So it's not only when I'm live.

Here's a log of a trial preview I did with Wildstar using a 2000 bitrate and Amsterdam as streaming server (Which I don't think will matter unless I actually go live.) Sadly, it still gave me a lot of issues in the preview window.

https://gist.github.com/anonymous/bae12dde578566a2d263
 

dping

Active Member
Also, it might be good to mention that the lag also occurs in OBS when I'm only previewing the stream. So it's not only when I'm live.

Here's a log of a trial preview I did with Wildstar using a 2000 bitrate and Amsterdam as streaming server (Which I don't think will matter unless I actually go live.) Sadly, it still gave me a lot of issues in the preview window.

https://gist.github.com/anonymous/bae12dde578566a2d263
Ignoring the preview window, does this occur on the stream as well? the preview windows does not always reflect what is actually happening on the stream.
 

Deomew

New Member
Ignoring the preview window, does this occur on the stream as well? the preview windows does not always reflect what is actually happening on the stream.

Yes. It does also affect the stream. When I look back at past broadcasts, then I see the same lag / freezes.
 

dping

Active Member
Yes. It does also affect the stream. When I look back at past broadcasts, then I see the same lag / freezes.
Do you have a logfile from that stream? the logfile when you previewed looked fine minus having a few late frames
Code:
Total frames rendered: 2359, number of late frames: 90 (3.82%)
(it's okay for some frames to be late)


EDIT: change your bitrate to 2500 for this test.
 

Deomew

New Member
Do you have a logfile from that stream? the logfile when you previewed looked fine minus having a few late frames
Code:
Total frames rendered: 2359, number of late frames: 90 (3.82%)
(it's okay for some frames to be late)

The original log file I posted was from the L4D stream where the fire caused the Freeze / Lag in both OBS and the stream.
If you would want another log file, I could also give you one from when I streamed Life is strange. I've also experienced a lot of issues when trying to stream that game.

EDIT: change your bitrate to 2500 for this test.

I did another Wildstar test with a bitrate of 2500 as you asked: https://gist.github.com/7f33c51cce2413598093

The analyzer had a lot more to say this time around in comparison to the last log I posted.

Another thing that might be of interest is that whilst everything lags when I am in the game, if I alt Tab out of it, the preview of my webcam is just fine. It's just when the game is in actively on the foreground that the freezing / dropped frames occur.

Cheers,
Deomew
 

dping

Active Member
The original log file I posted was from the L4D stream where the fire caused the Freeze / Lag in both OBS and the stream.
If you would want another log file, I could also give you one from when I streamed Life is strange. I've also experienced a lot of issues when trying to stream that game.



I did another Wildstar test with a bitrate of 2500 as you asked: https://gist.github.com/7f33c51cce2413598093

The analyzer had a lot more to say this time around in comparison to the last log I posted.

Another thing that might be of interest is that whilst everything lags when I am in the game, if I alt Tab out of it, the preview of my webcam is just fine. It's just when the game is in actively on the foreground that the freezing / dropped frames occur.

Cheers,
Deomew
That logfile wasn't when you streamed.
 

dping

Active Member
Strange. As it's the only one I have of that particular date. I guess I'll give you one from Life is strange then, which hopefully was from when I streamed.

https://gist.github.com/453c4473b87ccf0f14a0

Cheers,
Deomew
Are you watching your own stream while you stream? also, by freezing, do you mean that your stream is buffering from time to time? again, over 2500 bitrate (which you dont need 3500 for a 720@30 stream). you can expect viewers to buffer.
 

Deomew

New Member
Are you watching your own stream while you stream? also, by freezing, do you mean that your stream is buffering from time to time? again, over 2500 bitrate (which you dont need 3500 for a 720@30 stream). you can expect viewers to buffer.

I've had some buffering complaints, but that's not the issue I'm having now. It's really just freezing (image standing still) while the audio keeps going. And in OBS itself I see the frames being all over the place. And I do not watch my own stream on my PC. If I need to check out these issues, I open up the stream on my cellphone so that it doesn't affect anything on the computer.

To make things easier, here's a highlight that shows the issue I had with the fire in Left 4 dead so that you can see for yourself. http://www.twitch.tv/deomew/v/22548594
 

dping

Active Member
I've had some buffering complaints, but that's not the issue I'm having now. It's really just freezing (image standing still) while the audio keeps going. And in OBS itself I see the frames being all over the place. And I do not watch my own stream on my PC. If I need to check out these issues, I open up the stream on my cellphone so that it doesn't affect anything on the computer.

To make things easier, here's a highlight that shows the issue I had with the fire in Left 4 dead so that you can see for yourself. http://www.twitch.tv/deomew/v/22548594
do you have the exact logfile from that stream/clip? yeah that looks like connection stalling like with your original log:
Code:
21:22:32: RTMPPublisher::SocketLoop: Stalled for 2682 ms to write 461536 bytes
(buffer: 0 / 463872), unstable connection?
21:22:40: RTMPPublisher::SocketLoop: Stalled for 5837 ms to write 463585 bytes
(buffer: 0 / 463872), unstable connection?
21:22:44: RTMPPublisher::SocketLoop: Stalled for 2055 ms to write 460281 bytes
(buffer: 0 / 463872), unstable connection?
21:22:46: RTMPPublisher::SocketLoop: Stalled for 2437 ms to write 463729 bytes
(buffer: 0 / 463872), unstable connection?
21:22:50: RTMPPublisher::SocketLoop: Stalled for 3378 ms to write 461072 bytes
(buffer: 0 / 463872), unstable connection?
21:22:56: RTMPPublisher::SocketLoop: Stalled for 6507 ms to write 463562 bytes
(buffer: 0 / 463872), unstable connection?
21:23:02: RTMPPublisher::SocketLoop: Stalled for 5582 ms to write 460818 bytes
(buffer: 0 / 463872), unstable connection?
21:23:04: RTMPPublisher::SocketLoop: Stalled for 1668 ms to write 462845 bytes
(buffer: 0 / 463872), unstable connection?
21:23:07: RTMPPublisher::SocketLoop: Stalled for 2643 ms to write 461499 bytes
(buffer: 0 / 463872), unstable connection?
21:23:09: RTMPPublisher::SocketLoop: Stalled for 1982 ms to write 460414 bytes
(buffer: 0 / 463872), unstable connection?
21:23:18: RTMPPublisher::SocketLoop: Stalled for 2707 ms to write 460007 bytes
(buffer: 0 / 463872), unstable connection?

I haven't seen that in your log since.. the only thing you can do for that is again, lower your bitrate to 2500 or less.
 

Deomew

New Member
do you have the exact logfile from that stream/clip? yeah that looks like connection stalling like with your original log:
Code:
21:22:32: RTMPPublisher::SocketLoop: Stalled for 2682 ms to write 461536 bytes
(buffer: 0 / 463872), unstable connection?
21:22:40: RTMPPublisher::SocketLoop: Stalled for 5837 ms to write 463585 bytes
(buffer: 0 / 463872), unstable connection?
21:22:44: RTMPPublisher::SocketLoop: Stalled for 2055 ms to write 460281 bytes
(buffer: 0 / 463872), unstable connection?
21:22:46: RTMPPublisher::SocketLoop: Stalled for 2437 ms to write 463729 bytes
(buffer: 0 / 463872), unstable connection?
21:22:50: RTMPPublisher::SocketLoop: Stalled for 3378 ms to write 461072 bytes
(buffer: 0 / 463872), unstable connection?
21:22:56: RTMPPublisher::SocketLoop: Stalled for 6507 ms to write 463562 bytes
(buffer: 0 / 463872), unstable connection?
21:23:02: RTMPPublisher::SocketLoop: Stalled for 5582 ms to write 460818 bytes
(buffer: 0 / 463872), unstable connection?
21:23:04: RTMPPublisher::SocketLoop: Stalled for 1668 ms to write 462845 bytes
(buffer: 0 / 463872), unstable connection?
21:23:07: RTMPPublisher::SocketLoop: Stalled for 2643 ms to write 461499 bytes
(buffer: 0 / 463872), unstable connection?
21:23:09: RTMPPublisher::SocketLoop: Stalled for 1982 ms to write 460414 bytes
(buffer: 0 / 463872), unstable connection?
21:23:18: RTMPPublisher::SocketLoop: Stalled for 2707 ms to write 460007 bytes
(buffer: 0 / 463872), unstable connection?

I haven't seen that in your log since.. the only thing you can do for that is again, lower your bitrate to 2500 or less.

Well as I said, the only log I have from the day I streamed Left 4 Dead (where the clip comes from) is the one I posted in my first post. So sadly, I don't have anything else to give you.

So if I understand correctly, then lowering the bitrate to 2500 or lower should fix the issue I've had there then? And as you don't see anything wrong in the logs from the wildstar tests I've done, then I will just have to try another test stream of that to see if the Distortion I see in the preview is also there during the stream.

Thanks already for all the help and advice. I will perform the test stream this evening and I will then return with the results.

Cheers,
Deomew
 

dping

Active Member
Well as I said, the only log I have from the day I streamed Left 4 Dead (where the clip comes from) is the one I posted in my first post. So sadly, I don't have anything else to give you.

So if I understand correctly, then lowering the bitrate to 2500 or lower should fix the issue I've had there then? And as you don't see anything wrong in the logs from the wildstar tests I've done, then I will just have to try another test stream of that to see if the Distortion I see in the preview is also there during the stream.

Thanks already for all the help and advice. I will perform the test stream this evening and I will then return with the results.

Cheers,
Deomew
and just for future refernce you could try OBS Multiplatform. IMO, its stable enough and packs more features than OBS1. That being said, its still in beta status
 

Deomew

New Member
I've had a small streaming session using wildstar to test and it seems it wasn't only the preview. The stream also still suffers after having adjusted the bitrate.

Here's the log for the last streaming test:
https://gist.github.com/af82ab1563f0e2bf0854

I have already downloaded the Multiplatform as you suggested and I will run some tests on there to see if the issues persists in that build as well.

Cheers,
Deomew
 

dping

Active Member
I've had a small streaming session using wildstar to test and it seems it wasn't only the preview. The stream also still suffers after having adjusted the bitrate.

Here's the log for the last streaming test:
https://gist.github.com/af82ab1563f0e2bf0854

I have already downloaded the Multiplatform as you suggested and I will run some tests on there to see if the issues persists in that build as well.

Cheers,
Deomew
So weird. that logfile does not show you streaming but oddly, it does show 8% late frames, which is quite high but from even that, you are using NVENC so try x264 and see what that gives you. maybe its a driver thing, I know there was some issues with optimus and windows 10...

EDIT: one other thing that this "could be" is you got an FD_CLOSE, error 10053 error on your first log. so even though it might sound weird, do you have any third party firewalls or anti-malware programs installed?

Code:
Aborting due to FD_CLOSE, error 10053

I cant say for sure this would be it, the sympoms on the first log could reflect that OBS is being throttled in some way, even though I've never seen this happen in the preview window as well.
 
Last edited:

Deomew

New Member
So weird. that logfile does not show you streaming but oddly, it does show 8% late frames, which is quite high but from even that, you are using NVENC so try x264 and see what that gives you. maybe its a driver thing, I know there was some issues with optimus and windows 10...

EDIT: one other thing that this "could be" is you got an FD_CLOSE, error 10053 error on your first log. so even though it might sound weird, do you have any third party firewalls or anti-malware programs installed?

Code:
Aborting due to FD_CLOSE, error 10053

I cant say for sure this would be it, the sympoms on the first log could reflect that OBS is being throttled in some way, even though I've never seen this happen in the preview window as well.

From what I've experienced, x264 only made it worse. That's the reason why I started using NVENC in the first place.
I haven't really gotten to testing it today, so I'll run a stream test tomorrow to give you a log file.

As for the third party firewalls and anti-malware I don't use any of those. The only one I have running is the build in Microsoft ones (Windows defender and firewall)

Cheers,
Deomew
 

Deomew

New Member
Here's the log file for the test stream I did today: https://gist.github.com/7b4635ea385a7261aaa5

It went a lot better than I experienced in the past. I mostly hit around the 30 FPS, but there are still times where the stream and preview seem to freeze or suffer from horrible FPS for a while before being a solid 30 again. I'm still quite baffled why this would be the case. I would think it is my hardware, but when I have task manager open, it doesn't seem to be too heavy on my system.

I've also tried to use the multi platform, but I haven't managed to figure out how I can make it recognize Wildstar, which I wanted to use for testing purposes to make them a little more consistent. I'll experiment a little further with the multiplatform tomorrow though.

Cheers,
Deomew
 
Top