Skip to content

Feat: Using audio motion analyzer#4393

Merged
connortechnology merged 43 commits intoZoneMinder:masterfrom
IgorA100:patch-435415
Apr 18, 2026
Merged

Feat: Using audio motion analyzer#4393
connortechnology merged 43 commits intoZoneMinder:masterfrom
IgorA100:patch-435415

Conversation

@IgorA100
Copy link
Copy Markdown
Contributor

@IgorA100 IgorA100 commented Jul 26, 2025

There are still some changes that need to be made to the BD:
ALTER TABLE `Monitors` ADD `WhatDisplay` enum('OnlyVideo','OnlyAudioVisualization','VideoAudioVisualization') NOT NULL DEFAULT 'OnlyVideo' AFTER `Decoding`;

@IgorA100
Copy link
Copy Markdown
Contributor Author

Watch page
1111

Monitor page
1112

Will these names be ok or do I need to change something?

@connortechnology
Copy link
Copy Markdown
Member

I guess it's ok. I would have gone with a toggle for video and a toggle for analysis, but either way gets the job done.

@IgorA100
Copy link
Copy Markdown
Contributor Author

I would have gone with a toggle for video and a toggle for analysis,

Yes, I wanted to do it that way.
But, for example, for the Monitor page we will have to add another field to the DB to disable ZMS JPEG, for example "ZMSEnabled".
I have some sketches. For example, it could look like this:
1
2
3

This is a multi select in which you can select the necessary players or disable them all.
The checkboxes will be in the "disabled" state, but the "tick" will be automatically checked or unchecked depending on whether the player is selected in the multi select or not.
If you agree, I will do this as a separate PR.

@IgorA100
Copy link
Copy Markdown
Contributor Author

I would have gone with a toggle for video

I've done a lot already, but... I came to the conclusion that Player = None is wrong. To play only audio, we still need a player. It can be either go2rtc or rtsp2web.
We can't turn off the player completely, because in this case nothing will be played at all.
I'll have to stop at the option: #4393 (comment)
I can make a PR regarding this switch #4393 (comment)
But without the "None" option. Should I make a PR or leave everything as it is now?

@connortechnology
Copy link
Copy Markdown
Member

Let's leave the player issues aside. I disagree with adding options to disable zms playback, as that is the fallback when all else fails. People get confused when there are too many options to configure.
I think for now this PR should simply add the Show audio visualisation feature. Leave the rest for another day.
I am targetting Christmas for release now, so we could get this in soon.

@IgorA100
Copy link
Copy Markdown
Contributor Author

IgorA100 commented Nov 2, 2025

I disagree with adding options to disable zms playback,

I don't want to disable ZMS either.
I'm just busy with my main job right now and have put off working on this PR for a bit.
But I hope to finish this PR soon.

- Clear IconMute when executing destroyVolumeSlider()
- Added the ability to clear the icon state to changeStateIconMute()

MonitorStream.js
- Set #volumeControls to "disabled" instead of "hidden"
- Don't execute controlMute() when executing createVolumeSlider()

Added:
audioMotionAnalyzer.js
@IgorA100 IgorA100 marked this pull request as draft March 21, 2026 20:58
@IgorA100 IgorA100 marked this pull request as ready for review March 21, 2026 21:38
@IgorA100
Copy link
Copy Markdown
Contributor Author

@connortechnology
I've made the changes.
I've left a comment under each of Copilot's suggestions.
I consider this PR complete.
You can begin testing it.
I'll be awaiting your decision.

@IgorA100
Copy link
Copy Markdown
Contributor Author

Isaac, have you checked this PR yet?
I'm curious to know your opinion?

@IgorA100
Copy link
Copy Markdown
Contributor Author

@connortechnology
If you tested this PR, I'd be grateful.
If you approved this PR, I'd be doubly grateful, and I'd continue working on improving it.
I'm not rushing you, but I can't continue working on it.

IgorA100 and others added 2 commits April 12, 2026 11:24
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@IgorA100
Copy link
Copy Markdown
Contributor Author

@connortechnology
Isaac, I'm sad and I have a bad feeling....
Or do you simply not have time to check this PR?

@connortechnology connortechnology merged commit 1485a7e into ZoneMinder:master Apr 18, 2026
8 of 9 checks passed
@connortechnology
Copy link
Copy Markdown
Member

Needs a little polish I think.

Initially it was displaying no video, I suspect due to no value for What Display. Upon selecting there everything started to appear.

I wonder if we should relocate the analyzer to a side column. We keep losing a lot of vertical space, which then reduces the width of the video.

Instead of What Display, just say Display: or even Show: just because it's shorter.

@connortechnology
Copy link
Copy Markdown
Member

I have reverted this. We cannot include audiomotion.dev js file. It is GNU Affero licensed which is incompatible with our gplv2. THe end user will have to install it themselves.

@IgorA100
Copy link
Copy Markdown
Contributor Author

I'm not very familiar with the intricacies of the licensing system, but isn't it possible to incorporate AGPL-3.0-licensed code into GPLv2-licensed code without modification?
So, is this PR doomed?

@IgorA100
Copy link
Copy Markdown
Contributor Author

I'm in complete shock.
This turned out to be a very good solution, and it's doomed.
Sorry, Isaac.

@IgorA100
Copy link
Copy Markdown
Contributor Author

Needs a little polish I think.

It's probably no longer necessary :(

@IgorA100
Copy link
Copy Markdown
Contributor Author

Isaac, I'm not sure you'll like this, but maybe I should rewrite the code so that if the file web/skins/classic/assets/audioMotion-analyzer/src/audioMotion-analyzer.js is missing, ZM will behave as it does now (without the additional UI selectors). If the user adds the file "audioMotion-analyzer.js," everything will work.
That is, create an empty folder "web/skins/classic/assets/audioMotion-analyzer/src/" without the JS file.

@IgorA100
Copy link
Copy Markdown
Contributor Author

@connortechnology
We can make a button in ZM, when clicked by the user, the file will be downloaded from the link: https://cdn.jsdelivr.net/npm/audiomotion-analyzer@4.5.4 and the file will be placed in the folder "web/skins/classic/assets/audioMotion-analyzer/src/"
This does not violate the license rights AGPL-3.0 and GPLv2
True, in this case, support for versioning ZM and audiomotion-analyzer is required

@IgorA100
Copy link
Copy Markdown
Contributor Author

@connortechnology
Can I create another PR where the audioMotion-analyzer.js file won't be loaded by default?
And the user will have to download it to the appropriate folder?
I've already started working on this.

@connortechnology
Copy link
Copy Markdown
Member

Yes that is what you should do. Also make sure it doesn't break if the file isn't there

@IgorA100
Copy link
Copy Markdown
Contributor Author

Wow, Isaac, you're my savior!
Of course, if the file is missing, nothing will break!

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

Successfully merging this pull request may close these issues.

4 participants