0

Say a song is recorded somewhere on the planet with a computer, and that stream of data is stored.

If this is stored using Audacity, you can set it to .aup format, which is a very simple XML file.

Why do we need anything else than a few data points in a file? Why would we use .mp3 or anything? In fact, encoding this increases the size for a few local samples.

I think the issue could be size for images for example, but I can't say that for audio files.

4
  • 8
    .aup files aren’t self-contained, they refer to other files which contain the actual audio. Commented Nov 29, 2020 at 14:11
  • @StephenKitt true, just check that out, but then why is it worth to encode the files? Commented Nov 29, 2020 at 14:13
  • 8
    Why do you think audio would have less size issues than images? Audio is recorded with tens of thousands of samples per second, and something like a 44100 Hz sampling rate at 16 bits per sample (CD quality) is already 88 kB per second. Make it double if you want it in stereo. That would be 10 MB per minute. Commented Nov 29, 2020 at 14:16
  • 1
    @ilkkachu there were many things i didnt know so I tried guessing Commented Nov 29, 2020 at 14:21

2 Answers 2

5

Why linux uses non free codecs

That's the easy part: because most of the audio/music is in non-free formats like MP3 we need non-free codecs to decode it.

Why do we need anything else than a few data-points in a file?

Audio CD quality has sampling rate 44.1 kHz and 16bit words so you need 605 MiB for 1 hour of stereo audio (44100 * 60 * 60 * 16 * 2). That's quite a lot of data points :-). That's why lossy compression exists and you need something (= codec) to decode these formats/data.

0
0

The reason Linux needs to support compressed sometimes heavily patented audio and video codecs is because:

  1. People need portability and universal support, even from their car audio system - they already have tons of music in compressed formats and they want to play it in Linux. Lots of companies offer/sell audio in MP4/AAC and often audio in these formats costs less than audio in FLAC/WAV/RIFF/ALAF.
  2. Compressed audio is often preferred over uncompressed audio since the latter takes too much space.
  3. Both MP3/M4A support tagging, embedded album art, lyrics and a lot more which people find necessary. WAV is quite limited in this regard.

Which brings us to 2020 where the most popular audio formats are MP3 and AAC/M4A. Linux may not support proprietary audio formats at all, only it will make the OS unusable for a vast number of people out there.

1
  • 4
    FWIW I read the question as two separate questions: “Why linux uses non free codecs?” (whatever the definition of “non free” is) on the one hand, and “why are codecs needed at all?” on the other — it seems to me “at all” is about codecs in general, not non free codecs. Commented Nov 30, 2020 at 15:13