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