Overdue support for .flac audio format

Currently, developers are only limited to importing .mp3 and .ogg files. Although these do the job, the audio quality is quite abysmal as they are lossy formats. Audio is consequently left with a lack of polish, and in the case of music, can make the instruments sound detuned. Higher and lower frequencies are cut off and left sounding choppy. A perfectly fine-sounding hi-hat and cymbal or acoustic bass will have their volumes dramatically reduced and will sound staticky. These formats are often described as “dirty” or “musty”. .flac is a lossless audio format and thus does not suffer from these problems.


Here, both of a snippet of a track was sampled at 44100Hz. Headphones are reccomended:

wav (lossless)

mp3 (lossy)

Discourse doesn’t support .flac, so .wav was used.

Here’s a spectrogram of the .flac audio (left), .mp3 file (middle), and the difference (right):

As you can see, there is major cutoff that’s visible on the higher frequencies, as well as an unfathomable number of approximations shown as noise on the difference graph.


Understandably, .wav or .AIFF file types are not supported due to their immense file sizes. However, the .flac file type is significantly smaller than .wav and .AIFF (compressing to less than half of a .wav file!). .flac is also an industry-standard audio file type, and is used in popular audio streaming services like Spotify and Apple Music (Apple converts .flac files into their own audio codec, which is also lossless), as well as popular game engines such as Unity and Unreal Engine.

This would improve the experience of many developers as it will open the gates to higher-quality audio playback, thus making in-game audio sound more polished instead of musty.

20 Likes

I strongly strongly support this! I compose for my games sometimes, and for some of my music, the lower bass and upper trebles add a whole world to it. With .mp3 and the (slightly ancient) .ogg formats, the sound is muddier and I don’t get that oomph that I was aiming for with my music, as heard in the DAW.

If .flac is added, an inbuilt auto-converter would be awesome too because I generally use Apple software so AIFF is just the standard for me.

If there’s the issue of data space or bandwidth, then maybe there could be a seperate limit to uploading .flac files? Or maybe a monthly allowance of space uploaded, like 1 gb per month?

2 Likes

How come I’ve never heard of this audio format then? :thinking:

I can see the change in the spectrogram, but it does not sound any different.

That’s good, I guess!

1 Like

You’ve never heard of it because you don’t work with audio. I use wav files because of the reasons stated above.

12 Likes

While I would support FLAC generally as muiti-track audio could be fun to play with, I think the reason for not adding it is that you need quite the audio card to play some high quality FLAC files and get any benefit from it.

You need to be an audiophile to spot differences between an MP3/OGG, a WAV and a FLAC and I don’t think most people can spot the compression artefacts if the MP3/OGG is high enough quality.

2 Likes

Doesn’t the client convert audio files to .wav during runtime anyway? The client will not need to do any extra processing except during loading.

There are many programs that do not support higher .mp3 and .ogg sample rates. For example, a popular, free, and open-source music creation software MuseScore only supports exports up to 44100hz. This isn’t enough to achieve pristine quality on .mp3. Many users will not notice the artifacts, however, many will notice that audio may sound a little bit off, especially with higher quality speakers or headphones.

Yeah, I commonly download music and when theres only MP4 available, any of the bass or generally lower/high notes are distorted or are the same.

Totally agree. I’ve never wanted higher quality audio - the only person on our team who’s ever mentioned it is our sound designers. This is because like you say, they are audiophiles and can notice the tiny differences. But nobody else really does!

What do people notice? Loadtimes! We have a .wav and .ogg version of the same 3 minute song. The .wav is 50mb and the .ogg is 3mb.

Roblox games rely on downloading on-the-fly, so a 10x compression for hardly any quality loss is really valuable.

All of that said, I can see Roblox adding support for higher quality audio, but I see why it’s not a priority considering it won’t benefit the overwhelming majority of users - and could lead to games misusing them resulting in much larger stream-times for audio that doesn’t really need it.

