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

Is it possible to access Audio buffers to retrieve info for a VUMeter? #39

Open
ruirodrigues-eyenov opened this issue Jul 12, 2022 · 8 comments

Comments

@ruirodrigues-eyenov
Copy link

Basically I would like to show a VUmeter with the audio volume/gain/amplitude being sent when streaming.
I could not found any way, I wonder if that is possible?
Thanks

@ThibaultBee
Copy link
Owner

ThibaultBee commented Jul 12, 2022

Hello :)

I was kind of expecting this request.
There is a branch where you can get peak and/or rms value of each audio channels: https://github.com/ThibaultBee/StreamPack/tree/feature/vu-meter. I just rebased it. Is it what you are looking for? Are you going to use rms and/or peak value?

The only things missing for now is that when preview is running, you won't get any value cause audio capture is not running and I still don't really know how to implement this part.

Regards,
Thibault

@ruirodrigues-eyenov
Copy link
Author

Hello :)

this is great! exactly what I wanted! thanks :)

I don't need the values while previewing but from what I can understand you can just startRecording on the AudioRecord and discard the Frames after getting the measurements.

@ThibaultBee
Copy link
Owner

Hi,
This is the issue: there aren't any audio frames when encoder is not running. It means that you can only access audio frame when StreamPack is live streaming.

@ruirodrigues-eyenov
Copy link
Author

Yes, I know. To get audio frames you need to start recording when preview starts and discard audio frames instead of streaming them. But in my case this isn't an issue at all.

Another question on a different matter: Is it possible to get any metrics from streaming? just wondering :)

@ThibaultBee
Copy link
Owner

What metrics do you have in mind?

@ruirodrigues-eyenov
Copy link
Author

latency, bandwidth, frame rate, bitrate. I am not sure if those are possible at all.

@ThibaultBee
Copy link
Owner

Do you use SRT or RTMP?
I guess it is quite easy to return latency, bandwidth and network bitrate with SRT, not sure about RTMP.

@ruirodrigues-eyenov
Copy link
Author

SRT 😄

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

2 participants