LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Audio surveillance Linux (https://www.linuxquestions.org/questions/linux-software-2/audio-surveillance-linux-906325/)

assasukasse 10-04-2011 03:35 AM

Audio surveillance Linux
 
Hello everyone,
I would like to use my laptop as a remote surveillance in my office. I already use motion for taking snapshots, however it happens that most of the time the screen of my laptop is being closed so it becomes no use.
I am looking for a way to grab via ssh the output of the microphone which is embedded in my dell. I would like to have a stream "on demand" so that whenever i realize that the screen of my lap is closed I could listen to what is going on in the room (such as who is using my desk or my phone).
Is there something available?

corp769 10-04-2011 04:16 AM

Hello,

I came across the following online:
Code:

arecord -f dat | ssh -C user@host aplay -f dat
I'm not on linux, so I can't dig up in my misc. code for what I used to use. Let me know if that works or not for you.

Cheers,

Josh

assasukasse 10-05-2011 03:01 AM

thanks!
It works wonderfully
however i tried to modify it as following

Code:

arecord -f cd | ssh -C user@host aplay -f cd
it is also possible to omit the -f parameter and revert to an 8 bit mono stream, which is good for slow connections.

I tried to put it in a shell file:

Code:

#!/bin/bash
ssh $1 'arecord | ssh -C $2 aplay'

unfortunately it doesnt work unless authorization with rsa key is on, i was wondering if there is any command to make the second ssh wait and display the password request when needed...

corp769 10-05-2011 05:59 AM

You could always use the "read" command to get input, in this case your password, store it within a variable, and then use the variable with your ssh command.


All times are GMT -5. The time now is 12:33 AM.