Skip to content

Instantly share code, notes, and snippets.

@tuurep
Last active February 28, 2024 21:22
Show Gist options
  • Save tuurep/98ccd1b40f347b6d3f703b04a97df519 to your computer and use it in GitHub Desktop.
Save tuurep/98ccd1b40f347b6d3f703b04a97df519 to your computer and use it in GitHub Desktop.
ffmpeg: pad silence to the end of an audio file

ffmpeg: pad silence to the end of an audio file

https://superuser.com/questions/579008/add-1-second-of-silence-to-audio-through-ffmpeg

ffmpeg -f lavfi -i anullsrc=sample_rate=$input_Hz -t $seconds silence.mp3

input.txt:

file 'input.mp3'
file 'silence.mp3'

The concat demuxer can only read from a file pointer or URL. The contents of the file cannot be replaced by commandline options.

https://superuser.com/questions/1510339/concatenate-non-encoding-without-creating-a-text-file-ffmpeg

ffmpeg -f concat -i input.txt -codec copy output.mp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment