-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
"audio-peak-value" property #2645
Comments
There might be a filter in libavfilter which can compute this value; then it should be retrieved with the |
Sounds great. I'm waiting for this feature. Thank you for help! |
Well, the mechanisms are already all there. I'm not sure whether libavfilter actually has a filter which does this. I thought the Maybe @richardpl is interested in implemented a filter that does this? |
If I'm not mistaken there is already filter that reports bunch of info including max and min sample value in audio, it works with floats and its name is |
Indeed, looks like this should work. For some really weird reason, it requires a |
Works excellent. Thank you! |
@lukaszmatczak this was years ago but if you happen to remember how you did this I'd love if you could share some sample code. I am trying to do the same thing to add a peak meter to my music player app that uses libmpv but I can't figure it out! |
@dweymouth I've used code like this: function send_state()
local astats = mp.get_property_native("af-metadata/level")
if astats ~= nil then
print(astats["lavfi.astats.Overall.Max_level"])
end
end
mp.add_periodic_timer(0.1, send_state) And then I could read the current level in the parent process from mpv's stdout. Also, I had to add Please note that this code is quite old and there may be a better solution now. |
Currently, external apps must use OS-dependent API to retrieve peak value of audio stream, for example IAudioMeterInformation::GetPeakValue() on Windows. Is it possible to add property like "audio-peak-value" accessible from Lua script?
The text was updated successfully, but these errors were encountered: