Getting the Status Bar Info

Is there a way to get the stream time, dropped frames, current fps and bit rate and pass them to a plugin?
The OBS API doesn't appear (although I may well be wrong) to have any way of doing this and I can't get the information using a SendMessage.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
There is no way to query that information via plugin in the current version of OBS, no
 
I went poking around in the OBS files and came up with the following for getting out the status bar info:

Code:
API.cpp
under class OBSAPIInterface : public APIInterface
under public:

virtual UINT GetCaptureFPS() const		{return App->captureFPS;}
virtual UINT GetbytesPerSec() const		{return App->bytesPerSec;}
virtual UINT GetTotalFrames() const		{return App->network->NumTotalVideoFrames();}
virtual UINT GetFramesDropped() const	{return App->curFramesDropped;}
virtual UINT GetTotalStreamTime() const 	{return App->totalStreamTime;}

APIDefs.cpp

UINT OBSGetCaptureFPS()			{return API->GetCaptureFPS();}
UINT OBSGetbytesPerSec()			{return API->GetbytesPerSec();}
UINT OBSGetTotalFrames()			{return API->GetTotalFrames();}
UINT OBSGetFramesDropped()		{return API->GetFramesDropped();}
UINT OBSGetTotalStreamTime()		{return API->GetTotalStreamTime();}

APIInterface.h
under public:

virtual UINT GetCaptureFPS() const=0;
virtual UINT GetbytesPerSec() const=0;
virtual UINT GetTotalFrames() const=0;
virtual UINT GetFramesDropped() const=0;
virtual UINT GetTotalStreamTime() const=0;

under //C-style API exports

BASE_EXPORT UINT OBSGetCaptureFPS()
BASE_EXPORT UINT OBSGetbytesPerSec();
BASE_EXPORT UINT OBSGetTotalFrames();
BASE_EXPORT UINT OBSGetFramesDropped();
BASE_EXPORT UINT OBSGetTotalStreamTime();

I would be appreciative if these were considered for inclusion. If they don't make it, that's ok. I suspect this probably isn't the bast way of requesting this but I'm not sure how else to go about it.
 

Krazy

Town drunk
Adding new features/capability for the current codebase of OBS probably won't happen. Something like this will almost certainly be available after the rewrite is completed.
 

dodgepong

Administrator
Community Helper
This thread is nearly 4 years old, so this is a hyper necro, but yes, all these things are available in OBS Studio's API. What do you need to do?
 

trophyking

New Member
This thread is nearly 4 years old, so this is a hyper necro, but yes, all these things are available in OBS Studio's API. What do you need to do?

So sorry for activate this thread , I just want to get the stream time, dropped frames, current fps and bit rate and pass them to a monitor DB or log file.

Thank you for supply this information, i will check the OBS Studio's API.
 
Top