Answers.Body: <p>Given how cheap storage has become, and that lossless compression is possible, I really don't see any argument for using lossy compressions: don't go there!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-11T12:10:30.443Z
Answers.Text: This is good advice, but it's not really an answer. There are reasons you might need lossy compression – for instance, if your badly designed / hacked sensor's storage device doesn't have high enough write bandwidth to store lossless data in real-time. Given a choice between only storing a third of the audio, or degrading its quality with a lossy algorithm, knowing how bad the compression is could be important in making that choice.
Answers.UserDisplayName: wizzwizz4
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-11T06:30:45.570Z
Answers.LastActivityDate: 2022-08-23T13:28:18.267Z
Answers.LastEditDate: 2022-08-23T13:28:18.267Z
Answers.UserDisplayName: Marinebioacoustics Aarhus Univ
Answers.Body: <p>it's not from the marine environment, but this recent paper by Becky Heath et al may be a useful starting point:</p>
  <p><a href="https://onlinelibrary.wiley.com/doi/full/10.1002/ece3.8042" rel="nofollow noreferrer">https://onlinelibrary.wiley.com/doi/full/10.1002/ece3.8042</a></p>
  <p>Thanks</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-11T21:00:01.070Z
Answers.Text: Yeah, this is (apparently) well understood for terrestrial (air) sound.
Answers.UserDisplayName: wizzwizz4
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-15T09:12:37.657Z
Answers.Text: Could summarize how this link answers the question please (or at least cite a sentence)?
Answers.UserDisplayName: Noil
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-11T14:29:03.757Z
Answers.LastActivityDate: 2022-07-11T14:29:03.757Z
Answers.UserDisplayName: Carlos Abrahams
Answers.Body: <p>In my personal experience with sperm whales' recordings (echolocation and coda clicks), the MP3 compression didn't affect the sound for ID purposes. But this may depend on the sound you are recordings because the compression affects the &quot;resolution&quot; of the sound itself. If you link compression with low-quality recordings, then there could be more problems. I found it harder to analyse recordings at the level of the pulses of the clicks (so with a &quot;zoom&quot; in the time resolution). I can't state it was only because of the compression because also other settings were not as good as they were needed. This is in comparison with other recordings, where final settings were adopted.
  In any case, it depends. It depends on the purpose you are recording and on the target species, as for other species you may need detailed features on the spectrogram for ID. But it also depends if you think of using the recordings for future studies: they may always be useful for other studies/other researchers that you don't know now.</p>
  <p>Compression usually attenuates the original signal when it goes above a determined threshold (dB). They work with the human perception, which of course is limited. Thus they work well if you use them for listening purposes. But, this compression may affect the peaks of a signal, losing the info or distorting the signal.
  But it depends on the way you compress the file. If you are recording with MP3, you're not gonna have back all the info lost, as it's a lossy compression technique.
  Although, there are lossless compressions, from which you can go back to the original audio. For example, FLAC compression, which stands for &quot;Free Lossless Audio Codec&quot; and it's open-source. It's fast and works similarly to zip compression (<a href="https://xiph.org/flac/" rel="noreferrer">https://xiph.org/flac/</a>). There are some answers about it within this question (<a href="https://bioacoustics.stackexchange.com/questions/457/does-anyone-regularly-use-flac-compression-for-their-acoustic-data">Does anyone regularly use FLAC compression for their acoustic data?</a>).</p>
  <p><a href="https://www.researchgate.net/publication/341278316_Compression_Techniques_of_Underwater_Acoustic_Signals_for_Real-Time_Underwater_Noise_Monitoring" rel="noreferrer">Felis et al. (2019)</a> explored different techniques/algorithms that can be applied to compress underwater acoustic files, that works differently than the &quot;easy&quot; MP3 compression. Of course, different techniques work better for different purposes.
  In this paper by <a href="https://doi.org/10.3390/s22093415" rel="noreferrer">Kim et al. (2022)</a>, the authors explored a new method to compress long-term data collected with underwater acoustic sensors. They based the method on a lossless compression within the bandwidth of interest.</p>
  <p>In conclusion, I would suggest not using MP3 compression. This kind of compression is ideal for listening purposes, as for just music. It is well adapted to our hearing capacity, which is limited compared to the diversity of frequencies you may find underwater. To store big datasets of recordings, you may find useful the FLAC compression. Or, you may think of using an algorithm that best fits your study objective, thus modifying/compressing recordings only to a limited bandwidth or use techniques to reduce redundant info.</p>
  <p>Have a look also at this question <a href="https://bioacoustics.stackexchange.com/questions/344/how-if-at-all-are-you-compressing-your-recordings">How, if at all, are you compressing your recordings?</a>.</p>
  <p>References:</p>
  <p>Felis, I., Martínez, R., Ruiz, P., &amp; Er-rachdi, H. (2019). Compression techniques of underwater acoustic signals for real-time underwater noise monitoring. Multidisciplinary Digital Publishing Institute Proceedings, 42(1), 80. <a href="http://dx.doi.org/10.3390/ecsa-6-06581" rel="noreferrer">http://dx.doi.org/10.3390/ecsa-6-06581</a></p>
  <p>Kim, Y. G., Kim, D. G., Kim, K., Choi, C. H., Park, N. I., &amp; Kim, H. K. (2022). An Efficient Compression Method of Underwater Acoustic Sensor Signals for Underwater Surveillance. Sensors, 22(9), 3415. <a href="https://doi.org/10.3390/s22093415" rel="noreferrer">https://doi.org/10.3390/s22093415</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-12T16:39:43.403Z
Answers.LastActivityDate: 2022-07-12T16:39:43.403Z
Answers.UserDisplayName: Cristina Marcolin
Body: <p><a href="https://bioacoustics.stackexchange.com/a/62/470">This answer by Dan Stowell</a> states:</p>
  <blockquote>
  <p>Every time I've seen this studied, the MP3 compression makes little-to-no impact on the subsequent analysis. However, the papers I've read are mostly about terrestrial vertebrate sound -- I don't know how well those lessons generalise to marine sound (as in your question).</p>
  </blockquote>
  <p>Lossy compression is, obviously, not ideal; it discards some of your data. But does it always <em>matter</em>? Does MP3, used suitably, happen to be okay for the sounds of marine organisms – from the perspective of identification and analysis, if not intelligibility to other organisms? Is the same true of other popular lossy compression algorithms?</p>
  
Tags: <analysis><marine-species><compression>
Title: What lossy compression is okay for marine sound?
ThreadText: # What lossy compression is okay for marine sound?
  
  (Asked by: username_0 on 2022-07-10)
  
  [This answer by Dan Stowell](https://bioacoustics.stackexchange.com/a/62/470) states:
  
  > Every time I've seen this studied, the MP3 compression makes little-to-no impact on the subsequent analysis. However, the papers I've read are mostly about terrestrial vertebrate sound -- I don't know how well those lessons generalise to marine sound (as in your question).
  
  Lossy compression is, obviously, not ideal; it discards some of your data. But does it always *matter*? Does MP3, used suitably, happen to be okay for the sounds of marine organisms – from the perspective of identification and analysis, if not intelligibility to other organisms? Is the same true of other popular lossy compression algorithms?
  
  **Tags:** analysis, marine-species, compression
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2022-07-12. Score: 4 | Accepted answer
  
  In my personal experience with sperm whales' recordings (echolocation and coda clicks), the MP3 compression didn't affect the sound for ID purposes. But this may depend on the sound you are recordings because the compression affects the "resolution" of the sound itself. If you link compression with low-quality recordings, then there could be more problems. I found it harder to analyse recordings at the level of the pulses of the clicks (so with a "zoom" in the time resolution). I can't state it was only because of the compression because also other settings were not as good as they were needed. This is in comparison with other recordings, where final settings were adopted.
  In any case, it depends. It depends on the purpose you are recording and on the target species, as for other species you may need detailed features on the spectrogram for ID. But it also depends if you think of using the recordings for future studies: they may always be useful for other studies/other researchers that you don't know now.
  
  Compression usually attenuates the original signal when it goes above a determined threshold (dB). They work with the human perception, which of course is limited. Thus they work well if you use them for listening purposes. But, this compression may affect the peaks of a signal, losing the info or distorting the signal.
  But it depends on the way you compress the file. If you are recording with MP3, you're not gonna have back all the info lost, as it's a lossy compression technique.
  Although, there are lossless compressions, from which you can go back to the original audio. For example, FLAC compression, which stands for "Free Lossless Audio Codec" and it's open-source. It's fast and works similarly to zip compression (<https://xiph.org/flac/>). There are some answers about it within this question ([Does anyone regularly use FLAC compression for their acoustic data?](https://bioacoustics.stackexchange.com/questions/457/does-anyone-regularly-use-flac-compression-for-their-acoustic-data)).
  
  [Felis et al. (2019)](https://www.researchgate.net/publication/341278316_Compression_Techniques_of_Underwater_Acoustic_Signals_for_Real-Time_Underwater_Noise_Monitoring) explored different techniques/algorithms that can be applied to compress underwater acoustic files, that works differently than the "easy" MP3 compression. Of course, different techniques work better for different purposes.
  In this paper by [Kim et al. (2022)](https://doi.org/10.3390/s22093415), the authors explored a new method to compress long-term data collected with underwater acoustic sensors. They based the method on a lossless compression within the bandwidth of interest.
  
  In conclusion, I would suggest not using MP3 compression. This kind of compression is ideal for listening purposes, as for just music. It is well adapted to our hearing capacity, which is limited compared to the diversity of frequencies you may find underwater. To store big datasets of recordings, you may find useful the FLAC compression. Or, you may think of using an algorithm that best fits your study objective, thus modifying/compressing recordings only to a limited bandwidth or use techniques to reduce redundant info.
  
  Have a look also at this question [How, if at all, are you compressing your recordings?](https://bioacoustics.stackexchange.com/questions/344/how-if-at-all-are-you-compressing-your-recordings).
  
  References:
  
  Felis, I., Martínez, R., Ruiz, P., & Er-rachdi, H. (2019). Compression techniques of underwater acoustic signals for real-time underwater noise monitoring. Multidisciplinary Digital Publishing Institute Proceedings, 42(1), 80. <http://dx.doi.org/10.3390/ecsa-6-06581>
  
  Kim, Y. G., Kim, D. G., Kim, K., Choi, C. H., Park, N. I., & Kim, H. K. (2022). An Efficient Compression Method of Underwater Acoustic Sensor Signals for Underwater Surveillance. Sensors, 22(9), 3415. <https://doi.org/10.3390/s22093415>
  
  
  ---
  
  ### Answer by username_1 on 2022-07-11. Score: 2
  
  Given how cheap storage has become, and that lossless compression is possible, I really don't see any argument for using lossy compressions: don't go there!
  
  > **Comments:**
  > **username_0**: This is good advice, but it's not really an answer. There are reasons you might need lossy compression – for instance, if your badly designed / hacked sensor's storage device doesn't have high enough write bandwidth to store lossless data in real-time. Given a choice between only storing a third of the audio, or degrading its quality with a lossy algorithm, knowing how bad the compression is could be important in making that choice.  
  
  ---
  
  ### Answer by username_2 on 2022-07-11. Score: 1
  
  it's not from the marine environment, but this recent paper by Becky Heath et al may be a useful starting point:
  
  <https://onlinelibrary.wiley.com/doi/full/10.1002/ece3.8042>
  
  Thanks
  
  > **Comments:**
  > **username_0**: Yeah, this is (apparently) well understood for terrestrial (air) sound.  
  > **username_3**: Could summarize how this link answers the question please (or at least cite a sentence)?  
  
  ---
  
  