You are not logged in.

#1 2016-01-14 15:27:46

mich04
Member
From: Illinois - United States
Registered: 2011-10-25
Posts: 390

Motion video recording with sound IP cameras and usb camera (Solved)

I was just wondering if anyone is running motion with sound. When I try to run the following command it produces an error.

on_event_start arecord -f S16_LE -r 22050 -D plughw:%t /home/mh/motion_data/%Y%m%d_%H%M%S_%t.wav

ALSA lib pcm_hw.c:1700:(_snd_pcm_hw_open) Invalid value for card
arecord: main:722: audio open error: No such file or directory

Right now I have been just trying my camera that is connected to the usb port then I was going to work on the ip cameras. To me it looks like arecord is trying to use the wrong module. Here is a list of what I think is available to me.

cat /proc/asound/cards

 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf9f78000 irq 21
 1 [Camera         ]: USB-Audio - USB PC Camera
                      Vimicro Co.,ltd USB PC Camera at usb-0000:00:06.1-2, high speed

Here is the source of information I have been working with.

http://www.lavrsen.dk/foswiki/bin/view/ … oRecording


I also have compiled motion using Mr-Dave from here so that I could use rstp streams and such.
https://github.com/Mr-Dave/motion

Last edited by mich04 (2016-01-19 03:39:17)


I love computers, networking and Arch Linux. Sometimes I might ask a stupid question, but please have grace with me like I would with you.

Offline

#2 2016-01-14 16:03:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,076

Re: Motion video recording with sound IP cameras and usb camera (Solved)

What do you expect %t to be? set an actual value of the card you want to record with there.

In the context of motion this will be replaced by the thread number which will likely be 0 but doesn't have to be the correct source to use as far as arecord is concerned (simply from the info you posted, would need to be 1 for the camera)

Last edited by V1del (2016-01-14 16:11:05)

Offline

#3 2016-01-16 15:50:26

mich04
Member
From: Illinois - United States
Registered: 2011-10-25
Posts: 390

Re: Motion video recording with sound IP cameras and usb camera (Solved)

I am sorry for the delayed response been busy here at the home. What card are you referring to? The source card (ip camera or /dev/video device) or the sound device of my computer? Wait after rereading your question do you mean placing thread1.conf in place of %t?

I have 6 thread files thread(0-5).conf


I love computers, networking and Arch Linux. Sometimes I might ask a stupid question, but please have grace with me like I would with you.

Offline

#4 2016-01-16 18:31:14

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: Motion video recording with sound IP cameras and usb camera (Solved)

He means that "%t" in "plughw:%t" needs to be expanded to either "1" (considering the index doesn't change among boots) or "Camera" if you want to record the sound through the microphone of the camera. The error from ALSA means that it's being expanded to some other wrong value.

Offline

#5 2016-01-19 03:38:55

mich04
Member
From: Illinois - United States
Registered: 2011-10-25
Posts: 390

Re: Motion video recording with sound IP cameras and usb camera (Solved)

ok thanks


I love computers, networking and Arch Linux. Sometimes I might ask a stupid question, but please have grace with me like I would with you.

Offline

Board footer

Powered by FluxBB