Page 1 of 2

I need help getting audio recording to work

Posted: Sun May 31, 2020 11:23 am
by user671
Ok so I have zoneminder version 1.34.12 I think and I have this one camera that is capable of recording audio. It's a cheap IP camera I got off amazon called Alptop AT-500PE. it's a ptz 2k camera. When I connect to it through vlc I can hear through its speakers. But in zoneminder recordings I don't get the audio.
I really like zoneminder; For the most part it's worked like a charm. I just really want to get this audio recording working and I'm open to any any tips on how to get that working. Any help would be greatly appreciated. Thank you. :D

Re: I need help getting audio recording to work

Posted: Fri Jun 05, 2020 4:06 am
by user671
Does anyone know what I should do? Or can anyone point me somewhere I should look if this sort of question has already been answered?

Re: I need help getting audio recording to work

Posted: Fri Jun 05, 2020 7:41 pm
by iconnor
Have you checked the box on the storage tab next to
Whether to store the audio stream when saving an event.:

Re: I need help getting audio recording to work

Posted: Sun Jun 07, 2020 3:28 am
by user671
Yes I have the box ticked. This box correct?
https://imgur.com/a/Yx6PEsu

Re: I need help getting audio recording to work

Posted: Sun Jun 07, 2020 4:02 am
by user671
Also I made a mistake in my first post. I have zoneminder 1.34.15 not .12

Re: I need help getting audio recording to work

Posted: Sun Jun 07, 2020 3:55 pm
by iconnor
Some cameras don't encode the audio in the rtsp stream. (Like by dbell).

So the thing is if the audio is present in the stream, it should be present in the .mp4.

If it isn't, then we need to figure out where to get it from.

The best thing to do at this point is turn on debug logging and see what streams are present.

Edit: I just noticed that you said vlc plays it fine. Which tells me that there may be a problem with our handling of the audio.

So turn on debug and let's see what we get.

Re: I need help getting audio recording to work

Posted: Sun Jun 07, 2020 10:15 pm
by user671
Thank you for the replies. Where do I find the option to turn on debugging for this camera in zoneminder?

Re: I need help getting audio recording to work

Posted: Mon Jun 08, 2020 10:47 am
by user671
Is this the error that is preventing the audio stream from being recorded?
https://imgur.com/a/eC8L3Tq

Re: I need help getting audio recording to work

Posted: Mon Jun 08, 2020 10:57 am
by user671
It says error parsing AU headers... What does that mean?

Re: I need help getting audio recording to work

Posted: Mon Jun 08, 2020 7:08 pm
by user671
Where is zm_ffmpeg.cpp located in a standard zoneminder install? I was gonna investigate line 70 of that file to see what's up with it.

Re: I need help getting audio recording to work

Posted: Mon Jun 08, 2020 9:57 pm
by iconnor
The error could be it. I don't know what it means. That error is coming from the ffmpeg libraries, not zm source.

Re: I need help getting audio recording to work

Posted: Tue Jun 09, 2020 4:18 am
by user671
What should I do?

Re: I need help getting audio recording to work

Posted: Tue Jun 09, 2020 3:25 pm
by mikb
user671 wrote: Mon Jun 08, 2020 7:08 pm Where is zm_ffmpeg.cpp located in a standard zoneminder install? I was gonna investigate line 70 of that file to see what's up with it.
For future general Unix reference ... if you have locate or slocate installed, you can do this :-

# locate "zm_ffmpeg.cpp"
/usr/local/src/zoneminder/ZoneMinder-1.25.0/src/zm_ffmpeg.cpp

I know, I really should upgrade :(

For the error message from FFMPEG, always instructive to paste it exactly into Google and see what comes up :-

https://www.google.co.uk/search?q=ffmpe ... AU+headers"

Re: I need help getting audio recording to work

Posted: Wed Jun 10, 2020 6:40 am
by user671
Thank you all for the replies. I can't seem to figure out what the issue is. I think maybe it might be related to the fact that I was previously running zoneminder version 1.32.3 I think... a version of zoneminder that did not support audio recording and I upgraded to version 1.34.5 and subsequently have upgraded every time since then.

I think I'll try a fresh install of Zoneminder with 1.34.16 from the get go and see if that allows me to have audio in my recordings from that camera. I'm probably gonna do the fresh install when I have the time next week. I'll let you all know if that fixes anything.

Somewhat related, I had another question about about hardware acceleration in zoneminder. I was wondering if using something like a 980ti would help significantly in lightening the load on the server that has mutliple 4k cameras. I won't be attempting that until I do my fresh install. But I want to lighten the load on the server so I can add a doorbell camera and right now there's no way the machine will handle it with how much workload it has just to keep up with the existing cameras. Maybe a strong graphics card can reduce the stress on the cpu enough to let me get one more camera in.

Re: I need help getting audio recording to work

Posted: Thu Jun 11, 2020 3:00 am
by burger
GPU isn't used by ZM (except by advanced users).

If you need lower load on 4K cameras see: viewtopic.php?f=9&t=27537