Lossless files. Lossless formats and how to work with them. What should I do with this one big file?
What is the lossless format for?
This is music encoding (Lossless data compression) - compression without loss of quality, an information compression method that allows you to restore the compressed information of the original with bit accuracy.Lossless- this is a so-called “archive” (compressed wav, lossless codec), with source audio material, from an audio disc, CDDA, SACD, DVD-A or vinyl record, which is supplemented with information. In this form it can be stored and listened to.
When you unpack (decompress) such an archive, you receive the original audio material (from which the rip was taken) accurate to the bit.
For compression, lossless codecs such as - APE, Flac, WV, ALAC, TAK, TTA, the main purpose of which is to transform (convert) an audio file to reduce its size from any source of uncompressed audio (original), using lossless information compression, i.e. lossless.
When compressing (converting) into any of the above codecs, the difference is only in the bitrate (bitrate - data flow rate in kilobits per second during playback), how much the audio material is compressed, the parameter of which has nothing to do with the safety of the sound, i.e. You can use any codec convenient for you, there is no difference in sound quality between them.
Why do we need lossless?
1. First of all, the ability to make a copy of an audio disc.2. Convenient storage and exchange via the Internet, having a smaller size compared to the original.
Lossless formats and how to work with them
The article addresses the following issues:
1) What is lossless?
2) What is CUE?
4) Is it possible to play lossless with my Winamp (Windows Media Player, etc.)
8) What is a transcode?
Perhaps I haven't covered all the frequently asked questions. You can add your own questions not included in this list. If the question falls into the category of frequently asked questions, I will include it in this article. I will also listen to your comments and indications of inaccuracies (write in a personal message). The purpose of the article was to create material that would make it easier for beginners to get acquainted with lossless and simplify its use.
1) What is lossless?
Lossless- This is lossless data encoding (lossless compression). Of course, we are talking about encoding music (digital audio). Lossless compression can be well understood if we consider an example of the work of ordinary and familiar archivers (WinZIP, WinRAR, etc.). We take, say, a text file and archive it. We get a much smaller archive with the document. Having unpacked it, we will have exactly the same document. The same goes for lossless audio compression. We compress a regular WAV file with a lossless codec and get a smaller file. From it we can always get our WAV back in its original form and burn, say, a disc exactly in the form in which it was purchased in the store. There are quite a lot of similar codecs. The most popular are APE (Monkey's Audio), FLAC (Free Lossless Audio Codec), WavPack. All these codecs have compression around 30-50%. But I want to note that we don’t have to convert everything to WAV. We can listen to these compressed files are completely safe on our computer. We’ll talk about this below...
2) What is CUE?
CUE (Cuesheet)- this is an index file in which the tracks are marked. The fact is that by distilling our WAV into one of the lossless formats, we get one solid and continuous file. To make it possible to navigate and jump from track to track, CUE files are used. These files have the extension .cue. Its structure is very simple. Let me give you a small example:
PERFORMER "Rise Against"
TITLE "Appeal To Reason"!}
FILE "RA-ATR.flac" WAVE
TRACK 01 AUDIO
PERFORMER "Rise Against"
INDEX 01 03:21:00
TRACK 02 AUDIO
TITLE "Long Forgotten Sons"!}
PERFORMER "Rise Against"
INDEX 01 04:03:00
TRACK 03 AUDIO
TITLE "Re-Education (Through Labor)"!}
PERFORMER "Rise Against"
INDEX 01 03:44:00
As you can see from the example, at the beginning there is data about the disc itself (artist, album). Next comes the FILE line, which indicates the actual file that was indexed. And then comes the track index (track number, track name and beginning of the playing time).
3) How can you play lossless formats?
Of course, there are a great many players. I would like to focus on a fairly simple and at the same time very functional player - Foobar2000. This player has many versions and assemblies. I've tried quite a few of these variations. I settled on the assembly from Dr.Death (you can download it from our server). The fact is that this assembly contains all the plugins and codecs we need. So we don’t have to search for and download anything. So to speak, the finished product. It's also a bit spruced up and doesn't have as sparse a design as the original Foobar. Well, these are all goodies and tricks and we are of little interest to them.
And so, having downloaded the archive, unpack it and run the file foobar2000.exe (no installation required). Take a look and get to know the player. Note: in the archive there is a wonderful readme.chm file with instructions on how to configure the player for yourself. It discusses setting up the technical part and setting up buttons and other beauties.
To get started, first of all go to File >>> Preferences >>> File Types
Here, select the formats that will be played by Foobar. If you use it only for lossless, then check APE, FLAC, WV, and don’t forget to check CUE.
Thus, we have associated the files we need with Foobar and now, after double-clicking on the formats you noted above, they will be played in the Foobar player
4) Is it possible to play lossless with my Winamp (Windows Media Player, etc.)?
Of course, no one is forcing you to use Foobar. I considered it as a fairly simple way to play it. We can also use our usual players. For example, Winamp.
To play, you need to install the codecs themselves on the system. I will provide links to install the most popular codecs:
1) http://www.monkeysaudio.com/download.html - Monkey's Audio (APE)
The package includes a plugin for Winamp, which is installed along with the codec.
2) http://flac.sourceforge.net/download.html - Free Lossless Audio Codec (FLAC)
Direct installation link for Windows: http://cyberial.com/flacinstaller.asp
The kit also includes a plugin for Winamp
3) http://www.wavpack.com/downloads.html - WavPack (WV)
The codec and plugins are installed separately. Plugins available for Winamp, Apollo, XMMS, Nero Burning Rom.
4) http://homepage3.nifty.com/blacksword/ - OGG Vorbis
There are several options similar to LAME. I recommend using a build called Lancer, because... Among other things, it is also optimized for different processors.
5) http://www.musepack.net/index.php?pg=win – MusePack
Everything is simple here, it is on the official website in the Windows section “Encoder”
6) http://www.nero.com/nerodigital/eng/down-ndaudio.php - MP4 (Nero): (meaning AAC format).
The archive contains the win32 folder and the file NeroAacEnc.exe.
5) What should I do with this one big file?
As a rule, lossless music is distributed as two files. The first is the music itself in one of the formats in the form of one whole continuous file. The second is a CUE file (about CUE, see point 2).
In order for us to be able to listen to the album normally, switching between tracks, the package must include a CUE file. The Foobar player allows you to play a combination of File+CUE. In this case, the playlist immediately displays a list of tracks without physically cutting the entire file.
There is also a special plugin for Winamp to teach it how to work with CUE. Let's take it.
6) I open the album through CUE and see an empty playlist. What to do?
This problem often occurs when working through CUE. This is because the CUE file is referencing the wrong original audio file. Most likely, CUE refers to a file with a WAV extension, while ours, for example, is APE. This is due to the fact that initially (when creating the image) the CUE is created specifically for the WAV file, which is then converted to lossless and many simply do not bother to forward the CUE.
Let's figure out how to fix this:
1) Open CUE in any text editor. For example, in a regular Notepad
2) We will see the CUE file code itself, which we need to tweak a little.
PERFORMER "Rise Against"
TITLE "Appeal To Reason"!}
FILE "RA-ATR.wav" WAVE
TRACK 01 AUDIO
TITLE "Collapse (Post-Amerika)"!}
PERFORMER "Rise Against"
INDEX 01 03:21:00
TRACK 02 AUDIO
TITLE " Long Forgotten Sons"!}
PERFORMER "Rise Against"
INDEX 01 04:01:00
3) Find the line starting with the word FILE. It contains a link to the source sound file.
FILE "RA-ATR.wav" WAVE
We see that the file has a wav extension, and my source file is, for example, in APE. We look at the format of our source file and change the extension to the one we need (ape, flac, wv). We get a line like:
FILE "RA-ATR.ape" WAVE
5) Save our file and run it in the player. The list should now display correctly.
7) How can I convert lossless to MP3 (for listening on the player)?
This question also comes up very often. Of course, we want to listen to music on the street, but today there are not many players that play lossless. There are options to reflash your player, but this is a separate topic.
There are many conversion methods. You can use converter programs. I prefer to use Foobar again. There are several advantages:
No additional software needed
+ We add the necessary formats ourselves (if they are not available by default)
+ At the same time we are cutting our large file into tracks
So let's begin.
1) Upload our album to the playlist using the CUE file.
2) Select all tracks from the list.
3) Right-click on the selected tracks and select
Convert >>> Convert to...
4) Select the required format (in our case it is MP3).
Before clicking OK, we need to download the codec itself to convert to MP3. We will use Lame 3.97 (you can download it). Let's unpack it and remember where we put it.
After clicking OK, the player will ask you to specify the folder where lame.exe is located, which is what we do.
Then we indicate the location where the files will be saved and that’s it, the conversion is done.
Note: By default, only one MP3 conversion option is available in the list (avg 245 kbps with JointStereo). This is actually enough. If that’s not enough for you, then you can add your own version of bitrate and stereo. To do this, go to the MoreSettings conversion window and select AddNew. Next in the list, select Custom and enter your values:
The screenshot shows the settings for MP3 320 kbps with “full” Stereo (--cbr -b 320 -m s - %d)
8) What is a transcode?
Transcode- sound format. There are people who rip MP3s from Audio CDs via EAC (Exact Audio Copy, more details on the official EAC website) to Lossless. The transcode can be easily recognized by the spectrum. It is a DTS lossy format, i.e. with losses. You can convert using dBpowerAMP Music Converter.
Let's grab it here: http://www.dbpoweramp.com/dmc.htm
How to work with the EAC and dBpowerAMP Music Converter programs is explained in some detail on their official websites.
Lil' gRyphY,
www.respecta.net
Sound engineer
“Here, of course, the question is not about the difference between the MP3 format and FLAC, it is broader: how do lossy compression formats (MP3, AAC, WMA, Ogg Vorbis and others; that is, lossy) differ from “lossless” (FLAC, ALAC, APE , WavPack and others; that is, lossless). Actually, with this formulation, it becomes clear that in the first group of formats, the original data is not completely preserved, while the second can be restored to the original format (for example, Wav or Aiff, extracted from a CD) without loss. What exactly is lost and in what proportions depends on the specific type of lossy files and their bitrate, that is, the degree of compression. But to say that all MP3s sound lousy and flakes sound perfect is the height of arrogance and incompetence. Audio formats with quality losses have been developed for more than twenty years; serious research laboratories have been working on this (the Fraunhofer Institute, for example, in addition to working on MP3, is also famous for the invention of the most efficient solar battery) and groups of enthusiasts. The mathematics of encoding is constantly improving, and these days it is no longer so easy to distinguish between files produced by different codecs by ear.
I would immediately make a reservation that not only the files themselves are important, but also the equipment on which they are going to be tested, the environment during listening and the listening experience of the examiner. In MP3 of any low bitrate, Ariel Pink will sing in the voice of Ariel Pink, there is no doubt about it. It is quite possible that for a person who listens to music-as-a-melody through white headphones in a subway car, this will be enough for his eyes, and the difference in codecs will come down to a comparison of file sizes for him. A disc jockey, who is ashamed to buy or look for lossless, will also think that everything is in order with his MP3 while he prepares a set in “Traktor” on the built-in speakers of a laptop. True, during a party on a large, loud and clear-sounding club audio system (these are sometimes found, believe me), it suddenly turns out that the guy performing immediately after, for some reason, the music became big, clear and cool. Lossy formats are being developed for the convenience of transferring files over the Internet, for storage on portable audio players, and for personal playback, finally. Agree, it’s stupid to watch a one-gigabyte AVI movie on a big screen. Even in a home theater this is not entirely decent. It's the same with MP3. On an iPod, listen to your heart's content (although AAC from iTunes definitely sounds better), but if you go to a disco, get lossless, even if you play Skrillex. And when you listen to Christmas jazz with your fiancée's parents on their big lacquered speakers, please also buy FLAC or ALAC. With MP3 you risk getting into an awkward situation. In theory, after a bitrate of 256 kbps, it will be quite difficult for your future audiophile father-in-law to tell whether it is playing lossy or lossless. However, there are several points that can spoil your cloudless future.
Video showing the difference between WAV and MP3 formats
Usually, when you see an MP3 file, you don't pay attention to anything other than the bitrate. If you already think of yourself as a person with a taste for music and sound, then you should still look in the file properties for the data of the codec that was used during conversion. Suppose you see the inscription “Lame 3.99” there, this means that the latest MP3 codec was used and you are in luck. But next to it is “Joint Stereo”, and this is no longer great. This means that in order to save a couple of percent of file size, the codec was allowed to put some things in mono, although the recording is stereophonic, and the sound picture lost a little in depth and clarity. There are also completely botanical CBR or VBR, ABR and UBR, but if you are ready to dig that seriously, then please dig it yourself. Well, you’ve figured out the file properties, everything is simple there. The tricky part is this: you almost never know what your 320 CBR Stereo is made of. Ripped from internet radio? Made from the original Japanese CD without remastering? Recoded from 192? There is a lot of music in torrents or Soulseek, but there are few guarantees. Another difficulty is that lossy formats slightly increase the peak values of the audio signal. The so-called overshoot is thousands of micro-overloads along the entire length of the file. Again, you won’t notice this on the train with an iPod. And the future father-in-law may hear.”
Video showing the difference between MP3 and flak
sound engineer, worked with Sergei Lazarev, Roman Kenga, Joseph Kobzon, Irakli Pirtskhalava, Anita Tsoi
“When compressed by the MP3 codec, part of the spectrum data that is indistinguishable to the average person on the average equipment is simply removed. High fidelity equipment makes it possible to appreciate the disadvantages of this type of compression; artifacts become audible even to a less average listener. But the vast majority of household acoustics, by definition, do not reproduce the entire audio spectrum linearly; they easily mask the shortcomings of MP3 compression. So nothing will disturb us, average listeners.”
Compressed using special lossless audio codecs, it can be restored with absolute accuracy if desired.
If you take an ordinary Audio CD with analog audio, record it in WAV format for sound without compression, then compress the WAV using the lossless codec, then decompress the resulting audio file into WAV and burn the result to a blank CD, you can get two completely identical Audio CD.
The advantage of lossless for storing an audio collection is that the quality of the recordings is much higher than that of lossy codecs, and they take up less space than uncompressed audio. True, lossy files are smaller in size than lossless music files. Most modern player programs understand the lossless format. Those programs that are not able to play it can easily learn it using the lossless plugin. What are lossless audio formats?
Audio formats without loss of quality
A true music lover is unlikely to be satisfied with the sound of music recorded in Ogg Vorbis or MP3 compression formats. Of course, if you listen to audio recordings on household audio equipment, sound defects cannot be detected by ear, but if you try to play a compressed file on high-quality Hi-Fi equipment, sound defects will immediately become apparent. Of course, creating a collection of quality music on CD or vinyl records is not easy. There is a reasonable alternative to this path for lovers of high-quality sound - lossless music. It can be stored on a PC in a form that allows the original music parameters to remain unchanged, even if compression is applied. This way simultaneously solves the problems of high quality music and its compact storage, because audio equipment for listening (headphones, speakers, amplifiers) has a very affordable price.
Uncompressed audio formats without loss of quality:
- CDDA is an audio CD standard;
- WAV - Microsoft Wave;
- IFF-8SVX;
- IFF-16SV;
- AIFF;
Compressed formats:
- FLAC;
- APE - Monkey's Audio;
- M4A - Apple Lossless - high-quality music format from Apple;
- WV - WavPack;
- WMA - Windows Media Audio 9;
- TTA - True Audio.
- LPAC;
- OFR - OptimFROG;
- RKA - RKAU;
- SHN - Shorten.
FLAC format
The most common format is the format What distinguishes it from lossy audio codecs is that no data is removed from the audio stream when used. This makes it possible to successfully use it to play music on Hi-Fi and Hi-End equipment, as well as to create an archive of a collection of audio recordings.
The great advantage of the format is its free distribution. This is important for musicians who record their own music. The format has recently gained great popularity, thanks to which its support is included in the vast majority of media players.
APE format
Unlike FLAC, the APE format only has codecs and plugins designed for the Windows platform. For other platforms, there are expensive solutions from third-party software manufacturers. The algorithm is capable of achieving lossless compression of audio information by approximately 1.5-2 times. It includes three main encoding stages, of which only one is based on the use of properties inherent in sound for compression. The rest are similar to regular archivers. Despite the fact that the compression algorithm is distributed free of charge, license restrictions are such that it is practically inaccessible to amateur musicians.
Apple Lossless Format
High quality lossless music can be listened to using Apple's audio compression codec without sacrificing quality. This format was developed by Apple for use on its own devices. The format is compatible with iPod players that have special dock connectors and the latest firmware. The format does not use specific rights management (DRM) tools, but the container format contains such capabilities. It is also supported by QuickTime and is included as a feature in iTunes.
The format is part of freely available libraries, which makes it possible to organize listening to files in Windows applications. In 2011, Apple published the source codes of the format, which opens up broad prospects for the codec. In the future, it can seriously compete with other formats. The tests showed good results. Compressed files range in size from 40-60% of the size of the originals. The decoding speed is also impressive, which justifies its use for mobile devices whose performance is low.
One of the disadvantages of the codec is that the extension of the audio files matches the audio codec. This leads to confusion, because AAC is not a high-quality music format. Therefore, it was decided to store the data in an MP4 container with the .m4a extension.
Among other formats, it is worth mentioning Windows Media Audio 9 Lossless, which is part of the Windows Media application. It works with Windows and Mac OS X. However, users do not respond very favorably to it. There are often problems with codec compatibility, and the number of supported channels is limited to six.
WavPack format
WavPack is another freely distributed audio codec that compresses audio information without loss of quality. WavPack integrates an exclusive combined mode that allows you to create two files. One of the files in this mode is created with relatively little loss of quality.wv, which can be played independently. The second “.wvc” file corrects the previous “.wv” and, in combination with it, makes it possible to fully restore the original. Some users may find this approach promising, since there is no need to choose between two types of compression - both will always be implemented.
Also worthy of attention is a video codec with high-quality sound - lagarith lossless codec. It works quickly and efficiently.
Software for listening to lossless audio
Software players did not immediately learn to work with specific lossless codecs that can reproduce sound without loss.
WinAmp Player
Capable of handling almost all music playback formats without lossless quality. What a good lossless player is can be understood by its example. It is able to correctly handle the processing of individual tracks in lossless format. This is a typical problem with FLAC or APE codecs. It consists of digitizing the entire audio disc at once and recording it in one file without dividing it into tracks. An additional file with the extension .cue is designed to solve the problem of dividing into tracks. It contains a description of the access parameters for each album track. An ordinary player plays the entire lossless file. The player for lossless AIMP perfectly reproduces most audio formats and recognizes tracks in a lossless file.
Digital players with lossless support
Users respond well to the digital players jetAudio, Foobar2000, Spider Player. There are no fundamental differences between them. The choice of any device is based on the subjective opinion of a music lover about the convenience of the interface for lossless playback. You can find out what a lossless format is by testing these players.
The Apple Lossless format is played using iTunes. In addition, this codec is supported by the popular video player VLC.
Owners of Apple-compatible computers can use two interesting programs: Vox and Cog.
They support the following lossless formats:
- Apple Lossless;
- FLAC;
- Monkeys Audio;
- Wavpack.
In addition to this, there are many useful features, for example, Last.fm services are supported.
Owners of Windows computers can use any application that is compatible with music codecs without loss of quality: Foobar2000 or WinAmp. Winamp requires special plugins. Lossless music plays well on iTunes and KMPlayer. An advantage of iTunes that other players do not have is the ability to support tags.
Lossless compatible devices
It is unlikely that the owner of a music library will want to spend time converting files from the FLAC format to MP3 in order to be able to listen to recordings on his gadget. A smartphone or tablet has limited capabilities that are incomparable to a computer, but nevertheless, many mobile devices play lossless formats.
For example, owners of Android devices can use the andLess player. It is capable of playing FLAC, APE, uncompressed WAV and other formats supported by Android.
The situation is worse for owners of devices on the Blackberry platform. Only owners of the Bold 9000 and 8900 and later models can listen to the lossless format.
Owners of Apple devices can use the ALAC codec without any problems. It is supported by iPod (except shuffle), iPhone and iPad. For FLAC format, you can download FLAC Player from the App Store.
The FLAC codec is supported by Samsung Galaxy devices, some Sony Ericsson smartphones and iriver players.
Stationary devices from many manufacturers also received support for FLAC. Media players and media centers allow you to do without a personal computer when listening to songs without loss of quality.
It is still far from full support for absolutely all formats, but it is enough that the media player understands the FLAC codec - the most common codec for high-quality lossless music. What is lossless playback equipment?
Listening equipment
To truly enjoy the sound quality, you need special equipment: headphones, amplifiers, speakers. The easiest way, of course, is with headphones. If you intend to enjoy music while sitting at your computer, these are best suited. Users respond well to products from Koss and Sennheiser. Particular attention should be paid to the size of the membrane. The larger it is, the better the sound. It is important not to be deceived. Some manufacturers put a small membrane in large ear pads - such headphones look solid, but the sound is only suitable for listening to mp3s.
It is difficult to recommend anything to fans of high-quality sound equipment (Hi-Fi or Hi-End). The choice in this area is limited only by budget and tastes. Equalizer, amplifier, acoustics - the choice of these devices has many options. PC owners who are choosing a high-quality one are better off choosing budget monitor speakers from any well-known brand. Users respond well to the Microlab SOLO series acoustics. To make lossless music sound good, it is important to purchase acoustics with a subwoofer. unable to cope with the reproduction of the lower frequency band.
Results
New digital sound formats have made it possible for lovers of high-quality music to acquire their own libraries on large-capacity storage media and listen to their favorite compositions in high quality, saving quite a lot of money and quite a lot of space. The ideal option, of course, is a full set of Hi-End equipment, but budget options will also bring great pleasure to music lovers. After all, the experience of listening to music is incomparable to MP3 on plastic speakers.
Let’s make a reservation right away that the article talks ONLY about general characteristics and will not include some details. In the future, Lifehacker will conduct his own impartial research. And today we will try to generalize the already known experience.
There is analog and digital.
Analogue is good, but short-lived and inconvenient. Therefore, analog media, despite high vinyl sales, will not return.
Audio digital can be of three main types:
- in a format that does not use compression;
- in a format that uses lossless compression;
- in a format that uses lossy compression.
The graphs show a good AudioCD, a compressed OGG with a variable bitrate of 350 kbps and an MP3 using Lame. The lower the graph is, the closer the sound is to the original. It turns out to be a very interesting picture. Despite the fact that MP3 has clearly cut off high frequencies, unlike OGG, which shows a roll off below 2 kHz.
The time-frequency distribution of sound reveals equally interesting things. At a constant bitrate of 320 kbps, the MP3 is almost identical to the original recording. It seems that everything is falling into place now. But... In fact, everything gets even more confusing.
Why use lossy at all when lossless is available?
Common sense.
The fact is that most analog recordings do not contain the amount of information that would need to be stored in high-quality formats. Do not forget that the native sampling frequency for CD is 44.1 kHz, quantization is only 16 bits.
The previous graphs do a good job of demonstrating the high fidelity of MP3 transmission. But for an audio cassette or magnetic tape (unless, of course, it is a master tape), the characteristics of AudioCD are unattainable. And for mass studio equipment, the ability to record analog sound corresponding to AudioCD appeared relatively recently. There is no point in digitizing into FLAC (and especially into WAV) a concert recording or record from the pre-digital era, especially those made from magnetic media. They do not contain the spectra and the amount of information that containers can store without compression.
What has changed today
It is a rare sound engineer who makes a digital master recording (which is then reproduced on physical media), using modern technologies to the fullest. Therefore, the chance that a 24-bit track is actually just 16-bit is extremely high.
Analogue high-quality recording on high-quality equipment is even more difficult to find today - unless among fans of such a sound. This is, for example, Jack White, ex-leader of the White Stripes. At the same time, some of his recordings belong to lo-fi variations, and looking for the transcendental sound characteristics of a track there becomes a kind of pleasure for gourmets.
If you imagine an ideal source, then only a trained ear or listening on high-quality audio equipment will be able to find the compressed file. And based on this (and), it is worth drawing the following conclusion:
Necessary and sufficient for mid-price equipment is AAC, in the absence of which (and in the absence of sources that can be encoded in AAC) - MP3 with a constant bitrate of 320 kbps, created using the Lame 3.93 codec (recommended decoding keys: -cbr -b320 -q0 -k -m s).
The exception is recordings that were originally captured in high quality, such as those recorded on DVD-Audio, SACD, or recordings that were originally compiled in DSD (or a similar format) at a high bitrate.
Although lossless has some features. And we will tell you about them next time.