Motion - Support Question 2017x 03x 30x 200844

How to record video at the same time

Question

Hi there. I am trying to record audio at the same time as video, based on when motion is detected.

I have tried using arecord, as listed elsewhere in this wiki, but nothing seems to happen.

I know the oneventstart script detailed below is getting called, as the cp line works (I start with one text file - bob.txt, and end up with two, bob.txt and mike.txt).

This is a simple example, with a fixed time for the recording, and a fixed filename. I'm trying to keep things as simple as possible to eliminate reasons for it not to work.

Here are some settings that may be relevant from /etc/motion/motion.conf
###########
target_dir /home/motion

on_event_start sh /home/motion/oneventstart
###########

Here is the content of the /home/motion/oneventstart script
###########
#!/bin/bash
cp /home/motion/bob.txt /home/motion/mike.txt
record -D hw:1,0 -d 5 -f S16_LE /home/motion/temp.wav
###########




Environment

Motion version: 3.2.12
ffmpeg version: N-84804-g247d033
Libraries: ffmpeg, mysql, postgresql
Server OS: Raspbian Jessie
-- JoPitts - 30 Mar 2017

Answer

Topic revision: r1 - 30 Mar 2017, JoPitts
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.