How to manage audio asset source files to reduce size of repository on Github?

I was reading this About large files on GitHub - GitHub Docs and I’m already running into scenarios where large music loops are close to or would exceed 50 MB, which is when the warnings happen.

To be clear, this involves the whole FMOD Studio Project with the “raw stuff”, it’s not just the final banks.

I don’t want to compress to a lossy format like .ogg, but .flac might be viable even though it does introduce more time to rendering audio files.

Is there some trick in FMOD to “batch replace in place”? Like if I select a bunch of .wav/.aif and have FMOD Studio convert them all to .flac while retaining references. I read https://www.fmod.com/docs/2.02/studio/managing-assets.html but it looks like a built-in converter only happens at the build-a-bank level?

How is everyone who has a Github repo optimizing their source asset filesizes, what’s that workflow like?

FMOD Studio has no built-in ability to “bounce out” audio files in common audio file formats. If you want to change the format of a large umber of files, we recommend you use a tool specialized in creating such files, such as any DAW.

If you want to avoid putting your source audio files in your GitHub repository, one option is to set an external asset source directory in FMOD Studio’s preferences dialog. This can be used to make your FMOD Studio project look outside of the FMOD Studio project folder for your project’s assets, allowing you to exclude them from the FMOD Studio project folder entirely.

1 Like

@joseph Good tip about the “external asset source directory”. For the time being I think we’d like to keep all the dependent files together, so finding a way to at least reduce their size and retain quality seems most workable.

Tentatively the plan sounds like:

  • Use an audio file batch converter to convert all WAV ➜ FLAC.
  • Go into FMOD Studio and do “Replace with” for each file. This is where it might get tedious if there are many directories, so best to consolidate that beforehand too — I take it there’s no way to automagically replace all if the base filenames are the same but the file extensions are different?
  • Save FMOD Studio Project so it saves the updated FLACs inside.
  • Remove all the now-unused WAVs.

Does that sound about right to you?

That workflow should work.

As you’ve surmised, there is no built-in way to bulk replace audio files with identical filenames but different file name extensions.

@joseph Are there any noticeable performance downsides to using FLAC vs. WAV in the FMOD Studio project? If I’m understanding correctly, decoding is minimal overhead on modern computers, and ultimately, banks will be mostly compressed to a lossy format anyway… right?

At worst, you’ll have to wait a fraction of a second longer after selecting an event in the events browser for the assets to load before you can audition that event in the editor pane. The difference is unlikely to be noticeable, unless the number or size of the assets used in an event is unusually large.

This is correct. The format of your source audio assets has no effect on the format into which those assets are encoded when your banks are built.

1 Like