Skip to content

Instantly share code, notes, and snippets.

@rytsikau
Created April 8, 2021 11:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rytsikau/d678fb4bd32c16fefade1d0ac96668b0 to your computer and use it in GitHub Desktop.
Save rytsikau/d678fb4bd32c16fefade1d0ac96668b0 to your computer and use it in GitHub Desktop.
Simple voice audio recording on Windows PC
@echo off
set DIROUTPUT="d:\Recordings"
set FFMPEG="c:\Program Files\FFmpeg\ffmpeg.exe"
rem TO LIST AVAILABLE DEVICES:
rem %FFMPEG% -hide_banner -list_devices true -f dshow -i dummy
rem pause & exit
rem SET DEVICE NAME:
set DEVICE="..."
set TM=%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%
set TM=%TM: =0%
set PATH="%DIROUTPUT%\%Date:~6,4%%Date:~3,2%%Date:~0,2%-%TM%_microphone_recording.aac"
@echo Recording...
%FFMPEG% -loglevel quiet -stats -hide_banner -f dshow -i audio=%DEVICE% -c:a aac %PATH%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment