Skip to content

Instantly share code, notes, and snippets.

@alephalpha0
Created October 15, 2020 09:28
Show Gist options
  • Save alephalpha0/a18c748ea2db27b6d28ca56b1d7a1d04 to your computer and use it in GitHub Desktop.
Save alephalpha0/a18c748ea2db27b6d28ca56b1d7a1d04 to your computer and use it in GitHub Desktop.
the command line method to convert one audio type to the other

Requirements:

  • ffmpeg
  • libmp3lame

Variables for ref:

  • SRC = source file.
  • codec = libmp3lame IF conversion to mp3. codec = libvorbis IF conversion to ogg.

  • BKB = bitrate kilobytes.
  • OUTPUT = output file.

Steps:

  1. ffprod $SRC
  2. Find $BKB from information outputted.
  3. ffmpeg -i $SRC -c:a $codec -b:a $BKB $OUTPUT
  4. Rejoice!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment