Question / Help Video lagging, game choppy, haven't even tried to stream yet

So, I read the few pinned posts at the top which seem to deal with streams and lag stuff… my issue is before any streaming is taking place. If I've posted incorrectly please let me know and I'll fix it.

Anyways,

I'm playing some retro games on emulators, and wanting to stream & capture those. As soon as I fire up OBS, the emulator starts to drop frames and lag, bad. As soon as I close OBS the issue is gone. I've tried two different emulators, same issue, so it's not the emulator itself. I've also tried just doing an offline capture with Screenflow, which is a tad bit better, but still has the lag.

Quite frustrating!

I figured this would be the place to find the answer. I'm happy to provide any more information I can to get this solved.

Thank you!
 

Osiris

Active Member
If you are streaming on the device in your signature then no wonder you are lagging, that CPU is old and not ideal for streaming.

But anyway post a log
 

dodgepong

Administrator
Community Helper
You can try going to Settings > Output > Enable Advanced Encoder Settings and change the x264 preset to "ultrafast" and see if that helps.

It is a pretty old computer, though, and live video encoding is pretty demanding.
 

Osiris

Active Member
Hmm, remembered mac logs don't show nearly enough.
But encoding is very cpu-heavy, you might need to downscale some more, or do what dodgepong said.
 
I changed the x264 and it is a little better… still not the greatest. I am still on WiFi, since I was only testing the video part and not the actual streaming - would that make a difference? The lag was happening even if I hit "record" and not stream.

When you say "downscale," which setting exactly are you referring to?

Here is another file: https://gist.github.com/54939535e6c7cad68c92

Thanks for your help!
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Scaled resolution, video settings. Sets the resolution to scale your stream to (versus the base resolution, which is the resolution of your video before scaling). The lower resolution you use, the less CPU you use, though at the cost of lost detail due to downsizing.
 
That seems to work a little better. I'm not too concerned about the detail since I'm doing retro games, they aren't in HD anyways.

So, I pulled back on the quality a little bit and it seems to be working better. It's still a bit laggy on my end, but seems to work ok through the stream. This is just on WiFi, also… Haven't tried with ethernet plugged in yet.

I was using SNES9x, and when I lowered the quality settings, it was working decently. I just discovered OpenEmu, which doesn't have as many options to lower quality, and the lag is visually and sonically worse.

So I guess my last question, other than hooking up ethernet, is: is there anything I can install or upgrade without getting a new laptop? As stated earlier, it's already set up for my recording & audio software (on a separate HD) and I have no plans to upgrade for a year or more. Any settings I can change? Background programs I can turn off to help the CPU run?

Thanks, I really appreciate it!
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Other than what's been suggested, not too much. Emulation uses a fair amount of CPU by itself just because it has to spend time recompiling the game on the fly. If you're using utlrafast, scaled down, 30 fps, there's probably not too much else you can do. If there are other programs active on your computer you can try turning them off, but only you would know that for sure or not
 
Dang, it's sad to hear, that's for sure.

So I ran a stream of our podcast last night. I tried to also record the video, but it came out EXTREMELY laggy and frames got frozen up throughout so it's not even usable. Audio was perfect tho (that's my forte anyways). We had two friends watching for us, and they said the stream was good! Laggy at times but very good. So I don't know if it's just tough for my Mac to capture and stream at the same time… The saved video on Twitch looks exactly like the one on my computer - too choppy to use.

I'll post a log report here soon.
 

anakuron

New Member
I've tried streaming with two macs now, and older mac mini dual core and newer i5 both running yosemite and clean installs, nothing else installed than obs and capture software.

Both macs have lag issues and it's not really a "lag", since lag would be contstant, what happens is that the stream works in cycles so you get a good few seconds and then you get freeze frames for couple seconds, and OBS tells that there's no dropped frames at all.

