<p>I use the flac format for storage and the wav format for analysis. I jump from one to another using the function wav2flac in R (seewave package). In order for the function to work you need to install the software &quot;flac frontend&quot; first. Wav2flac will call for it.</p>

CC BY-SA 4.0
2022-07-06T16:54:09.720Z
2022-07-07T06:33:34.783Z
2022-07-07T06:33:34.783Z
Amandine Gasc
<p>I ended up to use my own compression (obviously).
I was starting with the original X3 compression from Mark Johnsons <a href="https://soundtags.wp.st-andrews.ac.uk/dtags/audio_compression/" rel="nofollow noreferrer">DTAG toolbox</a>. In the end I simplified it by removing the RICE encoding that only kicks in low bit numbers. So I ended up with a simple non-destructive packaging scheme.</p>
<p>The idea is simply:</p>
<p>assume you data are all 32 bit integer, but your ADC is only 24 bit, so you pack 4 words (16 bytes) into 3 words (12 bytes). so far so good, but how does is in practice work? take a block of samples (in my case 128 samples), find the   greatest value (in absolute terms) and pack the 128 words such that leading zeros and leading ones are removed. Each block get a small header, which not only contains the compression info but also time stamps and other useful information. (All is inspired by X3)</p>
<p>To read the files I have then a special loading program decoding the data on the fly. Obviously this compression works only with integer, but ADC gives me integers.</p>

CC BY-SA 4.0
2022-07-06T15:18:59.240Z
2022-07-06T15:18:59.240Z
WMXZ
<p>Here is a paper on Marks method: <a href="https://asa.scitation.org/doi/10.1121/1.4776206" rel="nofollow noreferrer">https://asa.scitation.org/doi/10.1121/1.4776206</a></p>
<p>Johnson, M., Partan, J., &amp; Hurst, T. (2013). Low complexity lossless compression of underwater sound recordings. The Journal of the Acoustical Society of America, 133(3), 1387-1398.</p>

CC BY-SA 4.0
2022-07-11T17:28:20.983Z
This citation is really helpful - thanks for adding here!! I think that it really complements @Jamie's answer above about X3 and think it might be most helpful to other users if your two answers were combined rather than as two separate answers. I'd encourage you to either (1) edit the above X3 answer, just adding this citation, or (2) comment on the X3 answer and suggest that Jamie adds the citation.
selene
CC BY-SA 4.0
2022-07-07T06:54:50.080Z
2022-07-07T07:14:53.293Z
2022-07-07T07:14:53.293Z
Marinebioacoustics Aarhus Univ
<p>For us, because we pay for storage space from our host University's research computing department, file storage efficiency is somewhat important to minimize long-run costs. Because of this, our protocol is to keep recordings that are not currently being analyzed saved in FLAC, and keep only active projects in WAV. We use ffmpeg and the windows FLAC frontend executable for file conversion.</p>

CC BY-SA 4.0
2022-07-06T14:46:57.603Z
2022-07-06T14:46:57.603Z
dtsavage
<p>For archives we use FLAC. It is compatible with many players and analysis software, open license and open source. For small recorders we use X3 as it is much simpler to implement (and uses less CPU power).</p>

CC BY-SA 4.0
2022-07-08T08:47:05.900Z
2022-07-08T08:47:05.900Z
Jörg Rychen
<p>There is a similar post about compression here with some helpful answers on different options &amp; explanations of them.</p>
<p><a href="https://bioacoustics.stackexchange.com/questions/48/does-the-file-format-of-audio-recordings-e-g-wav-vs-mp3-matter-if-you-are-p/51#51">Does the file format of audio recordings (e.g. .wav vs .mp3) matter if you are performing acoustic analyses on them?</a></p>
<p>I personally always use WAV files, as this is the predominant method used in passive acoustic monitoring &amp; what ARUs like Swifts, Audiomoths, etc. write files with.</p>

CC BY-SA 4.0
2022-07-06T14:34:34.537Z
2022-07-06T14:34:34.537Z
Carly Batist
<p>There are a whole lot of different file-compression methods out there: MP3, FLAC, OGG, AIFF, etc and each of these can have their own variations in parameters. I'm interested in:</p>
<ul>
<li>What file format you are using</li>
<li>What tool(s) you are using to do file conversions, if your recorders are not recording in that format (some sensors can record directly in FLAC, for example)</li>
<li>Have you tried multiple file formats? How did you settle on the one you currently use?</li>
<li>Do you use multiple file formats for multiple use cases? (e.g. one for analysis, another for web hosting)</li>
</ul>

