Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real time volume levels #41

Closed
nospam2k opened this issue Dec 29, 2022 · 12 comments
Closed

Real time volume levels #41

nospam2k opened this issue Dec 29, 2022 · 12 comments

Comments

@nospam2k
Copy link

nospam2k commented Dec 29, 2022

Is it possible to see real time volume levels? It would be useful to just verify that sound is working for stream.

@Kounex
Copy link
Owner

Kounex commented Jan 2, 2023

That would be an awesome feature but that's not possible with the WebSocket as of now. It would produce a lot of "bandwidth" as well since we would need the current volume level very frequently (like 5 to 10 or even more times a second) to be a useful volume meter and that might cause delays of other requests / events etc.

Maybe there will be a feasible way in the future!

@nospam2k
Copy link
Author

nospam2k commented Jan 3, 2023

Interesting. How are you getting the preview video? I would think that would be much more bandwidth.

@Kounex
Copy link
Owner

Kounex commented Jan 5, 2023

Good question! Since the API itself does not offer something like a live video feed, I'm bound to requesting screenshots (which will return the base64 representation of the image) and will display this in the app. Every time this request finishes, I'm making a new one.

This shows how fast these requests are being handled - that's why the preview is laggy and on devices with weaker hardware is sometimes even causing overall performance problems.

Now talking about the volume levels: these would need a higher frequency of requests to actually work since voice changes happen really fast. Additionally since we can potentially have several items with volume levels, it would only amplify this problem.

And currently it's not even possible to request the current volume level at all from the API. I read a discussion in the WebSocket Discord server a while ago where the developers also mentioned the different problems behind such a feature and why it has not been implemented etc.

@nospam2k
Copy link
Author

nospam2k commented Jan 5, 2023

I was recently sent this from obs-web. I was going to try and implement something on my own, but I didn't want to reinvent the wheel. I'm interested in your thoughts.

For real-time volume events, see
https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#inputvolumemeters

There are also these methods:
https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#getinputvolume
https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#setinputvolume

@nospam2k
Copy link
Author

nospam2k commented Jan 5, 2023

For me personally, I'm just looking for verification that the audio source is actively working. I just want someone to be able to see the livestream is working from a tablet so they don't have to sit next to the computer. Even something like a flashing green dot (or black, green, yellow, red, dot) just to give an indication the audio source is functioning.

@Kounex
Copy link
Owner

Kounex commented Jan 5, 2023

Oh nice, didn't know 5.1.0 has been released containing this event, thanks for showing me!

I will do some testing to see if and how I could integrate it into OBS Blade :)

@nospam2k
Copy link
Author

nospam2k commented Jan 5, 2023

Cool!

@Kounex
Copy link
Owner

Kounex commented Jan 16, 2023

Okay okay, it works better than expected, need to bundle some general stuff into the app and then I will ship a new release :)

volume.mp4

@nospam2k
Copy link
Author

This is fantastic! I really appreciate your efforts!

@Kounex
Copy link
Owner

Kounex commented Jan 21, 2023

Part of OBS Blade 3.2.0 which I have submitted to the App Store - should be available soon 😊

@iesv
Copy link

iesv commented Jul 20, 2023

web_remote_for_OBS: https://github.com/dvangennip/web_remote_for_OBS

@nospam2k
Copy link
Author

nospam2k commented Jul 21, 2023

@iesv - from the website. This is what was implemented in Blade. It also mentions it's not optimized for mobile.

Audio list has space dedicated for visual audio volume meters, but that functionality is not yet available in obs-websocket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants