Question / Help Program or Capture Card?

LordKaT

New Member
Can't decide what the problem is here, is it the software or the capture card at fault?

I have a dedicated streaming computer with an AverMedia Gamer HD capture card, which takes an HDMI input, up to 1080p.
Streaming computer is a quad-core system with 8GB of Ram running Windows 7.

Under XSplit I had a serious desync problem that they've never fixed with this card (and some weird audio glitches as well); however, the video was always smooth.

With OBS, the video is not smooth. The FPS seems to be stuck at 25FPS, no matter what I do internally to adjust it, including changing quality and bitrates.

I have a 35Mbit upload pipe, 50mbit down.

Bad card, or kinky code? :3
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Well if the card works fine in other apps it's certainly not the card.

I have an avermedia live gamer HD c985 card myself, but I don't have any problems with it. Check to make sure the FPS of the video device FPS and the video section FPS match. Also, if possible, post a log. If you are not using a c985, could you run this? http://obsproject.com/temp/DShowDiagnostic.zip -- It'll give me a bit of info about your particular card that could be useful.
 

LordKaT

New Member
I should note: I had everything set to 60 FPS, and was getting closer to ~20-25 FPS. It was pretty obvious something was dropping frames.

Device: AVerMedia HD Capture C985 Bus 2
type: YV12, usingFourCC: true, res: 1280x720 - 1280x720, fps: 30-60.0002
type: YV12, usingFourCC: true, res: 1920x1080 - 1920x1080, fps: 24-30
type: YV12, usingFourCC: true, res: 160x120 - 720x576, fps: 25-50
type: YV12, usingFourCC: true, res: 160x120 - 720x480, fps: 30-60.0002
type: YV12, usingFourCC: true, res: 640x480 - 640x480, fps: 60.0002-60.0002
type: YV12, usingFourCC: true, res: 800x600 - 800x600, fps: 60.0002-60.0002
type: YV12, usingFourCC: true, res: 1024x768 - 1024x768, fps: 60.0002-60.0002
type: YV12, usingFourCC: true, res: 1280x768 - 1280x768, fps: 60.0002-60.0002
type: YV12, usingFourCC: true, res: 1280x800 - 1280x800, fps: 60.0002-60.0002
type: YV12, usingFourCC: true, res: 1280x1024 - 1280x1024, fps: 24-30
type: YV12, usingFourCC: true, res: 1360x768 - 1360x768, fps: 25-50
type: YV12, usingFourCC: true, res: 1440x900 - 1440x900, fps: 24-30
type: YV12, usingFourCC: true, res: 1680x1050 - 1680x1050, fps: 24-30

Device: Microsoft LifeCam Cinema
type: RGB24, usingFourCC: false, res: 640x480 - 640x480, fps: 15-30
type: RGB24, usingFourCC: false, res: 640x360 - 640x360, fps: 15-30
type: RGB24, usingFourCC: false, res: 424x240 - 424x240, fps: 15-30
type: RGB24, usingFourCC: false, res: 352x288 - 352x288, fps: 15-30
type: RGB24, usingFourCC: false, res: 320x240 - 320x240, fps: 15-30
type: RGB24, usingFourCC: false, res: 176x144 - 176x144, fps: 15-30
type: RGB24, usingFourCC: false, res: 160x120 - 160x120, fps: 15-30
type: RGB24, usingFourCC: false, res: 1280x720 - 1280x720, fps: 15-30
type: RGB24, usingFourCC: false, res: 960x544 - 960x544, fps: 15-30
type: RGB24, usingFourCC: false, res: 800x448 - 800x448, fps: 15-30
type: RGB24, usingFourCC: false, res: 800x600 - 800x600, fps: 15-30
type: I420, usingFourCC: false, res: 352x288 - 352x288, fps: 15-30
type: I420, usingFourCC: false, res: 320x240 - 320x240, fps: 15-30
type: I420, usingFourCC: false, res: 176x144 - 176x144, fps: 15-30
type: I420, usingFourCC: false, res: 160x120 - 160x120, fps: 15-30
type: I420, usingFourCC: false, res: 640x480 - 640x480, fps: 15-30

