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: exhale - Open Source USAC encoder (Read 342760 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: exhale - Open Source USAC encoder

Reply #1125
Not sure if this has been answered / asked before.
I am wondering if Exhale could theoretically be extended to encode AAC-LC files at high bitrate ( 200Kbps )?  On the assumption there would be overlap between xhe-AAC and AAC-LC making this easier.

The reason I asked is because we currently lack high quality AAC-LC encoder that is truly open source.

Re: exhale - Open Source USAC encoder

Reply #1126
Even beyond the "theoretically," I'm puzzled: what do you hope that would accomplish?

FDK-AAC is a high quality AAC-LC encoder and is open source.

There are two issues with its license. It contains code that makes use of patented techniques, and it does not come with a grant of any patent licensing. (It explicitly denies granting any such rights, rather than just not including any patent grant as most pre-GPL3 licenses did.)

These make its use in many circumstances legally questionable, and have led some linux distributions etc to call it non-free.

While LC-AAC patents have generally expired, getting a 'patent-free FDK-AAC for LC' may not be as simple as ripping out HE-AAC and HE-AACv2 code. It could take some very careful IP review. Lawyers lawyers lawyers.

Exhale's license has exactly the same problems. xHE-AAC is quite heavily patented. Exhale uses patented techniques and explicitly states that it doesn't/can't give you the right to use those patented techniques.

xHE-AAC is different enough from its predecessors that turning it into an LC encoder, and trying to get rid of patented techniques, would involve radical change. And then you'd still need the lawyers.

(CR Helmrich did have the sense to base his license on a standard license, where AFAIK those responsible for FDK-AAC didn't. But I don't think people object on the basis of any of the rest of FDK-AAC's license text. Yes, it says you can't charge for a copyright license, but that's not actually contravening the Debian Free Software Guidelines or whatever because it doesn't say you can't sell the software, just that you can't charge for a copyright license.)

Re: exhale - Open Source USAC encoder

Reply #1127
So, I tagged the final 1.2.0 release of exhale, see https://gitlab.com/ecodis/exhale/-/releases. If you don't have any issues with exhale 1.1.9, you don't need to re-encode your audio files. This is mainly a bugfix and code stabilization release, with a major version number switch because the API changed a little. The audio quality improvement at ~128 kbps non-SBR and ~96 kbps SBR is very small on average and hardly noticeable.

exhale version 1.2.0 (December 2022)

Changes since version 1.1.9 from December 2021:
  • C API correction, some code sanitizing (issue #24, merge requests !8!11, J. Regan)
  • exhaleLib: code cleanup, very minor quality improvements in CVBR modes f and 5
  • exhaleLib: 5% speedup of all modes, better target rate matching in CVBR mode g
  • exhaleLib: work around MinGW compilation hickup (issue #26; thanks, C. Degawa!)

Not sure if this has been answered / asked before.
I am wondering if Exhale could theoretically be extended to encode AAC-LC files at high bitrate ( 200Kbps )?  On the assumption there would be overlap between xHE-AAC and AAC-LC making this easier.
Theoretically yes, but it's still quite a lot of work, see also post number 9 in this thread. For that reason it's not on my To-Do list.

Happy end-of-year holidays, everyone!

Chris
If I don't reply to your reply, it means I agree with you.

Re: exhale - Open Source USAC encoder

Reply #1128
Updated compiles at Rarewares. :)




Re: exhale - Open Source USAC encoder

Reply #1132
fyi, a relatively minor issue was identified last week and a fix pushed a few moments ago along with commit https://gitlab.com/ecodis/exhale/-/commit/e796ab6a.

For details see this thread. When making binaries, please call this a 1.2.0.1 sub-release since I'll tag it like that on the weekend and since the changes are so few. Planning only annual releases now, I'll make a "more official" 1.2.1 release in December. Maybe some more issues have popped up by then.

Chris
If I don't reply to your reply, it means I agree with you.

Re: exhale - Open Source USAC encoder

Reply #1133
Updated compiles on Rarewares suitably tagged. :)


Re: exhale - Open Source USAC encoder

Reply #1135
fyi, I just committed a bit of test code* to exhale's Git repository. Since that code is disabled by default, there is no need for recompiled binaries.

* In case you're interested what I did here: I added this code to verify that exhale's quantization works as efficiently as desired... which it does in the vast majority of frames. To do so, I bypassed exhale's psychoacoustic model, making exhale operate in a manner which can more easily be evaluated using SNR measurements. Note that, when setting macro #define EE_MORE_MSE 10 in source file exhaleEnc.h, then recompiling, and calling the exhale command-line tool as exhale(.exe) 9 n 99 input.wav output.m4a, high-rate encodings similar to what FSLAC produces are possible, but at a lower bit-rate.

Chris
If I don't reply to your reply, it means I agree with you.

Re: exhale - Open Source USAC encoder

Reply #1136
I compiled Exhale for Linux ISA RISC-V 64, you can find it here:
http://81.56.4.34:7438/share/x4pYfC1S2x2ll5YW/exhale.zip

Once the program is launched, an x64 architecture is reported. I'll leave you the output below for any corrections.

  ---------------------------------------------------------------------
 | exhale - ecodis extended high-efficiency and low-complexity encoder |
 |                                                                     |
 | version 1.2.0 (x64, built on Sep 27 2023) - written by C.R.Helmrich |
  ---------------------------------------------------------------------

 Copyright 2018-2023 C.R.Helmrich, project ecodis. See License.htm for details.

 This software is made available under the exhale Copyright License and comes
 with ABSOLUTELY NO WARRANTY. This software may be subject to other third-party
 rights, including patent rights. No such rights are granted under this License.

 Usage:   exhale preset [inputWaveFile.wav] outputMP4File.m4a

 where

 preset   =  # (0-9)  low-complexity ISO/MPEG-D Extended HE-AAC at 16*#+48 kbit/s
         (a-g)  low-complexity Extended HE-AAC using eSBR at 12*#+36 kbit/s

 inputWaveFile.wav  lossless WAVE audio input, read from stdin if not specified

 outputMP4File.m4a  encoded MPEG-4 bit-stream, extension should be .m4a or .mp4


 Notes:   The above bit-rates are for stereo and change for mono or multichannel.


  ---------------------------------------------------------------------

I suggest the following lines for the output:
| version 1.2.1 (32 bit, built on 20230927) - written by C.R.Helmrich |
| version 1.2.1 (64 bit, built on 20230927) - written by C.R.Helmrich |
| version 1.2.1 (ARM 32, built on 20230927) - written by C.R.Helmrich |
| version 1.2.1 (ARM 64, built on 20230927) - written by C.R.Helmrich |
| version 1.2.1 (RISC-V, built on 20230927) - written by C.R.Helmrich |

  ---------------------------------------------------------------------

From actual exhaleApp.cpp code:

fprintf_s (stdout, " |                                                                     |\n");
#if defined (__arm__) || defined (__aarch64__) || defined (__arm64__)
  fprintf_s (stdout, " | version %s.%s%s (ARM, built on %s) - written by C.R.Helmrich |\n",
#elif defined (_WIN64) || defined (WIN64) || defined (_LP64) || defined (__LP64__) || defined (__x86_64) || defined (__x86_64__)
  fprintf_s (stdout, " | version %s.%s%s (x64, built on %s) - written by C.R.Helmrich |\n",
#else // 32-bit OS
  fprintf_s (stdout, " | version %s.%s%s (x86, built on %s) - written by C.R.Helmrich |\n",
#endif
             EXHALELIB_VERSION_MAJOR, EXHALELIB_VERSION_MINOR, EXHALELIB_VERSION_BUGFIX, __DATE__);
  fprintf_s (stdout, "  ---------------------------------------------------------------------\n\n");

Re: exhale - Open Source USAC encoder

Reply #1137
Thanks for testing this! I'm reluctant to change the exhaleApp header text at this late stage, but can you please try the following change and tell me whether, after recompiling this on RISC-V, the garbage text disappears?

In file src/app/exhaleApp.cpp, change lines 60-62 to:

#if defined (__riscv) || defined (__riscv__) // coloring not interpreted on RISC-V
#define EXHALE_TEXT_INIT ""
#define EXHALE_TEXT_BLUE ""
#define EXHALE_TEXT_PINK ""
#else
#define EXHALE_TEXT_INIT "\x1b[0m"
#define EXHALE_TEXT_BLUE "\x1b[36m"
#define EXHALE_TEXT_PINK "\x1b[35m"
#endif

Thanks,

Chris
If I don't reply to your reply, it means I agree with you.



Re: exhale - Open Source USAC encoder

Reply #1140
Ah, good to know. Thanks for the clarification.

I committed a modified version of the code above, where users like celona can change line 60 as explained in the (new) comment.

Also worked some more on last month's test code* (see above). Remember, none of this stuff changes exhale's default behavior, so no need for recompiles or reencodings.

Chris
If I don't reply to your reply, it means I agree with you.


Re: exhale - Open Source USAC encoder

Reply #1142
is possible 9 mode be 224/256 kbps? is it worth it?

Re: exhale - Open Source USAC encoder

Reply #1143
No, not worth it, there are other AAC encoders providing at least the same audio quality at 192 kbps and above.

Regarding exhale and high bit-rates: I did identify two rare issues during the last weeks and (hopefully) fixed them this morning, so here's a new release candidate. Please compile, give it a test, and report back any warnings/errors. I'm planning to tag this as the final release on the weekend.

exhale version 1.2.1 (December 2023)

Changes since version 1.2.0 from December 2022:
  • exhaleApp: always determine MPEG-4 instantaneous bit-rate across 2048 samples
  • exhaleLib: added code for MSE optimized encoding (for tests, disabled by default)
  • exhaleLib: code cleanup in quantization.*, increase max. IPF AU size to 10 kbit/ch
  • exhaleLib: fix two rare high-rate quality issues (only affects CVBR modes above 5)

Happy end-of-year holidays, everyone!

Chris
If I don't reply to your reply, it means I agree with you.


Re: exhale - Open Source USAC encoder

Reply #1145
Oops, some strange bit-rate bloating going on at the lower-rate presets with this release candidate. I'll update this post once I've fixed that regression.

Fixed as part of Git commit b17f659c. Now my lower-preset encodings decode almost bit-identically to those made with exhale release 1.1.9, which is good... and the higher presets are still bugfixed, which is even better.

I'll tag (and release) this new version as v1.2.1 tomorrow, assuming nothing else pops up.

Chris
If I don't reply to your reply, it means I agree with you.


Re: exhale - Open Source USAC encoder

Reply #1147
exhale v1.2.1-b17f659c compiles now at Rarewares. The "BA_MORE_CBR" variants will follow when I am able. (I am currently away from home until 16 January.) :)

Happy holidays to all.

Re: exhale - Open Source USAC encoder

Reply #1148
The "BA_MORE_CBR" variants added as of 2023-12-26.

Re: exhale - Open Source USAC encoder

Reply #1149
Quick playback question: I'm compiling ffmpeg with libfdk_aac support and while playing exhale encoded files the output volume is way too low. Does anyone know what the problem could be?