Gunshot Detection?

IReallyLikePizza2

Known around here
May 14, 2019
2,358
5,600
Houston
Long shot, but since I updated Blue Iris I noticed there is the option to do sound detection now, with volume and frequency

Has anyone gotten this tuned for gunshots?

Of course testing it is tough... Generally people don't like it when I go out front and fire off guns in the air (Even if everyone else is doing it...)
 
  • Like
Reactions: mat200
I have set it up but the few times there were gunshots it didn't detect.

But like you said it is hard to test lol.
 
  • Like
Reactions: mat200
So there are a few things that I do when I am setting up.. I use 22 blanks and 12ga blanks as firing into the air isn't a great idea what goes up must come down.. One 4th of July I was almost hit by someone that shot 00buckshot and one of the led balls landed less then a foot from where I was standing at the time and no clue where the person shot from.. The impact was enough to leave a divot in my concrete driveway where it hit and didn't bounce..
 
My neighbors must have a source of good fireworks because they are setting them off quite frequently throughout the year.
I would assume I would get a lot of false positives if I attempted any kind of gunshot detection.
Most people cannot tell the difference between fireworks and gunshots even though they fervently insist that they can.

Even the shotspotter that many cities use has a hard time. Some cities turn it off on the 4th of July.
Saw a press release that they have a new AI system that is supposedly better at discerning the difference.
 
Long shot, but since I updated Blue Iris I noticed there is the option to do sound detection now, with volume and frequency

Has anyone gotten this tuned for gunshots?

Of course testing it is tough... Generally people don't like it when I go out front and fire off guns in the air (Even if everyone else is doing it...)


Some moron (drunk, high, or just inconsiderate and stupid) seems to enjoy emptying a clip at 2 AM somewhere within earshot. Woke me from a sound sleep Sunday morning with a rapid succession of 9 shots. It was loud, but difficult to pinpoint where it came from.

At the time I thought about calling the police, but what would I tell them - I heard a noise? I couldn't direct them anywhere but a general direction.

That lead me to examine my cameras for a recording, which of course there was none. I did find the setting for sound in the Audio->Audio Analysis section, but I don't really have a clue as to how to set it up to capture the sounds of gunshots or if there is even a way to do that at this point with BI.

Did you make any progress on it and if so, would you please share your settings?

Thanks.
 
  • Like
Reactions: mat200
Some moron (drunk, high, or just inconsiderate and stupid) seems to enjoy emptying a clip at 2 AM somewhere within earshot. Woke me from a sound sleep Sunday morning with a rapid succession of 9 shots. It was loud, but difficult to pinpoint where it came from.

At the time I thought about calling the police, but what would I tell them - I heard a noise? I couldn't direct them anywhere but a general direction.

That lead me to examine my cameras for a recording, which of course there was none. I did find the setting for sound in the Audio->Audio Analysis section, but I don't really have a clue as to how to set it up to capture the sounds of gunshots or if there is even a way to do that at this point with BI.

Did you make any progress on it and if so, would you please share your settings?

Thanks.

Are you saying you record 24/7 and played back around 2am and didn't hear them?

Maybe you were dreaming LOL.
 
So one thing you will want to make sure you do if you have any alarms setup is that you have the alarms set to record in the camera if recording to Micro SD or in your NVR if you are using a NVR.. When I setup audio alarms and there is an event it will be recorded and able to be searched using the Alarm search.. Also will show in your search or playback area of the channels. So if you have setup audio alerts in your camera or NVR you will want to make sure that your schedule is setup to record such events..
 

Attachments

  • Screenshot (13).png
    Screenshot (13).png
    92.5 KB · Views: 0
  • Like
Reactions: eyeball
Yeah I do. Red hash marks are for sound detection

Quite noisy with a Heron uprising of some kind this morning

SmartPSSLite-RedSoundMarks.jpg
 
  • Like
Reactions: Revo2Maxx
Long shot, but since I updated Blue Iris I noticed there is the option to do sound detection now, with volume and frequency

Has anyone gotten this tuned for gunshots?

Of course testing it is tough... Generally people don't like it when I go out front and fire off guns in the air (Even if everyone else is doing it...)

in my hood fireworks vs gunshots are always the question for me.

Normally I end up looking up in the sky for the fireworks lights. Yet, that only seems to help a bit.

I recall seeing one reason why fireworks are banned in some cities is that they are using gunshot detectors and wanted to reduce false reports from the system.


I do find it frustrating that my tax dollars are used for research that gets blocked by paywalls ..


1739217803627.png
 
