Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Codec / Encoder terminology (Read 1045 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Codec / Encoder terminology

I have been trying to strive to learn and understand the terminology that surrounds the audio environment and in this sense this forum has been a very fertile ground for me.

However, now and then I still venture to ask some questions that may sound very basic to most users, and until I am not cursed by an "expert", I will continue to take a risk, so at this point I would like to know the next:

According to the photo below (CUERipper), would it be correct to say that "FLAC" is the codec and "FLACCL", "cuetools", "libFLAC" and "flaxe.exe" are the encoders of the FLAC codec?

Thanks in advance.

Re: Codec / Encoder terminology

Reply #1
cuetools is not encoder. I assume it is there for something else.
Anyway, you are correct. FLAC is the codec and all others are encoders that create FLAC compliant files.

To give you more examples:

Codec: MP3
Encoders: LAME, Fraunhofer, Helix...

Codec: AAC
Encoder: Apple, Fraunhofer, Nero...
Everything above 16/44 is scam.
Always download first release, never remastered/HD release.

Re: Codec / Encoder terminology

Reply #2
FLAC is an audio format. A format is a set of rules and specifications, it's a paper or a PDF. It's a concept and not a tool: a format doesn't encode nor decode.

flac.exe is one implementation of the format. It's an encoder: it encodes a raw (PCM) audio file into a storage format (FLAC). But flac.exe also decode *.flac file to PCM. So it's a decoder as well. In this case you can call it a codec (COding/DECcoding tool). Flaccl.exe is an other implementation of the format: it works differently than flac.exe but like flac.exe it respects all rules and specification of the FLAC format. So it's an encoder (or a codec if it decodes flac to PCM).

Various encoders or codec can encode to the same format (Apple's AAC, Fraunhofer's AAC, Nero's AAC, FAAC, FFMPEG: they all produce file in AAC-LC format).

Exhale is an encoder of a format called USAC or xHE-AAC. But it's not a codec because Exhale.exe doesn't decode to PCM (an external tool is needed).

Re: Codec / Encoder terminology

Reply #3
@Markuza97
@guruboolez

Thank you very much, it's all very clear now!

Re: Codec / Encoder terminology

Reply #4
You might be wondering why guruboolez and I gave you different answers.
His answer is 100% technically correct, mine answer is generic one, or how most people incorrectly differentiate between them.
If I type "audio codecs" in Google, this is the first result: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Audio_codecs
As you can see, formats are called codecs in the first table.
guruboolez's first sentence is: "FLAC is an audio format"
FLAC means Free Lossless Audio Codec, so if you want to be even more confused, Free Lossless Audio Codec is format.
Everything above 16/44 is scam.
Always download first release, never remastered/HD release.

Re: Codec / Encoder terminology

Reply #5
FLAC means Free Lossless Audio Codec, so if you want to be even more confused, Free Lossless Audio Codec is format.
Probably because FLAC sounds better than FLAF  :P
Official website, first sentence: “FLAC stands for Free Lossless Audio Codec, an audio format similar to MP3, but lossless”
https://xiph.org/flac/


Re: Codec / Encoder terminology

Reply #6
cuetools is not encoder. I assume it is there for something else.
The encoder is based on libFlake. "cuetools" is used as a synonym for a "native" or "built-in" encoder or decoder.
korth

Re: Codec / Encoder terminology

Reply #7
Thank you all, everything is now making better sense to me!

Re: Codec / Encoder terminology

Reply #8
FLAC both has a codec for the audio stream, but also a file format. Not the audio stream is specified, but also the file that contains it. This is so much nitpickery that everyday speak is not consistent though.

Also MP3 has a file format. But a FLAC stream or an MP3 stream may be fit into a different containers than their own file types - like Matroska. Matroska is a multimedia format that can have some video stream [in some video codec] and some audio stream in [some audio codec].

AAC is most commonly delivered in an MP4 container. The ".m4a" is just a naming convention that most applications happen to recognize. Apple's ALAC (lossless!) is hardly ever seen outside MP4, although it is possible to fit it into Matroska just for the hell of it.

It is not common to speak about uncompressed PCM audio as "codec". But they surely are "audio streams", and to end-users, they are most commonly delivered in a WAVE (.wav) or an AIFF container (as long as we are talking audio-only: a Blu-Ray disc has PCM audio). If you know that the WAVE format is a container, you know more than a bunch of nutjob "audiophiles" who insist that .wav or .aif or .aiff is the "pure, unprocessed" audio stream - that claim is both wrong and irrelevant.
High Voltage socket-nose-avatar

Re: Codec / Encoder terminology

Reply #9
Thanks, @Porcus

So, is "container" the same as "file format" or is the "file format" contained in a "container"?

Re: Codec / Encoder terminology

Reply #10
A container is more a storage bag: you can put several files in different formats into one single container.
Matroska and MP4 are both containers. Into one single container, you can put:
• different audio files (stereo + multichannel for example; or also original soundtrack + dubbed soundtrack + commentary; lossless and lossy…)
• one or more video file
• subtitles (image or text)
• metadata
• additional files (jpeg…)


Re: Codec / Encoder terminology

Reply #11
So, is "container" the same as "file format" or is the "file format" contained in a "container"?
Rather, a "container" is a type of file format structured to say "I am a box and I contain the following:"
(By "type" here I just mean how humans designed them to work - not how it looks under electron microscope to your hard drive.)
A text file is not a container file. It is not designed to say that "Here is a list of content, content has this property, and now I am done with describing this, so the actual content that you want to put in here, will follow this colon:"
Nitpickers can tell you about byte-order marks and the like, but essentially to you as an end-user: a text file has the text data, and that's it.

On the other extreme, archive formats like .zip are not designed to have anything but what you put into them by way of other means, and they can take whatever is organized as a file. But apart from the restriction - to files - you don't get much info out of someone saying "a .zip file". (Contrast that to "an mp4 file".)
And to make use of the data, you need something that can open the .zip ("open" is imprecise: "open and understand" is clear enough?) - and something that make use of what is inside the box. Your software must know the container and it must know how to read the content.
Same with Matroska; if you put a PCM stream into a Matroska and try to play it by something that does not know the Matroska file format - no luck. And if you get by some obsolete audio format your player cannot handle, and put it into a Matroska container - after all your player can open Matroska - you are in for a disappointment.

But if you can read a text file you can read a text file. Well I am simplifying, but you get it.
High Voltage socket-nose-avatar

Re: Codec / Encoder terminology

Reply #12
Answers above are very technical.
I hope this is somewhat easier for you to understand.
(This is not 100% technically correct, but it is the easiest way for him to understand)

Your sound card only accepts uncompressed PCM.
Uncompressed PCM is huge. It wastes a ton of space, we want to compress it.

Format is a written standard that defines what compression technologies/techniques you can use.
Example: Format says you can only have 2 channels with sampling rate up to 48 kHz.

In order to create a file that complies to that standard, you will need encoder.
That encoder is limited to 2 channels and 48 kHz.
If your encoder can create 6 channel 192 kHz file, then your encoder doesn't comply to that format.

Encoder will create stream.
Stream is useless for us. We are missing some crucial information like number of channels, sampling rate...

We want to put it inside container.
Container, just like the name says, contains something, in this case stream.
But, container also includes header and that header will give us all the information (mentioned above) we need to "play" that file.

Okay, so we have our file, how do we actually play it?
Now you will need decoder.
Decoder will "decompress" your file into uncompressed PCM so you can play it!
Everything above 16/44 is scam.
Always download first release, never remastered/HD release.

 

Re: Codec / Encoder terminology

Reply #13
@Markuza97
@Porcus
@guruboolez
@korth

Thank you very much!

Both the more technical and the intentionally easier explanations were more than enough to help me understand all the terminologies used here.

I am extremely satisfied and grateful for the attention you have given to my doubts.

Health and all the best for you!

Adil

Re: Codec / Encoder terminology

Reply #14
The encoder is based on libFlake. "cuetools" is used as a synonym for a "native" or "built-in" encoder or decoder.
Hi again...

Even if a little off topic, it would be possible to get your opinion, of all the ones offered by CUERipper, which FLAC encoder do you consider best for archiving CDs on the hard disk?

Re: Codec / Encoder terminology

Reply #15
Literally the only difference is compression ratio and/or speed, or how much you want to throw at the encoder. The data will decompress faithfully to the original samples regardless of which one you use, assuming your computer is not defective.

Re: Codec / Encoder terminology

Reply #16
@kode54

Very interesting. So, I'm going to do some tests to see which one is the fastest in my system.

Thank you very much for your support!

Re: Codec / Encoder terminology

Reply #17
The built-in "cuetools" is the best in my system.  ;)

Re: Codec / Encoder terminology

Reply #18
The encoder is based on libFlake. "cuetools" is used as a synonym for a "native" or "built-in" encoder or decoder.
Hi again...

Even if a little off topic, it would be possible to get your opinion, of all the ones offered by CUERipper, which FLAC encoder do you consider best for archiving CDs on the hard disk?

I've stuck to reference flac.exe always, and nowadays there is less reason to go for the competition other than for the fun of testing. 
Flake could improve over the reference back in the day, but a member of this forum made improvements that found its way into version 1.3.1 back in 2014.
Also, FLACCL can use a GPU, speeding things up - but on 2021 hardware, FLAC encoding is already fast. Look at the comparison at http://cue.tools/wiki/FLACCL, it was done when FLAC -8 was slower and less efficient - and the "i7 940" CPUs were released in 2008.

(IIRC, CUETools did at some stage offer encoding without audio checksum (for speed, that omission). I don't know if that is still the case - but you want the MD5 or else decoders might call the FLAC file corrupt. @korth , you got the facts and can correct any bullshit of mine? )
High Voltage socket-nose-avatar

Re: Codec / Encoder terminology

Reply #19
(IIRC, CUETools did at some stage offer encoding without audio checksum (for speed, that omission). I don't know if that is still the case - but you want the MD5 or else decoders might call the FLAC file corrupt. @korth , you got the facts and can correct any bullshit of mine? )
All internal FLAC encoders have MD5 enabled by default (but can be disabled).
@Gregory S. Chudov did mention MD5 calculation as a speed issue in FLACCL but I don't recall it ever being disabled as a default setting.
https://hydrogenaud.io/index.php?msg=756996
Verify is disabled by default (but can be enabled). Enabling Verify increases encoding time.
see also:
https://hydrogenaud.io/index.php?msg=337727
https://hydrogenaud.io/index.php?msg=936252
https://hydrogenaud.io/index.php?msg=807100
https://hydrogenaud.io/index.php?msg=807101
korth

Re: Codec / Encoder terminology

Reply #20
Flake could improve over the reference back in the day, but a member of this forum made improvements that found its way into version 1.3.1 back in 2014.
Those improvements (new apodization functions) was also ported to CUETool's FLAC encoder (but not to FLACCL) in CUETools 2.1.6

 
SimplePortal 1.0.0 RC1 © 2008-2021