How to record sound 24/7
I want to record sound from a particular microphone on a Windows 7 for an extended period of time.
The computer is on 24/7.
How can I achieve this?
Background
My neighbor is causing problems saying that I'm making noise even when I am not home. I thought of the idea of recording sound levels in my flat for factual evidence in-case this ever turns sour.
Short answer
Create a scheduled task and use ffmpeg together with a batch file to record your microphone.
Long answer
Download ffmpeg-XXXX-win32-static.7z for Windows and extract it with 7-zip or Winrar
Copy
Bin\ffmpeg.exe
to a folder of your choice (You can delete the other files & folders)-
Create a new text file and paste the following code.
Save the file as record.cmd in the same folder as your ffmpeg.exe@echo off mkdir "My records" set outputpath=My records\record_%date:~-2,2%%date:~-7,2%%date:~-10,2%_%time:~-11,2%%time:~-8,2%.mp3 ffmpeg -f dshow -i audio="My microphone" -y -t 01:00:00 "%outputpath%"
Replace My microphone with your own microphone name.
To get the name, open a CMD Window and head over to your ffmpeg.exe.
This command lists all available devices:ffmpeg -list_devices true -f dshow -i dummy
Create as scheduled task (Win+R » Taskschd.msc) and point it to your record.bat.
Let it run each full hour so ffmpeg can split your audio in 1-hour files.
The result after some hours
Additional help
- All used commands are explained at the ffmpeg documentation
- It is possible to execute the whole process in a hidden window or in the background
- It is also possible to start and stop the task per shortcut
- Change the record time ("01:00:00") or output path ("My records\record") to your needs