Last edited:
The audio detection analysis in Blue Iris can be fine tuned to react to only a certain frequency, it is not just volume level triggered, it looks at certain specific frequencies to trigger on.
But you must take the time to set it up properly. See the appropriate section in the Blue Iris help file for more.
So glad you pointed this out. Did not realize that Ken updated this capability in BI. I have been using Blue Iris audio trigger/alerts on the inside cameras for my home alarm system and smoke detector for years. I am my Own home alarm monitor. I get occasional false triggers when the local Coast Guard helicopter makes a low fly over (low frequency). It literally rattles and shakes the house. I will try tweeking the frequency response to a higher freq for the inside alarms and see if I can stop false alerts.
 
The audio detection analysis in Blue Iris can be fine tuned to react to only a certain frequency, it is not just volume level triggered, it looks at certain specific frequencies to trigger on.
But you must take the time to set it up properly. See the appropriate section in the Blue Iris help file for more.

Very cool feature
 
I've been trying to tune it for gunshots and have had no luck, without going out there and popping off a few rounds in the air, its just not possible to get the tuning right!
 
This should be very hard to get right, I think. There are so many different firearms and ammo and so many of them do not sound the same, at least to my ears. But then again, I am not accustomed to hearing gunshots without hearing protection on. But I can tell the difference between rifles and pistols at some distance. The AR vs AK is quite noticeable.

I was thinking one could go to a gun range and record different shots and analyze the frequency content. Wonder how much overlap there would be from different firearm sources? Wonder if fireworks have a different range? I bet echos and reflections would make it even harder to tell the difference. What about the crack (supersonic) vs the bang?

When I first got a good paying job, I bought some nice stereo equipment (late 70s). Nice high-end turntable for my vinyl records. Clicks and pops were always the bane of those albums. I bought something called the 'Click and Pop Assassin'. It removed any high amplitude event that had a rapid rise time and end time. There was a slider that made it more or less intrusive. There was also a switch that would invert the output so that you only heard what was removed. This was all analogue of course. I imagine that is what the shotspotter does, but probably also uses a frequency range.
 
You are not going to be able to determine the difference in the sound of a distant fireworks/gunfire using the quality of microphones built into cameras.
Even fancy microphones are not going to really help with that problem.

What is more feasible with good equipment is to detect the supersonic crack of the bullet.
"Most" gunshots result in a projectile moving faster than the speed of sound and that creates a supersonic crack.

That does not happen with "most" fireworks.

That is essentially what shotspotter tries to do and they are not 100% accurate.

I Attached an mp3 file. It is a recording from the internal mic of a hikvision camera.

A mentally ill man with a gun barricaded himself in a house 147 yards from my house.
Police ended up shooting him after he stuck his gun out of the window.

A mix of shotguns, rifles, and pistols were all fired.

Also have a recording of fireworks from the 4th of July on the same camera at a similar distance.

Input both of them into an oscilloscope to look for ways to try to determine a difference.

Personally, I would not waste any more cycles attempting to do anything with the quality of mic inside of a security camera.
 

Attachments

Added to the complexity of the problem is the fact that distance will alter the sound that reaches the microphone. Something that is close by will have a full frequency response. But as the origin of the sound gets farther and father away, the sound will contain less and less high frequencies (which are prone to being blocked by objects and generally lose their energy quicker than low frequencies). It's why sounds that originate father away will contain lower frequencies and often don't contain the higher frequencies (like thunder for example).
 
in my hood fireworks vs gunshots are always the question for me.

Normally I end up looking up in the sky for the fireworks lights. Yet, that only seems to help a bit.

I recall seeing one reason why fireworks are banned in some cities is that they are using gunshot detectors and wanted to reduce false reports from the system.


I do find it frustrating that my tax dollars are used for research that gets blocked by paywalls ..


View attachment 214170
Maybe ask your congressman to outlaw paywalling research that was funded (say, over 50%) by Federal tax dollars?
 
Added to the complexity of the problem is the fact that distance will alter the sound that reaches the microphone. Something that is close by will have a full frequency response. But as the origin of the sound gets farther and father away, the sound will contain less and less high frequencies (which are prone to being blocked by objects and generally lose their energy quicker than low frequencies). It's why sounds that originate father away will contain lower frequencies and often don't contain the higher frequencies (like thunder for example).
They do make inexpensive external mics for security cameras. I'd have to hunt the link but bought a couple recently. The only info on the boxes is USA Sale Group, Model number: 008 and titled "Microphone for CCTV Security Camera". They had good reviews but I haven't tested them yet.