Twitch says the stream quality is excellent so it's not dropping packages either, which would indicate router issues, if you try to stream too high bitrate twitch will tell you about the stream quality. Many people have this same problem with macs, so I'm thinking there's something changed in ffmpeg or whatever OBS uses to convert to stream and that's causing the problems, this happens on very top quality computers as well, and I had the same problem with cocoa split (it's using the ffmpeg as well) running 320x240 resolution.

I'm betting that it's a software problem, many people have the same issue, and guys who have tried wirecast with the same computer get good results.
 

dodgepong

Administrator
Community Helper
OBS doesn't encode with FFmpeg, it uses x264 directly.

The bottom line is that encoding h.264 video is very CPU-intensive, and requires a very good CPU. A 2008 MBP only has a Core 2 Duo, which is not very good for encoding. This is a well-established fact from years of observing the same behavior on Windows machines with the same CPUs. The best you can do is stream at low resolution, low frame rate, and use the ultrafast preset, and beyond that, there's not much that can be done.

Once FFmpeg output is made available, other codecs can be used for local recording, perhaps ones that don't require so many system resources. But for x264, CommanderCody0's experience is expected given the resource demands that such an encoder makes.
 
Ok, I've gotten things running a little smoother. Here are a few details of what I've done…

I did a test stream and asked a few friends to tune in. I had the video quality scaled to a 640x480 resolution, video bitrate at 1200 and audio bitrate at 128. I just had one webcam running with my podcast banner, and the viewers said everything ran pretty smooth.

When time came last night to actually do a podcast, I had 2 webcams and a display capture running at once. Left all other settings the same just to test it out. Viewers said that everything ran smoothly for a time, but after about 45-60 minutes the audio became very choppy and off sync with the video. I would cut the stream, restart the program, and then it ran fine for another 45-60 minutes…

I already know that have 2 webcams + the display is very CPU intensive - but i'm wondering why it runs good for a while then starts to bog down. Any advice?

Also, would it be much easier/smoother to simply do a display capture plus our audio? We are a podcast, so video is not truly essential while we are just sitting in the studio - audio is really the main goal.

I run my audio through Logic Pro, and I know that takes CPU power away but I absolutely cannot alter that at all, as that's how I truly record the audio for the show to be posted to iTunes with each episode. So that isn't going anywhere - if there's anything else I can tweak in OBS I would love to know.

Also to note, the first two times that my audio started to get choppy and I had to restart, I was watching YouTube videos. I figured that was a bad idea, so I cut off my web browser for the third attempt, and even tho I didn't watch anything online it still became choppy after a certain amount of time.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Could you show an example of this problem? A vod/video perhaps?
 

Spire

New Member
I have been having this same issue for a while now. I notice a couple of other posts are hinting at the same thing. I can play heroes of the storm fine without OBS running but once i run it the game stutters. It stutters even in try mode. I turn OBS off and it goes away. I was streaming fine before I upgraded to the studio version of OBS and upgraded to El Capitan OSX. I have tried varying all types of settings but to no avail. I have a mid 2011 iMac with a core i7 3.4 GHz processor. I thought it was te RAM at first so now I have 16 GB 1333 Mhz DDR3. I also have a AMD Radeon HD 6970M 2048 MB graphics card. It seems like my system should be fine to stream at 2500 bit at 720p. I cannot fix this issue. My computer runs the game on the highest settings just fine but the stutter happens once I open OBS whether I am on low settings or ultra settings. This issue has basically stopped my streaming because I am unable to play the game competitively due to the stutter. Would love a fix. It really seems like a software issue to me but I'm no computer technician.
 

NitroStarman

New Member
I have the same problem, except I have a Windows PC, and I'm not streaming, just local recording

Same, I am just recording videos to edit and then upload, but unfortunately I get choppy video. Sometimes it works decently, but most of the time it is just choppy. Sometimes it reduces the performance of the game and sometimes it does not. I've been mostly testing with Minecraft (without mods) since it is the least CPU demanding game I own.
My specs:
Running Windows 10
Lenovo G500 laptop specs except that the hard drive was replaced with SSHD and 4GB RAM added for total of 8GB of RAM. By default it has integrated graphics which I assume will most likely be my biggest problem. I hope that the fix is something I can just configure in the OBS settings.
 
Top