CC BY-SA 4.0
2022-07-09T18:58:05.787Z
Does this answer your question? [Does the file format of audio recordings (e.g. .wav vs .mp3) matter if you are performing acoustic analyses on them?](https://bioacoustics.stackexchange.com/questions/48/does-the-file-format-of-audio-recordings-e-g-wav-vs-mp3-matter-if-you-are-p)
Noil
CC BY-SA 4.0
2022-07-10T14:22:11.203Z
@Noil it's a different question. That's asking how format impacts analysis. I'm asking what people are actually doing in their day-to-day work.
dtsavage
<recording><data-storage><compression>
How, if at all, are you compressing your recordings?
# How, if at all, are you compressing your recordings?

(Asked by: username_0 on 2022-07-06)

There are a whole lot of different file-compression methods out there: MP3, FLAC, OGG, AIFF, etc and each of these can have their own variations in parameters. I'm interested in:

* What file format you are using
* What tool(s) you are using to do file conversions, if your recorders are not recording in that format (some sensors can record directly in FLAC, for example)
* Have you tried multiple file formats? How did you settle on the one you currently use?
* Do you use multiple file formats for multiple use cases? (e.g. one for analysis, another for web hosting)

**Tags:** recording, data-storage, compression

> **Comments:**
> **username_1**: Does this answer your question? [Does the file format of audio recordings (e.g. .wav vs .mp3) matter if you are performing acoustic analyses on them?](https://bioacoustics.stackexchange.com/questions/48/does-the-file-format-of-audio-recordings-e-g-wav-vs-mp3-matter-if-you-are-p)  
> **username_0**: @username_1 it's a different question. That's asking how format impacts analysis. I'm asking what people are actually doing in their day-to-day work.  

---

## 6 answers

### Answer by username_7 on 2022-07-06. Score: 7 | Accepted answer

There is a similar post about compression here with some helpful answers on different options & explanations of them.

[Does the file format of audio recordings (e.g. .wav vs .mp3) matter if you are performing acoustic analyses on them?](https://bioacoustics.stackexchange.com/questions/48/does-the-file-format-of-audio-recordings-e-g-wav-vs-mp3-matter-if-you-are-p/51#51)

I personally always use WAV files, as this is the predominant method used in passive acoustic monitoring & what ARUs like Swifts, Audiomoths, etc. write files with.


---

### Answer by username_2 on 2022-07-06. Score: 7

I use the flac format for storage and the wav format for analysis. I jump from one to another using the function wav2flac in R (seewave package). In order for the function to work you need to install the software "flac frontend" first. Wav2flac will call for it.


---

### Answer by username_3 on 2022-07-06. Score: 3

I ended up to use my own compression (obviously).
I was starting with the original X3 compression from Mark Johnsons [DTAG toolbox](https://soundtags.wp.st-andrews.ac.uk/dtags/audio_compression/). In the end I simplified it by removing the RICE encoding that only kicks in low bit numbers. So I ended up with a simple non-destructive packaging scheme.

The idea is simply:

assume you data are all 32 bit integer, but your ADC is only 24 bit, so you pack 4 words (16 bytes) into 3 words (12 bytes). so far so good, but how does is in practice work? take a block of samples (in my case 128 samples), find the greatest value (in absolute terms) and pack the 128 words such that leading zeros and leading ones are removed. Each block get a small header, which not only contains the compression info but also time stamps and other useful information. (All is inspired by X3)

To read the files I have then a special loading program decoding the data on the fly. Obviously this compression works only with integer, but ADC gives me integers.


---

### Answer by username_4 on 2022-07-07. Score: 3

Here is a paper on Marks method: <https://asa.scitation.org/doi/10.1121/1.4776206>

Johnson, M., Partan, J., & Hurst, T. (2013). Low complexity lossless compression of underwater sound recordings. The Journal of the Acoustical Society of America, 133(3), 1387-1398.

> **Comments:**
> **username_5**: This citation is really helpful - thanks for adding here!! I think that it really complements @Jamie's answer above about X3 and think it might be most helpful to other users if your two answers were combined rather than as two separate answers. I'd encourage you to either (1) edit the above X3 answer, just adding this citation, or (2) comment on the X3 answer and suggest that Jamie adds the citation.  

---

### Answer by username_0 on 2022-07-06. Score: 3

For us, because we pay for storage space from our host University's research computing department, file storage efficiency is somewhat important to minimize long-run costs. Because of this, our protocol is to keep recordings that are not currently being analyzed saved in FLAC, and keep only active projects in WAV. We use ffmpeg and the windows FLAC frontend executable for file conversion.


---

### Answer by username_6 on 2022-07-08. Score: 3

For archives we use FLAC. It is compatible with many players and analysis software, open license and open source. For small recorders we use X3 as it is much simpler to implement (and uses less CPU power).


---

