Skip to content

Instantly share code, notes, and snippets.

@dhcgn
Created November 25, 2024 11:20
Show Gist options
  • Select an option

  • Save dhcgn/97ef52baef6e04b68f83bb87daf01cb0 to your computer and use it in GitHub Desktop.

Select an option

Save dhcgn/97ef52baef6e04b68f83bb87daf01cb0 to your computer and use it in GitHub Desktop.
ffmpeg -i input.opus -vn -ac 1 -c:a aac -b:a 64k -fs 25500000 output.m4a
@dhcgn

dhcgn commented Nov 25, 2024

Copy link
Copy Markdown
Author

This command will:

  • Take your input Opus file
  • Ignore any video streams (-vn)
  • Convert the audio to mono (-ac 1)
  • Use the AAC codec (-c:a aac)
  • Set the bitrate to 64k (-b:a 64k)
  • Limit the file size to 25 MB (-fs 26214400)
  • Output an M4A file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment