Skip to content

Instantly share code, notes, and snippets.

@richard512
Last active December 22, 2022 01:45
Show Gist options
  • Save richard512/ad431e651e1310fd310f041c9f4f5972 to your computer and use it in GitHub Desktop.
Save richard512/ad431e651e1310fd310f041c9f4f5972 to your computer and use it in GitHub Desktop.
ffmpeg merge and convert between webm, wav, and opus
#/bin/bash
# ffmpeg convert wav audio to opus audio
ffmpeg -i uploads/audio.wav -c:a opus -strict -2 -y uploads/output.opus
# ffmpeg combine webm and wav into a new webm with opus audio
ffmpeg -i uploads/video.webm -i uploads/audio.wav -c:a opus -strict -2 -y uploads/output.webm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment