Skip to content

Instantly share code, notes, and snippets.

@itsmikita
Last active November 16, 2024 18:55
Show Gist options
  • Save itsmikita/3b8a727046400163ccdf479ec6eb8015 to your computer and use it in GitHub Desktop.
Save itsmikita/3b8a727046400163ccdf479ec6eb8015 to your computer and use it in GitHub Desktop.
Hyper-quick command-line to merge two or more audio files into one
#
ffmpeg -i left.wav -i right.wav -filter_complex "[0:a][1:a]amerge=inputs=2[aout]" -map "[aout]" stereo.wav
# NOTE: Input file paths MUST be absolute, whereas output path MUST NOT be relative and files (including output file) MUST be of the same type
ffmpeg -f concat -safe 0 -i <(echo "file '/absolute/path/to/first/file.wav'\nfile '/absolute/path/to/second/file.wav'\n") -c copy -stats output.wav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment