Question / Help mafia 2 skipping frames

logoster

New Member
ok, first off, my specs:

I5-3330 @3.0 ghz (3.2 turbo)
8gb ddr3 1600mhz ram
intel hd 2500 (yeah yeah, ik, igpu, but works well, never ever had this problem before, plus, it seems like a cpu thing anyway)

obs v0.592b

log will be attached

so, i have a problem, when i go to stream some mafia 2, obs just, freaks out, the bandwith meter in the bottom right go's crazy (go's from 3000kb/s, to like, 27000kb/s) and it says that it could not encode, skipping frames, and it only seems to happen on mafia 2, everything else streams fine, but anyway, because of this, i cant stream it, because nothing shows up, because it refuses to encode it, i set all my advanced settings to default (except for the keyframe, obs says that since im streaming to twitch, to set that to "2") happens in preview your stream mode as well

oh, my upload speed is 5.92 megabits per second, which should be more then enough to stream in 720p or even 1080p if i wanted

(i currently stream in 1024p, 1280x1024 resolution, lol)

fps is set for 30
 

Attachments

  • 2014-01-14-1325-42.log
    8.8 KB · Views: 51

hilalpro

Member
Playing mafia 2 while encoding at 1024p is taking all your cpu time. Lower your game graphics and do at least a 1.5 downscale.
 

FerretBomb

Active Member
Seconded; the i5 usually runs out of gas around the 720p mark at most. You'll need to downscale until the log stops showing duplicated frames. Make sure each test is at least 5 minutes long, to allow time for the bitrate/encoding to normalize.
Additionally, if you can cut down on capture sources it might help lower the overhead a bit; what are you using four graphics captures for?

Also, speedtest.net is worthless for livestreamers, if that's what you're basing your upstream speed estimate on. Livestreaming uses a single-link TCP connection, which most speed-testing sites won't (to maximize tested speeds). Forget it, it's just a rough starting point. Pretty much just need to test and see if you start dropping frames, and lower your rate.
Additionally, bear in mind that if you're streaming to Twitch.tv, their recommended maximum rate is 3500kbps (after which point the ingest servers start having problems), and for non-partnered streams the recommended maximum is 2000kbps.
 

logoster

New Member
ive never had a problem with ANY game at 1024p, other then mafia 2, heck, even gta iv doesnt have a problem, mafia 2 cant be THAT much different, also, im 100% sure my speed is 5.92 megabits per second (i do realtime tests instead of speedtest websites, my upload speed shows up around 750 kiloBytes per second, sometimes it even gets to around 1 MegaByte per second) but yeah, mafia 2 is the ONLY game that causes obs to freak out, everything else always streams perfectly (also, the tons of graphics scources you saw, is because i never delete them, if i decide to stream a certain game, i dont want to end up having to re-add it, so i just leave it, and uncheck it when i dont use it


EDIT:

not a SINGLE thing changes, when i change any resolution settings, even if i change it to 800x600 in both the game, AND obs (not downscale, actually setting it) it still says it could not encode, skipping frames, will attach log
 

Attachments

  • 2014-01-15-0834-00.log
    4.9 KB · Views: 22

FerretBomb

Active Member
It apparently is, if you're having an issue with it.

What are you talking about, 'realtime tests'? If you're uploading data to a given server, it isn't necessarily using the same kind of connection as livestreaming does.

That log is not from a live streaming session. You need to post one from a livestreaming session where you streamed for at least 5 minutes, to be at all useful.

And yes, the following three lines from your log indicate that your CPU is not powerful enough to encode video in real-time at your current settings:
08:35:42: Total frames encoded: 2760, total frames duplicated: 267 (9.67%)
08:35:42: Number of frames skipped due to encoder lag: 177 (6.41%)
08:35:42: Total frames rendered: 2568, number of late frames: 24 (0.93%) (it's okay for some frames to be late)
Mafia II may simply be using more CPU than the other games that you play, or your CPU may be downclocking itself due to thermal dissipation load. But again, short version is that the CPU is unable, for whatever reason, to keep up.


Also, if you uncheck a source, it doesn't get initialized, and doesn't come up in the logfile. So it appears you may be leaving some sources checked; I've attached one of my own logs (from last night) as an example. My main 'game' scene has about 70-80 game captures, all of which are unchecked (the first scene transition I'd left a game cap enabled for a game I wasn't playing). If you're leaving unused captures enabled, that definitely can impact your performance.
 

Attachments

  • 2014-01-14-2352-48.log
    12.3 KB · Views: 18

logoster

New Member
doing a real stream now (will also include link to recording, as i included realtemp, and hwmonitor, as my cpu usage doesnt even max out at ALL, its around 50% with the game open, and obs streaming)(strangley, cpu usage actually go's UP, when alt+tabbing out of the game, no idea what thats about)

Recording:

http://www.twitch.tv/logoster/b/495518750

(ignore the dropped frames, ive found, that obs drops frames, if its at a still black screen, if it actually has motion showing up, it NEVER, drops a frame) (and speed wise, i mean testing VIA livestreaming, and according to a speed usage meter thingy i have, and my task manager, it is in fact a 5.92 megabit per second speed) (i'd also like to note, that no, it is NOT possible for me to connect via a wired connection, i have to use wifi (for reasons of [REDACTED]))

log shall be attached
 

Attachments

  • 2014-01-15-1433-22.log
    6.7 KB · Views: 27

Lain

Forum Admin
Lain
Forum Moderator
Developer
You're still getting some frame skipping, something's still eating more CPU than your system can handle. Might just need a little bit more downscale perhaps?
 

logoster

New Member
well, the thing is, ive litterally set the resolution to 640x480, still skips the frames having to do with mafia 2, litterally EVERY SINGLE OTHER game i play and stream, works perfectly, my cpu usage NEVER reached 100% either, wasnt downclocking, stayed at 3.0 ghz during the whole stream, temp's didn't even hit 50C, im really confused atm, i just dont see why it's not able to encode it
 

Boildown

Active Member
It might not be the CPU part of the i5 that's holding you up, it could be the GPU part. OBS uses both your GPU and your CPU, which for you happen to be the on the same chip, and if its the GPU part, this won't be reflected in a CPU monitoring program like task manager.

Turn constant frame rate to On / Yes, and change your preset to SuperFast.

I'm not sure if this will help or hurt, but also you might try (search these forums for how to do it) using Quicksync.
 

logoster

New Member
nothing changed when turning on CFR and changing to SuperFast, still skips frames, log included
 

Attachments

  • 2014-01-16-0949-31.log
    13.8 KB · Views: 14

Lain

Forum Admin
Lain
Forum Moderator
Developer
I think at this point I would consider recommending you to use a little bit of downscale and see if that helps at all.
 

Boildown

Active Member
Try a 2.0 downscale, lower the bitrate to 1500, keep CFR on, and let it run for five minutes showing the fastest action scenes that occur in your game, and then post that log file.
 

logoster

New Member
here you go: (although, ive said it before, so ill say it again, i HAVE LITTERALLY, downscaled as far down as possible, still nothing, so i doubt thats it)

oh, and stream link, i included hwmonitor and realtemp in the test stream again:

http://www.twitch.tv/logoster/b/495979801
 

Attachments

  • 2014-01-17-1228-08.log
    20.4 KB · Views: 23

hilalpro

Member
12:39:59: video thread frame - [100%] [avg time: 36.396 ms] [children: 99%] [unaccounted: 0.997%]
12:39:59: | scene->Preprocess - [19.1%] [avg time: 6.959 ms]
12:39:59: | GPU download and conversion - [79.9%] [avg time: 29.074 ms] [children: 0.407%] [unaccounted: 79.5%]

Looks like you really need a dedicated graphics card At this point. I would recommend getting rid of the extra sources, make your game run in full screen mode at the lowest graphics and resolution possible.

In OBS make that resolution your base resolution and stream with no downscale with everything else at it's default (Except the bitrate don't go over 2000).
 

logoster

New Member
so, i can stream gta iv, one of the most UNOPTOMIZED games on pc (other than SR2, which is even worse) but not mafia 2, LOGIC yo, lol, and darn, well, luckily, i should be getting an EVGA Superclocked GTX 760 with ACX Cooling very soon, so that'll be nice
 

Boildown

Active Member
I'm just curious, don't really know if it'll work, and in a way it seems like it might work even worse but...

What happens if you try to run Quicksync encoding?
 

Boildown

Active Member
logoster said:
still doesnt show up on stream:

log:

Ahh, well good try. I agree, it seems you need a dedicated video card to play your games and stream them all at the same time. Its a shame because you're really close at a bit over 2% duplicated frames, but I know that's more than enough to make it look pretty bad.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I can safely say I have no idea what's going on in this case, maybe this is due to the fact that you don't have a dedicated video card. I'm not entirely sure, but it is a rather uncommon setup.
 
Top