How to record sound 24/7

Short answer
Create a scheduled task and use ffmpeg together with a batch file to record your microphone.

Long answer

  1. Download ffmpeg-XXXX-win32-static.7z for Windows and extract it with 7-zip or Winrar

  2. Copy Bin\ffmpeg.exe to a folder of your choice (You can delete the other files & folders)

  3. 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%"
    
  4. 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 enter image description here

  5. 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

enter image description here

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