MP3 and FLAC audio formats Part 5


Free Download Mp4Gain
picture

MP3 and FLAC audio formats Part 5

Audio File Format

FLAC encoding and decoding

audio file format

Let’s consider file compression with the FLAC encoder, which can be downloaded here. For it to work, we need the flac.exe file. If you run it without parameters, you will get a short help on using the encoder. For detailed help, type flac –help (the information will be displayed) or flac –help> usage.txt (the information will be displayed in the uses.txt file).

WAV to FLAC encoding with default compression ratio (5):

flac infile.wav

WAV to FLAC encoding with specified compression ratio:

flac -n infile.wav where n is a number from 0 (minimum compression) to 8 (maximum compression).

FLAC to WAV decoding:

flac -d infile.flac

To ensure that FLAC compresses the data without loss, you can use any software that can compare files bit by bit, for example the built-in Windows utility fc. For the experiment, select any WAV file and perform the following transformations on it: original.wav (original file)> compressed.flac (encode file to FLAC)> decompressed.wav (decode FLAC back to WAV). Next, compare original.wav and decompressed.wav using fc in binary comparison mode:

fc / b original.wav decompressed.wav

After the verification is complete, the utility will display the message “No differences found between files”, indicating your full identity. This means that when converting to FLAC and vice versa, not a single bit was lost, which needed testing. If you do the same experiment with MP3, the result will be completely different, there will be a lot of differences between the files.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Author: R. Arias

R. Arias is the author of this article and has extensive experience for more than 30 years as a recording engineer and audio specialist, as well as more than 20 years of experience creating algorithms related to audio and video. Linkedin