5 Likes

Although you raise good points about loading times, I would argue that it wouldn’t make as big of a difference as one may think.

The biggest network hog actually comes from images. A game can have hundreds of different images that must be loaded during startup (such as item icons, decorations, textures, materials, etc.). Many of these files are usually very high in quality. A 1000 x 1000 semi-detailed .png is around 2-3MB. A minute-long .flac file is around 4-6MB. A sound effect, typically lasting around 1-5 seconds, would take around 0.05-0.5MB. You can fit ~30 sound effects into a single 1000 by 100 image.

For reference:

Realistically, only a few sounds are loaded in during startup. You only need one soundtrack playing, and maybe a handful of other sound effects here and there. Loading times will get slightly longer, but not so much longer that the player’s experience is compromised. For background audio like ambience, .flac files aren’t even necessary as they’re not meant to be pristine, and don’t contain as much complexity anyway.

1 Like

This is using a mindset that as soon as Roblox adds .flac support, everybody will be obliged to upload in .flac, which isn’t the case. Developers that prefer smaller audio files can upload in .mp3 if they prefer, but the devs that would really like that extra bit of quality that some players will notice, then they can finally have the ability to.

As a composer and game creator, I would like to be able to cater to the group of people that prefer high quality audio in their experiences, even if it may be a small group. I’m willing to prioritize audio in what takes bandwidth during first load.

1 Like

Getting the image/texture size limit increased should be a far bigger & user noticeable priority. Also, this does not just increase load times for players, but also memory usage. I see virtually zero use cases based on that.

1 Like

This is the same old debate I’ve seen so many times on the internet.

If it’s added:

If Roblox adds this, then awesome. Flacs are definitely better than MP3s, I enjoy listening to full quality music, it feels right (placebo? perhaps), but at what cost?

But read this:

A study showed that Flac files can be up to 700% bigger in size, that’s a huge jump considering the number of people that can Actually hear the difference. Multiple people online so called “audiophiles” (AKA, people that take pleasure in high-end audio equipment), most of them can’t even hear the difference between lossy mp3 and lossless.

Analyzing a spectrogram is not a proper way to analyze audible audio. MP3 uses algorithms to get rid of sounds most humans can’t hear anyway.

.flac is also an industry-standard audio file type , and is used in popular audio streaming services like Spotify and Apple Music (Apple converts .flac files into their own audio codec, which is also lossless)

(You’d be surprised that Spotify has not yet added flac streaming). This is true, they do support flac, however it is not the best choice for most people. Here are a couple of reasons:

  1. Memory increase (Having a lot of flacs stored in your memory can definitely increase that memory by a bunch! Especially if there’s a lot of audios. Typically a full song would be around 25 MB, only 4 songs would take up 100 MB which I find a lot for audio alone)
  2. Delay in loading (When I was in my previous apartment, I could barely load ALAC files with my internet, I wouldn’t want this issue in any games)

Don’t forget that games that you download off steam for instance typically have the audio files in the game’s files. It’s not usually dynamically loaded like Roblox does.

I ask you this: What are the actual reasons you want Flac over mp3? I’ve read the replies here, and all I saw was “It sounds better” while many studies show that high end mp3 barely sound any different. The only actual difference it would bring to the table is maybe using the audio effects, which might make it sound better.

So what?

Bottom of the line, if Roblox is not already using 320kbps MP3, then I would consider the upgrade to 320, otherwise I don’t see the appeal in implementing flac support as most people will not hear the difference.

5 Likes

I completely overlooked the possibly of increasing the quality of the mp3 itself. This seems like a much better idea. The audio quality for this bitrate is almost indistinguishable from the flac file. Although, I do feel like the higher frequencies are still cut off. Apart from that, the general quality is definitely up to my standards.

Going back to what some people have said here, it would at least be nice for Roblox to support different audio formats then just convert them to high bitrate mp3s in the backend.

1 Like