Problems With Sound Notification

Support and queries relating to all previous versions of ZoneMinder
Locked
itsthemedication
Posts: 33
Joined: Mon Jul 12, 2004 3:11 pm

Problems With Sound Notification

Post by itsthemedication »

I can't get sound notification to work. I have done the following:

1. Made sure that KDE is handling sounds properly -- it is.
2. Set the sounds directory to zm/sounds (the ? says the directory is relative to the web directory root - i've tried absolute and relative paths)
3. Installed a sound from the KDE sounds directory into the zm/sounds directory and set ownership/group to apache/apache permissions to 777.
4. Typed the name of the sound into the appropriate box in zoneminder's options - KDE_Beep_Door.wav

The events come and go, and nary a beep. What am I doing wrong?

Thanks in advance...
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Set the sounds directory to zm/sounds
Set it to the default "sounds"
Made sure that KDE is handling sounds properly -- it is.
In KDE configuration disable the sound system. I know this is counter-intuitive, but KDE uses ARTS sound server which will take over /dev/dsp. Just tried it here, (never did before) and it works :)

Ross
itsthemedication
Posts: 33
Joined: Mon Jul 12, 2004 3:11 pm

Thanks...

Post by itsthemedication »

Thanks for the fast reply. Really appreciate it. And, yes, counterintuitive doesn't even come close to describing the fix - I suppose this might make a good addition to the manual.

Thanks, again.

:D
itsthemedication
Posts: 33
Joined: Mon Jul 12, 2004 3:11 pm

No /dev/dsp found

Post by itsthemedication »

Well, no luck, so I went looking and there is no /dev/dsp. Also, I reinstalled from scratch and lo and behold one of the error messages you get is that /dev/dsp does not exist and it says something about switching to alsa (can't remember exactly). After it gets all done there is sound - but there is no /dev/dsp device.

I know this has to be a stupid newbie problem, but I have no idea how to create a /dev/dsp device.

Thanks in advance.
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Our systems will differ depending on what soundcard or sound chipset is used. On my system /dev/dsp is a symlink to /dev/sound/dsp. You could check if that exists, and if so create the symlink like this :
cd /dev
ln -s sound/dsp dsp

If /dev/sound/dsp is missing check if sound will work with KDE. If the KDE sound system is working we know that the driver for your soundcard is fine.

Let me know what you find.

Ross
itsthemedication
Posts: 33
Joined: Mon Jul 12, 2004 3:11 pm

Last Thoughts - Still No Sound

Post by itsthemedication »

I just cannot get sound notification to work. I reinstalled the entire program, and the system is set up exactly like you said with the symbolic link in /dev/dsp pointing to /dev/sound/dsp. I have placed the KDE_Beep_Door.wav in the /var/www/html/zm/sounds directory and set ownership to apache/apache and permissions to 777. I have disabled sound in KDE (it was working fine), and restarted the computer, checked the box "play sound," placed the name of the sound in the corresponding box (and checked it many times for upper/lower case mistakes, etc.

Watching streaming video in MotDetec, get the red alert notice, and nothing. I fact I went trhough this entire procedure 3 times (complete new install) hoping I would stumble on to the solution.

Sound is important to the project I am working on. I know I've done something stupid, but if I ask very nicely and meekly, do you think the next livecd might come setup with sound?

And I sure do appreciate all your help.

Thanks!
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

do you think the next livecd might come setup with sound?
I'll set up what I can in Zoneminder. Of course the livecd uses hardware detection, and configures the soundcard drivers. So results may not be 100%.

In the meantime let's not give up. It could be something very simple. With KDE sound system disabled, try entering this command in a terminal:

play /usr/share/sounds/pop.wav

Did you hear a pop? :)

If not launch kmix and make sure at least Master and PCM output channels have green lights and the slider is partway up.

The idea here is to nail down the problem. If "play" works then the problem is probably ZM configuration. If "play" doesn't work, you will probably get some error messages in your console, or it thinks it worked and it's probably a mixer setting.

Explore a little and let me know how it goes.

Ross
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Quick question itsthemedication,
With zm up and running and the sound that you have set in the sounds dir (the setup Ross suggusts is correct).
Have you tried using another machine to view a camera and see if the sound works that way. This will let you know if the zm config is correct or not. then you can chase the hardware issue on the zm machine. At least you'll have it working for remote viewing.
As for creating a DEv point I think (could be wrong) that this is done with "mknod" cmd.
BTW Ross, Thank you for your work and of course same to Phil.
Cheers,
Cordel
itsthemedication
Posts: 33
Joined: Mon Jul 12, 2004 3:11 pm

Checking with play

Post by itsthemedication »

Ok, wow, thanks for the support. Not often that the people responding don't want to give up on the problem!

I have tried the following while logged in as a superuser while ZM was running:

play /usr/share/sounds/KDE_Beep_Door.wav

got the beep, and also got a message from --> sox:it appears the soundcard only supports 2 channels, overriding format

then I did the following:

play /var/www/html/zm/sounds/KDE_Beep_Door.wav

again, got the beep, and also got a message from --> sox:it appears the soundcard only supports 2 channels, overriding format

So, it appears that the sound card is working and and that the wav file in the zm/sounds directory is valid (it is set for apache:apache 777).

I have not tried a remote computer. I will dig out a crossover cable and do that tonight.

Thanks!!
itsthemedication
Posts: 33
Joined: Mon Jul 12, 2004 3:11 pm

Checking with play

Post by itsthemedication »

Ok, wow, thanks for the support. Not often that the people responding don't want to give up on the problem!

I have tried the following while logged in as a superuser while ZM was running:

play /usr/share/sounds/KDE_Beep_Door.wav

got the beep, and also got a message from --> sox:it appears the soundcard only supports 2 channels, overriding format

then I did the following:

play /var/www/html/zm/sounds/KDE_Beep_Door.wav

again, got the beep, and also got a message from --> sox:it appears the soundcard only supports 2 channels, overriding format

So, it appears that the sound card is working and and that the wav file in the zm/sounds directory is valid (it is set for apache:apache 777).

I have not tried a remote computer. I will dig out a crossover cable and do that tonight.

Thanks!!
itsthemedication
Posts: 33
Joined: Mon Jul 12, 2004 3:11 pm

Checking with play

Post by itsthemedication »

Ok, wow, thanks for the support. Not often that the people responding don't want to give up on the problem!

I have tried the following while logged in as a superuser while ZM was running:

play /usr/share/sounds/KDE_Beep_Door.wav

got the beep, and also got a message from --> sox:it appears the soundcard only supports 2 channels, overriding format

then I did the following:

play /var/www/html/zm/sounds/KDE_Beep_Door.wav

again, got the beep, and also got a message from --> sox:it appears the soundcard only supports 2 channels, overriding format

So, it appears that the sound card is working and and that the wav file in the zm/sounds directory is valid (it is set for apache:apache 777).

I have not tried a remote computer. I will dig out a crossover cable and do that tonight.

Thanks!!
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Digging a little deeper here I find I made some wrong assumtions. It appears that ZM serves out the sound to the browser which must have a plugin of some type to play it. Anyone with more insight please correct me if this is wrong. I had assumed that the server played the sound file directly.

I now believe the problem with your system may be lack of the plugin to handle the sound. I dont have a livecd 1.19.1 system handy to check but it may need a package called mozplugger which allows the browser to use sox as a plugin. If its missing, try installing it.

I will make sure the next version livecd ships ready for sound notification.

Best regards,

Ross
itsthemedication
Posts: 33
Joined: Mon Jul 12, 2004 3:11 pm

Sound At Last!

Post by itsthemedication »

Yep, as soon as got rid of all the old urpmi links and set the links for the 10.0 official version and then downloaded mozplugger 1.5, everything started to work. I initially had some problems with firefox not seeing mozplugger so I uninstalled mozplugger, installed mozilla, then installed mozplugger and then all the sudden both mozilla AND firefox saw mozplugger. Bottom line is that mozplugger is the hidden link.

Anyway, thanks so much for everyone's help. I understand why sound is set up like this - so that remote monitoring can take advantage of it - but I really think it should be a possible enhancement idea for a furture version to allow sound to handled in this fashion AND also have the server play a sound locally.

Thanks again!
Locked