Understanding Audio Formats & Codecs

  • Thread starter Thread starter taupune
  • Start date Start date
  • Tags Tags
    Audio Format
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
taupune
Messages
25
Reaction score
0
Can someone explain the difference between audio format and codecs?

wikipedia says this:
A codec performs the encoding and decoding of the raw audio data while the data itself is stored in a file with a specific audio file format.

I don't get this.
lets says 1000 1111 is the digital value which when passing through the codec is translated as "HELLO".

what would different formats turn this value into? Like MP3 or WAV , etc. If they modify this binary value and that value goes through the same codec than it would something else other than HELLO , right?
 
Engineering news on Phys.org
No. File format is for storing both 1000 1111 and all other necessary information, like sampling rate, data length, number of bits and so on. You first pass these information to codec so that it knows what to do with raw data that follows. File format may also store data split in chunks that allows fast scrolling forward and back, you won't be able t do that with just a raw data stream, as you have to know where it can be cut.

In general it is not a problem to design a codec that will code its information directly into the data, but solution in which these things are separated in much more flexible.
 
Thanks Borek, very clear answer indeed.
One more question. The hardware codecs would play only specific format woyldnt they?
For example mp3 codec chips. They can play the mp3 file stream, just that right?