Skip to content

Instantly share code, notes, and snippets.

@vadimkantorov
Last active December 14, 2023 17:16
Show Gist options
  • Save vadimkantorov/16f1b754711db8b40440127e55b2a989 to your computer and use it in GitHub Desktop.
Save vadimkantorov/16f1b754711db8b40440127e55b2a989 to your computer and use it in GitHub Desktop.
Generate audio sample files with ffmpeg
# test1.wav
ffmpeg -f lavfi -i "sine=frequency=1000:duration=5:r=48000" test1.wav
# test2.wav
ffmpeg -f lavfi -i sine=f=440:d=5 -f lavfi -i sine=f=880:d=5 -filter_complex "[0][1]amerge" test2.wav
# test3.wav
ffmpeg -f lavfi -i sine=f=440:d=5 -f lavfi -i anullsrc=d=5:cl=mono -f lavfi -i sine=f=880:d=5 -filter_complex "[0][1][2]concat=n=3:v=0:a=1" test3.wav
# https://github.com/stryku/ffcms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment