Skip to content

Instantly share code, notes, and snippets.

@lovethebomb
Created January 27, 2024 19:04
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 lovethebomb/c12406fccdbcb5fbd27084a231cb8d5c to your computer and use it in GitHub Desktop.
Save lovethebomb/c12406fccdbcb5fbd27084a231cb8d5c to your computer and use it in GitHub Desktop.
Convert mp3 to ogg for Foundry VTT
# Utility fn for quickly converting mp3 into ogg for foundry music
# Navigate to your music folder and run fn
function foundry_mp3_to_ogg {
find . -name "*.mp3" -exec ffmpeg -i {} -c:a libopus -page_duration 2000 -vn {}.ogg \;
find . -name "*.mp3.ogg" -exec sh -c 'mv "$0" "${0%.mp3.ogg}.ogg"' {} \;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment