The following is a list of answers to questions regarding the use of the exhale application or library which are often being asked. If there is a question you do not find an answer to, please notify one of the developers or ask the question in, e.g., the HydrogenAudio forum.
Can the exhale application write or copy metadata to an encoded file?
If, by metadata, you mean iTunes-style artist/song/cover metadata: no, and there currently is no plan to add support for this. See this question for a work-around. If you are talking about ReplayGain-style peak/loudness metadata: this is taken care of by the dynamic range control (DRC) metadata according to ISO/IEC 23003-4, which is supported since version 1.0.1 of this software. See also the exhale release notes in the include subdirectory. Note, however, that album loudness data is not explicitly supported by the exhale application (since it can only treat each audio file independently). The program loudness is measured according to ITU-R BS.1770-4, with an additional 500 Hz high-pass applied. Details will follow.
How does the bit-rate mode of the exhale application or library work?
As documented by the exhale application when running it without any arguments on a command-line (see the README.md file), the bit-rate mode is a number # between 1 and 9, where a higher number means a higher constrained variable bit-rate (CVBR) configuration of the exhale encoder library. The resulting bit-rate when encoding a particular audio file with a specific CVBR mode depends on the CVBR mode as well as the content of the audio file (signal characteristics, sampling rate, and channel count). On average, the following mean (and minimum/maximum) bit-rates, in kilobits per second (kbit/s), are obtained for the given mode:
Bit-Rate Mode #
Mono Audio, 1 Channel
Stereo Audio, 2 Channels
32 (26/38) kbit/s
64 (51/77) kbit/s
40 (32/48) kbit/s
80 (64/96) kbit/s
48 (38/58) kbit/s
96 (77/115) kbit/s
56 (45/67) kbit/s
112 (90/134) kbit/s
64 (51/77) kbit/s
128 (102/154) kbit/s
72 (58/86) kbit/s
144 (115/173) kbit/s
80 (64/96) kbit/s
160 (128/192) kbit/s
88 (70/106) kbit/s
176 (141/211) kbit/s
96 (77/115) kbit/s
192 (154/230) kbit/s
For multichannel audio, the bit-rates increase accordingly. Note that, for audio files containing passages of digital silence, the resulting bit-rates might be lower than the minimum values listed in the table.
I get corrupted files when encoding using exhale via foobar2000. Why?
The reason is an incompatibility between exhale's file write-out routine and foobar2000's metadata transfer routine, with the latter writing the metadata only partially and/or at the wrong location in the MPEG-4 file generated by exhale. To avoid this issue, foobar's file conversion needs to be configured to skip the transfer of any metadata from the audio input file(s) to the exhale output file(s) and to manually transfer the metadata using an external program (MP4Box or AtomicParsley, for example). To do so, mark all files to be converted in foobar, rightclick on one of them and select Convert -> .... In the newly opened "Converter Setup" window click on Other at the bottom and uncheck all three "Transfer ..." options, as shown in the following image:
Then click on Back. If you use the "Converter Setup" window to convert your audio files into the xHE-AAC format, remember to select the exhale encoder under Output format (see the README.md file for details).
I compiled exhale into a DLL. How can I use it in my own applications?
This depends on whether you want to use implicit (load-time) or explicit (run-time) linking to the exhale DLL. This page describes the difference between the two linking methods and is a recommended read to anyone new to the subject.
An example of implicit linking to the exhale DLL is actually provided by the exhaleApp source code, but you need to do the following in Visual Studio to configure it that way:
Build the DLL as described in the Compilation section of exhale's README.md file. This creates a file "exhaleLib.dll" somewhere (depending on your compiler and its configuration) in the lib subdirectory of your exhale distribution.
Open the file "exhaleApp.cpp" of the exhaleApp project and uncomment the line starting with // #define USE_EXHALELIB_DLL ... at the top of that source file. Then it should be possible for you to build the exhaleApp project, e.g., by pressing F7, without any errors.
Before you can run the DLL compatible exhale application that you just created, you need to place the exhale DLL into the application's directory. To do so, copy the "exhaleLib.dll" file located in step 1 into the subdirectory of the bin subdirectory where the "exhaleApp.exe" executable is located.
For further details on how to use the public functions exported by the exhale library, please consult
the source code encapsulated by the USE_EXHALELIB_DLL macro in the "exhaleApp.cpp" source file
the header file "exhaleDecl.h" in exhale's include subdirectory
Why is the exhale encoder so slow? Is there a switch for fast encoding?
The exhale encoding library includes a method for joint optimization of the spectral coefficient quantization and band-wise scale factor selection, which is computationally complex and, thus, slows down the encoder quite a bit. This method can be disabled by changing
#define EC_TRELLIS_OPT_CODING 1
#define EC_TRELLIS_OPT_CODING 0
in file "entropyCoding.h" in the src/lib subdirectory of the source code and then recompiling (see the README.md file on how to do this), but this is not recommended since it degrades the audio quality of the encoded xHE-AAC files.
Can I configure the exhale encoder to use a custom audio bandwidth?
No, not from the command-line application, you would have to modify the source code and recompile exhale. Note, however, that exhale was carefully designed to provide good quality for a variety of input signals and for many people with different levels of hearing acuity. Moreover, there are an input audio bandwidth detector and a psychoacoustic model in the code which optimize the coding bandwidth based on each audio frame. Therefore, in order not to jeopardize exhale's audio quality, it is not recommended to make any such changes.