Skip to content

Instantly share code, notes, and snippets.

@DouglasAntunes
Last active October 29, 2019 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DouglasAntunes/585f1f51a0b987fa01b9e904402e04d5 to your computer and use it in GitHub Desktop.
Save DouglasAntunes/585f1f51a0b987fa01b9e904402e04d5 to your computer and use it in GitHub Desktop.
@ECHO OFF
REM ########################################################################
REM Created by DouglasAntunes
REM Find updated script on https://gist.github.com/DouglasAntunes
REM ########################################################################
REM Folder Structure:
REM original :input for .wav to append 5secs of silence on init & end of file.
REM converted :output
REM Folder Root:
REM This Batch & folders listed above
REM Require ffmpeg registered on PATH variable
ECHO ### Appending 5secs of silence on WAV files ###
ECHO.
FOR /R .\original\ %%G IN (*) DO (
ffmpeg -f lavfi -t 5 -i anullsrc=channel_layout=stereo:sample_rate=44100 -i "%%~fG" -filter_complex "[0:a][1:a][0:a]concat=n=3:v=0:a=1" "%~dp0converted\%%~nxG"
)
ECHO.
ECHO ## DONE. ###
PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment