Skip to content

Instantly share code, notes, and snippets.

@jeetparikh
Created October 28, 2016 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeetparikh/97cd4dd9e6a5d5596b48dfee5cea9ae3 to your computer and use it in GitHub Desktop.
Save jeetparikh/97cd4dd9e6a5d5596b48dfee5cea9ae3 to your computer and use it in GitHub Desktop.
Convert Audio - mp3 to ogg - usually required when embedding audio to play in browsers
#!/bin/bash
for f in *.mp3; do echo "$f"; avconv -i "$f" -c:a libvorbis -q:a 4 -threads 6 "${f%.*}.ogg"; done;
@jeetparikh
Copy link
Author

Loops through all the .mp3 files in the directory and creates an output file in the .ogg format with the same name

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