Device: XSplitBroadcaster
type: RGB32, usingFourCC: false, res: 1x1 - 320x240, fps: 1-255.004
type: YUY2, usingFourCC: false, res: 1x1 - 320x240, fps: 1-255.004
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Well whatever you do, don't have XSplit running while my app is running.. secondly, this is strange. I have the same capture card with no problems. Are you absolutely sure that the FPS setting in video settings isn't at 25? When you add a device, there's an FPS setting there, then there's and FPS setting for my app. It's slightly confusing but make sure they're both at your desired FPS.
 

LordKaT

New Member
I never have xsplit running at the same time as OBS ;) I just have to have it running during the check because we stream 24/7.

Yes, both settings were set to 60fps (in the program and in the DirectShow settings). I was using 1280x720, by the way, not 1920x1080.

Incidentally, some fucking odd resolution - 1680x1050 is considered the "default" resolution in Xsplit (if that helps any).

Keep in mind that this is the 8only* thing running on the streaming computer, but the computer does not have an amazingly powerful graphics card (in fact, it's on-board IIRC). Might that have something to do with the problem, causing some congestion in the pipe?
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Post a log file, please. If you used the installer, you can access it through the start menu installation folder, or if using binaries, you can access it by typing %AppData%/OBS/logs into start/run
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
you have to have the application closed before you can access the log file, because it's currently in the state of writing it. There should be multiple log files there
 

LordKaT

New Member
Weird. Had to restart the system to get windows to play right with the permissions. Here you go.

Open Broadcaster Software v0.411a - 32bit (´・ω・`)
-------------------------------
CPU Name: AMD Phenom(tm) II X4 965 Processor
CPU Speed: 3392MHz
Physical Memory: 4095MB Total, 4095MB Free
stepping id: 3, model 4, family 15, type 0, extmodel 8, extfamily 0
=====Stream Start=====================================================================
Base resolution: 1280x720
Output resolution: 1280x720
------------------------------------------
------------------------------------------
Adapter 1
Video Adapter: ATI Radeon HD 4250
Video Adapeter Dedicated Video Memory: 264802304
Video Adapeter Shared System Memory: 2947547136
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (3- USB PnP Sound Device)
------------------------------------------
Audio Encoding: MP3
bitrate: 96
------------------------------------------
Video Encoding: x264
fps: 60
width: 1280, height: 720
quality: 8
preset: superfast
i444: no
max bitrate: 10000
buffer size: 10000
------------------------------------------
Total frames rendered: 49773, number of frames that lagged: 49772 (100.00%) (it's okay for some frames to lag)
Number of b-frames dropped: 0, Number of p-frames dropped: 0
=====Stream End=======================================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 57.084 ms] [avg calls per frame: 1] [children: 99.7%] [unaccounted: 0.317%]
| scene->Preprocess - [83.2%] [avg time: 47.522 ms] [avg calls per frame: 1]
| video encoding and uploading - [16.4%] [avg time: 9.381 ms] [avg calls per frame: 1] [children: 3.54%] [unaccounted: 12.9%]
| | CopyResource - [0.00526%] [avg time: 0.003 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [3.54%] [avg time: 2.018 ms] [avg calls per frame: 0]
==============================================================
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
well that would explain the problem - your frames are taking an average of 57 milliseconds to draw, which is 17FPS average. What are you using for your sources? The preprocessing time for your sources is taking waaay longer than it should. I really need to log that in the future I think.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
no, I know, I'm just asking whether there are any other sources in your scene or something -- the line
scene->Preprocess - [83.2%] [avg time: 47.522 ms] [avg calls per frame: 1]
is specifically where the problem lies. Everything else is working completely as expected, and working at the expected speed, so I'm rather confused
 

LordKaT

New Member
Alright man well, I did a driver and firmware update on the capture card. Guess I'm going to have to shelve OBS for a while unless this gets sorted out. I don't know what the problem could possibly be, as Xsplit doesn't exhibit this problem.

(although, Xsplit does "lag" after a while - after a few hours of streaming the video is massively delayed - perhaps the card is faulty?)
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
LordKat - Hey, sorry I haven't got back to you about this, I admit I've been constantly side-tracked with other things. But if you're only using your capture card as the source, then for some reason it's taking an extra long time to either upload the texture, or an extra long time to convert the texture, based upon the data you gave me from the log. Not that knowing any of this is useful to you necessarily, I suppose I'm just thinking out loud at this point.

See that preprocess on my computer, with the same exact capture card (I also own the avermedia c985), only takes 2 milliseconds. On yours it takes 47.5ms. I don't even really have a super fast CPU either. So either you have no CPU to spare, or you have no GPU to spare. Or your CPU has not enough cache (we have not enough minerals), but your CPU seems like it'd be fine, it seems like a fairly good one.

Here are the only suggestions I can think of:
1.) Do not watch your stream channel while streaming, as that eats up much more CPU and GPU than people realize.
2.) Turn on v-sync in your game. Having v-sync off can sometimes eat all the GPU and leave none to spare for, say, OBS to use.
3.) Mess with the "x264 CPU Preset" in advanced settings, though make sure it's only veryfast/superfast/ultrafast. Do not set it to any others.

Please let me know if any of these things end up working for you.
 

LordKaT

New Member
I've been playing around. I think the problem is the graphics card. I lowered the bitrate and buffer sizes and the FPS bumped up on the stream. (for the record, I lowered it from 10mbit/10mbytes to 6mbit/7500mbytes and the stream saw a significant improvement. YES I do have the upstream to handle 10mbit/sec up :)

I'm going to throw a spare 5770 in there and see if it helps at all. I'll report back during the week when I get the time :)
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Ah, thank you so much for testing it out with different hardware like this, most people forget that I'm still technically in alpha (though I suppose I should just go to beta as I have so few complaints in general as of late).

It's either the GPU or the CPU though, one of the two. I don't know how powerful your video card was but your CPU seemed like it'd be able to handle it. I'm kind of leaning GPU.

Wait, just browsed that GPU on google, apparently the HD 4250 is an integrated graphics chip, right? I should have seen that sooner. That could definitely be the issue. Yea, throw a dedicated card in there and see if there's a difference.
 

TTaM

New Member
I'm having a similar problem with my Avermedia card. I can't get my fps over 20, even when not streaming (preview mode) or running a game. I've disabled Aero and all that.

Open Broadcaster Software v0.421a - 64bit ( ^ω^)
-------------------------------
CPU Name: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
CPU Speed: 3400MHz
Physical Memory: 8168MB Total, 5827MB Free
stepping id: 7, model 10, family 6, type 0, extmodel 1, extfamily 0
------------------------------------------
Adapter 1
Video Adapter: AMD Radeon HD 6900 Series
Video Adapeter Dedicated Video Memory: 2129379328
Video Adapeter Shared System Memory: 4014362624
=====Stream Start=====================================================================
Base resolution: 1920x1080
Output resolution: 1920x1080
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (3- USB Multi-Channel Audio Device)
------------------------------------------
Audio Encoding: AAC
bitrate: 192
------------------------------------------
Video Encoding: x264
fps: 30
width: 1920, height: 1080
quality: 8
preset: ultrafast
i444: no
max bitrate: 3200
buffer size: 3200
------------------------------------------
Total frames rendered: 121, number of frames that lagged: 119 (98.35%) (it's okay for some frames to lag)
=====Stream End=======================================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 55.11 ms] [avg calls per frame: 1] [children: 99.4%] [unaccounted: 0.639%]
| scene->Preprocess - [85.9%] [avg time: 47.365 ms] [avg calls per frame: 1]
| video encoding and uploading - [13.4%] [avg time: 7.393 ms] [avg calls per frame: 1] [children: 4.01%] [unaccounted: 9.41%]
| | CopyResource - [0.00181%] [avg time: 0.001 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [2.56%] [avg time: 1.41 ms] [avg calls per frame: 0]
| | call to encoder - [1.45%] [avg time: 0.797 ms] [avg calls per frame: 0]
==============================================================

My card is a 6970. The above log is just from turning on the 'preview stream' bit and then turning it off a little later. I get the same results when I have a game running. The only thing in the scene is the Avermedia card (c985) as a source.

However, I get even worse performance when using software capture sources (10fps for monitor capture and 13 for window capture.) This is only with 3d applications, though. If I capture mirc or something, or a monitor source with no game running, it runs at a steady 30 or 60 fps. (The Avermedia card always stays below 20 fps, game running or not.)

Edit: I don't get this issue with xsplit, recentral or any other streaming software I've tried.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
this issue seems to only happen on CPUs that do hyperthreading or hypertransport at the moment - I think it's a problem with my YUV planar->packed conversion function in directshow, the CPU is having a cache issue and it causes it to go super slow or something, it's very weird. I'm looking into fixes at the moment to see if I can't prevent this from occuring. I need to optimize the code differently to better account for caching, because it -should- only be running at 4 milliseconds tops. it does on my machine, at least.
 
Top