obsproject / obs-websocket

Remote-control of OBS Studio through WebSocket
GNU General Public License v2.0
3.89k stars 709 forks source link

Feature Request: Audio level monitoring (vu meter) #152

Closed dblanco215 closed 3 years ago

dblanco215 commented 6 years ago
Issue type

Feature request

Description

Sometimes, the OBS lost the audio in the scene, and I must to reset the scene to recover the audio channel. Are there any way to check if I have any audio level in the scene to automate the scene reset?

Technical information
TStod commented 6 years ago

Can you clarify if this is a bug in OBS that you are trying to mitigate with obs-websocket?

If so definitely file a bug with the obs-studio project with a reproduction case if possible!

dblanco215 commented 6 years ago

Thanks for your response! I sent a request to the OBS team about the audio issue, but I want to ask with the OBS-WebSocket the audio input level for some reasons, like check if the audio input level of a source it's too high or if there aren't any audio entrace in a source.

Best regards and many thanks for your help.

karlthepagan commented 4 years ago

I sometimes experience a similar issue with USB devices disconnecting. Most often this is a hardware bug or a camera has gone to sleep. I would find this feature useful for monitoring my system health.

suryaprasad7500 commented 3 years ago

Anyone working on this issue?

tt2468 commented 3 years ago

Planned for 5.x

Mr-Mmhhmm commented 2 years ago

Is this currently functional? I see the "InputVolumeMeters" event listed in the docs, and wrote some code to subscribe to it, but it doesn't seem to get hit, or throw any errors...

const obs = new OBSWebSocket();

obs.connect(undefined, "password").then((res) => {
    console.log(res);
}, (error) => {
    console.error(error);
});

obs.on("InputVolumeMeters", (data) => {
    console.log(data);
});

Windows 10 OBS 27.2.4 WebSocket 5.0.0

Miniontoby commented 1 year ago

@Mr-Mmhhmm Try this:

const obs = new OBSWebSocket();

obs.connect(undefined, "password", { eventSubscriptions: OBSWebSocket.EventSubscription.All | OBSWebSocket.EventSubscription.InputVolumeMeters }).then((res) => {
    console.log(res);
}, (error) => {
    console.error(error);
});

obs.on("InputVolumeMeters", (data) => {
    console.log(data);
});