use flac instead of wav?

Hi,

I’m new to Ardour. I want to edit some audio files, which I’m going to archive later in flac format (after I’ve done the project bounce). Since I always use flac for archiving, is it also advisable to use flac to edit? I noticed no difference so far between flac and wav while editing a session, but does someone has anything against flac in a live context?
The project is a very simple cut+copy thing, with 10 tracks altogether. No plugins whatsoever are being used, so it’s not cpu intensive.

Thanks,

jmmmp

@jmmmp: its a bit more work for the CPU to use flac, especially when editing. there’s no difference in quality at all - flac is a lossless compression algorithm, so when its converted back to “pcm audio”, which it is before any plugin or any part of Ardour can do anything with it, nothing is lost (or gained). most people will argue against working with flac as the actual session data format - just archive it in that format later. however, you won’t lose any quality by using it, just a little CPU power.

but FLAC doesn’t do floating point formats, so befor flac’ing you’d have to re-sample all audio into an integer format, which isn’t entirely lossless.
I’ve just looked it up: FLAC supports these bit depths: 8, 12, 16, 20 24.

@Seb: that’s true. if any part of the mix goes outside the 24 bit dynamic range, FLAC will be lossy (but then, so is float at that point, just much, much less :slight_smile:

How can you change the session to support flac? I don’t see an option for that in the format menu, but would love to be able to do this for archiving.

I don’t think you currently can use FLAC while editing, but it makes some sense as an export option.

Actually it makes sense as an edit option. For instance I am often editing down recording with long sections of silence, where the size of the audio session that gets archived could be reduced by more than half simply by using FLAC as the import/record format. In as far as it being lossy or not, in general even the conversion process mentioned would not be much of an issue, especially in my case where I would be importing from integer based formats anyways with a maximum bit depth of 24 bits.

As Paul mentioned, the largest issue would really be CPU usage, which FLAC is designed ot be light on CPU usage so for smaller sessions it could easily be an option. It is one of those things on the bottom of my personal TODO list, and since I haven’t been able to even do things at the top of that todo list in some time, I would welcome someone else jumping in and implementing the feature;)

 Seablade

Session > Archive can optionally encode files to .flac (adding a gain-factor to minimize loss of dynamic-range). That is per snapshot though and also not in-place.

and yes, you can certainly hack it. Encode the files and edit the session file(s) manually.

Edit2: Is there a way to “hack” this, so to convert files into FLAC in interchange and then have Ardour still use them?

Edit: When I import all missing files into the project afterwards, I do get the FLAC file copied into the interchange folder of my Ardour project… so basically, it’s all there, there’s just the option missing to do it directly!

Warming up a very old topic, 11 years later, 11 years of faster and faster CPUs: How about FLAC?

It turns out, when I import a file with suitable sample rate and do not click “copy files into project”, Ardour uses it directly. Great!

However, I often want to copy the files into the project, so that I can make sure I got all stuff together in my projects. In this case, Ardour converts the imported audio to WAV. Would it be possible to change this behaviour?

I do a lot of live recording with a Qu16 console used as digital multitrack recorder, and hence I got plenty of files that I compress with FLAC to save space. But as soon as I start editing, they get huge again.

Best
Niels

In Ardour 6, FLAC is now supported as the recording format for tracks!

I have questions about it though:

  • What are the downsides to using it by default? Will it really increase CPU use?
  • Is there a way to make it the default for new projects so I don’t have to choose it each time I make a project?
  1. Session > Properties > Media: Select File-type: FLAC
  2. Session > Properties > Misc: Use these settings as default

Yes, the file needs to be en/decoded and FLAC only handles 16 or 24 bit audio, so there is also a conversion step. However this happens offline in the background (Ardour by default buffers 5 - 10 seconds) and is not usually an issue on modern machines (unless you use a lot of tracks). Seeking may be slower too.

Ardour is optimized to directly memory-map raw data to disk reliably (record >1000 tracks on HDD, and even more on SSDs), and you’ll loose that when using FLAC instead.

The motivation for FLAC were podcast recordings. Those potentially have hour-long sessions where some mics are muted for long periods of time and usually not more than 6-8 channels.

1 Like

If I make a lot of 2-3 track projects (or maybe 1-track with multiple takes that get cut together) and just want to minimize disk space given that it’s a lot of demo material essentially, is that a good use case for FLAC?

What about recording in WAV or similar while working and then converting it all to FLAC for archiving of the session? Is that a thing or could it be?

It’s perfectly fine to use FLAC there.

Session > Archive session can do that.

Oh, that’s nice. But that loses the snapshots and opening an archive results in creating the project again. It works but isn’t identical to simply taking the existing project and converting all the audio to FLAC, otherwise leaving it alone.

Seems it would be nice if the “archive” function had a checkbox for whether to package it all into a single archive file or to just do the FLAC compression. Is this a thing worth making a feature request?

It’s not that simple. All snapshot would have to be re-written to use FLAC, and it’ll also destroy the current session as-is. We won’t do that in-place.

Archiving effectively creates a new, separate session.

Okay, so I guess a separate command would be needed to compress all files to FLAC. That seems something worth having. It doesn’t really matter if that’s in the UI with the archive dialogue or a separate place.