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 304567 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: exhale - Open Source USAC encoder

Reply #500
Indeed, thanks a lot to (in alphabetical order) celona, diizzy, guruboolez, IgorC, Jukka, m14u, Rollin and all the others for their assistance on this major release change! I just fixed two final issues, one very rare one (the encoder failed to write extremely unlikely bit-chunks of lengths greater than 32 bits properly) and slightly retuned the bit allocation for CVBR mode a with 44.1 kHz input sampling rate one last time (one particular feature was still disabled even though it is enabled with 48 kHz input). Both is fixed in the latest commit (https://gitlab.com/ecodis/exhale/-/commit/c71ec480), which means that

we have an official exhale 1.1.0 release now! :) Consider this a birthday present to the community. ;) 🥂

At least on the develop branch. Please let me know if there are compilation issues, especially under ARM, Linux, and MacOS. If not, I'll merge this to the master branch tomorrow and tag it.

Changes since exhale 1.0.8 from last month:
- addition of basic SBR functionality for lower-rate coding down to 18 kbps/channel
- exhaleApp: add support for CVBR modes a—g for encoding with SBR functionality
- exhaleApp: show «ARM» in header and '-v' command on corresponding platforms
- exhaleLib: basic 2:1 SBR encoding with ccfl = 2048, minor fixes and code cleanups

Regarding audio quality improvements, I decided to address only one more thing in the near future, which is to
- calculate / code SBR envelope values at higher frequency resolution (version 1.1.x)

When I started this project, I never thought that 1. exhale would, one day, sound so good even at bit-rates as low as ~39 kbit/s (which, due to the last-minute change mentioned above, is the average bit-rate for stereo with exhale 1.1.0 SBR mode a) and 2. that I would write post number 500 announcing this release. Thanks for all the interest and discussion about this encoder and my work! I'll keep maintaining the source code in case further issues appear, of course.

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

Re: exhale - Open Source USAC encoder

Reply #501
And, for checking purposes, here are Intel compiles of exhale-develop-1.1.0rc4-c71ec480 (to become 1.1.0 release tomorrow, all being well!):

www.rarewares.org/files/aac/exhale-develop-1.1.0rc4-c71ec480_x64.zip

www.rarewares.org/files/aac/exhale-develop-1.1.0rc4-c71ec480_x86.zip

:)

Re: exhale - Open Source USAC encoder

Reply #502
Very nice Chris! Exhale really blowed some fresh air on HA.org this year and it reminds me the origin of HA.org (active development of LAME, Musepack, Vorbis, PsyTel AAC…).
Many thanks for all your efforts and for giving us a new perspective on coding efficiency!


And a big THANK YOU for all binaries (John33, Netranger, Celona…)!

Re: exhale - Open Source USAC encoder

Reply #503
Here, have some signed and notarized binaries for macOS, Universal 2. I do not know if they will run on <11.1, as I forgot to add the minimum version setting, heh.

Re: exhale - Open Source USAC encoder

Reply #504
I also compiled the same version for macOS, sorry if I always forget to notarize, but my executable is slightly larger.

I spent the night banging my head over a formal problem: Exhale comes with instructions to compile from the command line, which is a plus because integral Xcode is too large.

I must imagine that for the average user it is already difficult to compile the code, and to obtain a Universal 2 binary he will have only one machine with which to cross-compile the binary for a platform other than the one in use, to merge them together in a fat binary with the lipo command.

Exhale's instructions is correct only for the platform in use, but perhaps it is better not to complicate the existence too much for new users.

I attach the files necessary to reproduce the error I wrote above.

Re: exhale - Open Source USAC encoder

Reply #505
It's quite simple to cross compile from either side. Just add CPPFLAGS and LDFLAGS of:

Code: [Select]
-arch x86_64 -arch arm64

Bam, everything's Universal 2.

Then to sign:

Code: [Select]
codesign --sign "Developer ID Application" --options runtime <executable path>

And notarize:

Code: [Select]
zip -9 exhale-whatever-name-you-want.zip exhale exhaled
xcrun altool --notarize-app --primary-bundle-id "de.ecodis.exhale" --username <your icloud developer account> --password "@keychain:somekeychainitem" --asc-provider <your dev account provider id> --file <the name of the zip file you created above>

There's an extra step for stapling the notarization ticket to the binary, but that's not supported for command line binaries anyway, so you can't do that.

Re: exhale - Open Source USAC encoder

Reply #506
We need to simplify :)

I have attached 3 executables for arm64 and 2 universal ones, so I found a way around the cross-compling problems.

If the user has a new Apple Silicon M1, just need to open the Terminal info and select Open with Rosetta, then launch Terminal and type
Code: [Select]
make release
and get the x86_64 binary without errors.

I tried to compile with --environment-overrides but using Rosetta and I get the same error message with
Code: [Select]
make release -e arm64
or with
Code: [Select]
make release -e x86_64
/Library/Developer/CommandLineTools/usr/bin/make -C src/lib  release MM32=0
/Library/Developer/CommandLineTools/usr/bin/make -C src/app  release MM32=0
make: *** No rule to make target `x86_64'.  Stop.


Otherwise if I compile without using Rosetta I get this error message for x86_64:
make: getcwd: Operation not permitted
make: *** No rule to make target `release'.  Stop.


Without Rosetta and without --environment-overrides there is no problem but if I use -e arm64 I get the following errors:
/Library/Developer/CommandLineTools/usr/bin/make -C src/lib  release MM32=0
g++ -c -MMD -MF ../../build/bitAllocation.r.d -MT ../../build/bitAllocation.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/bitAllocation.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/bitAllocation.cpp
g++ -c -MMD -MF ../../build/bitStreamWriter.r.d -MT ../../build/bitStreamWriter.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/bitStreamWriter.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/bitStreamWriter.cpp
g++ -c -MMD -MF ../../build/entropyCoding.r.d -MT ../../build/entropyCoding.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/entropyCoding.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/entropyCoding.cpp
g++ -c -MMD -MF ../../build/exhaleEnc.r.d -MT ../../build/exhaleEnc.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/exhaleEnc.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/exhaleEnc.cpp
g++ -c -MMD -MF ../../build/exhaleLibPch.r.d -MT ../../build/exhaleLibPch.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/exhaleLibPch.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/exhaleLibPch.cpp
g++ -c -MMD -MF ../../build/lappedTransform.r.d -MT ../../build/lappedTransform.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/lappedTransform.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/lappedTransform.cpp
g++ -c -MMD -MF ../../build/linearPrediction.r.d -MT ../../build/linearPrediction.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/linearPrediction.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/linearPrediction.cpp
g++ -c -MMD -MF ../../build/quantization.r.d -MT ../../build/quantization.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/quantization.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/quantization.cpp
g++ -c -MMD -MF ../../build/specAnalysis.r.d -MT ../../build/specAnalysis.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/specAnalysis.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/specAnalysis.cpp
g++ -c -MMD -MF ../../build/specGapFilling.r.d -MT ../../build/specGapFilling.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/specGapFilling.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/specGapFilling.cpp
g++ -c -MMD -MF ../../build/stereoProcessing.r.d -MT ../../build/stereoProcessing.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/stereoProcessing.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/stereoProcessing.cpp
g++ -c -MMD -MF ../../build/tempAnalysis.r.d -MT ../../build/tempAnalysis.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/lib/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/tempAnalysis.r.o /Users/christian/Downloads/exhale-develop/src/lib/../../src/lib/tempAnalysis.cpp
ar -crs ../../lib/libexhale.a ../../build/bitAllocation.r.o ../../build/bitStreamWriter.r.o ../../build/entropyCoding.r.o ../../build/exhaleEnc.r.o ../../build/exhaleLibPch.r.o ../../build/lappedTransform.r.o ../../build/linearPrediction.r.o ../../build/quantization.r.o ../../build/specAnalysis.r.o ../../build/specGapFilling.r.o ../../build/stereoProcessing.r.o ../../build/tempAnalysis.r.o
/Library/Developer/CommandLineTools/usr/bin/make -C src/app  release MM32=0
g++ -c -MMD -MF ../../build/basicMP4Writer.r.d -MT ../../build/basicMP4Writer.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/app/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/basicMP4Writer.r.o /Users/christian/Downloads/exhale-develop/src/app/../../src/app/basicMP4Writer.cpp
g++ -c -MMD -MF ../../build/basicWavReader.r.d -MT ../../build/basicWavReader.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/app/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/basicWavReader.r.o /Users/christian/Downloads/exhale-develop/src/app/../../src/app/basicWavReader.cpp
g++ -c -MMD -MF ../../build/exhaleApp.r.d -MT ../../build/exhaleApp.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/app/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/exhaleApp.r.o /Users/christian/Downloads/exhale-develop/src/app/../../src/app/exhaleApp.cpp
g++ -c -MMD -MF ../../build/exhaleAppPch.r.d -MT ../../build/exhaleAppPch.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/app/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/exhaleAppPch.r.o /Users/christian/Downloads/exhale-develop/src/app/../../src/app/exhaleAppPch.cpp
g++ -c -MMD -MF ../../build/loudnessEstim.r.d -MT ../../build/loudnessEstim.r.o -fPIC -DMSYS_LINUX -DMSYS_UNIX_LARGEFILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/Users/christian/Downloads/exhale-develop/src/app/../../include -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11  -O3 -Wuninitialized -o ../../build/loudnessEstim.r.o /Users/christian/Downloads/exhale-develop/src/app/../../src/app/loudnessEstim.cpp
g++ -o ../../bin/exhale -Wall   ../../build/basicMP4Writer.r.o ../../build/basicWavReader.r.o ../../build/exhaleApp.r.o ../../build/exhaleAppPch.r.o ../../build/loudnessEstim.r.o -L../../lib -ldl -lpthread -lexhale
make: *** No rule to make target `arm64'.  Stop.

Re: exhale - Open Source USAC encoder

Reply #507
Exhale's instructions is correct only for the platform in use, but perhaps it is better not to complicate the existence too much for new users.
I could add a reference to kode54's instructions above to exhale's Wiki,
Quote
I attach the files necessary to reproduce the error I wrote above.
I'm using foobar2000 on Windows 10 with kode54's decoder, and I cannot see any problem with this file. It decodes without errors and even the differences between the decoded and original waveforms are as expected (given the chosen CVBR mode, I assume it's 5). Update: With my own Windows executable I get exactly the same MPEG-4 file as you, by the way (except for, as usual, the timestamps in the MPEG-4 file header).

Can you clarify under which platform and with which player/converter you decode and what issue you observe exactly?

Another update: I just merged version 1.1.0 to exhale's master branch. The release tag will follow tonight. There's also a legacy branch now with post-1.0.8 maintenance fixes, in case you want/need to stick with the non-SBR release path 1.0.x. Eventually, there will be a final 1.0.9 tag on that branch.

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

Re: exhale - Open Source USAC encoder

Reply #508
Can you clarify under which platform and with which player/converter you decode and what issue you observe exactly?

System:   macOS 11.0.1 (20B29)
Kernel:   Darwin 20.1.0
Name:   Mac mini (M1, 2020)
Model:   Macmini9,1
Chip:   Apple M1

It occurs with the system software, Preview, afplay -q 0 and afplay -q 1 from terminal, and QuickTime player with which I exported the audio file to AAC-LC.

File:           Erik Lund - Summertime15s.m4a
File type ID:   mp4f
Num Tracks:     1
----
Data format:     2 ch,  48000 Hz, 'usac' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
                no channel layout.
estimated duration: 15.000000 sec
audio bytes: 213756
audio packets: 706
restricts random access
count of IPFs: 16
initial IPF: 0
cadence of IPFs: one every 45 packets
count of IFs: 0
maximum roll distance: 44 packets
bit rate: 113538 bits per second
packet size upper bound: 607
maximum packet size: 607
audio data file offset: 3718
optimized
audio 720000 valid frames + 1600 priming + 1344 remainder = 722944
----

Re: exhale - Open Source USAC encoder

Reply #509
Are you able to export to AIFF or ALAC instead of AAC-LC and can you share the resulting file (in case it is written, even partially)?

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


Re: exhale - Open Source USAC encoder

Reply #511
@C.R.Helmrich:
Thanks for your work! The encoder works great and with ease.
Even mode A - though a bit dull - never sounds annoying.
Too bad DAB+ won't benefit from xHE-AAC.

One question though:
Do you take special care to make every entry in the release notes of exhale having nearly the same width?

Re: exhale - Open Source USAC encoder

Reply #512
Intel compiles of exhale-v.1.1.0-c71ec480 now available at Rarewares. :)


Re: exhale - Open Source USAC encoder

Reply #514
Are you able to export to AIFF or ALAC instead of AAC-LC and can you share the resulting file (in case it is written, even partially)?

Chris

This contains ALAC and this is AIFF.

Re: exhale - Open Source USAC encoder

Reply #515
Thanks, celona! Now I understand what you mean. What I can confidently say is that the FDK-AAC decodings sound correct (i.e., as expected), and I'm pretty sure exhale is also operating correctly (i.e., according to the USAC standard). I'll check what can be done about this.

One question though:
Do you take special care to make every entry in the release notes of exhale having nearly the same width?
Yes  O:) It's a habit of mine.

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

Re: exhale - Open Source USAC encoder

Reply #516
@celona:
I am well aware that DRM+ specifies xHE-AAC as mandatory.
But DAB+ doesn't.

Also DRM+ is not well adopted. I just receive a handful of DRM shortwave transmissions in the late evenings. None of them uses xHE-AAC.


Re: exhale - Open Source USAC encoder

Reply #518
Here, have some Universal 2 binaries, yet again. This time, I stripped the release binary. Not sure if the debug one is even debuggable in its signed and hardened runtime state. These should technically also work on as old as 10.9, but I can't test on that. The oldest I can test on is 10.13, and that VM lives in my Linux install, so I'd have to reboot to that just to run that test.

Re: exhale - Open Source USAC encoder

Reply #519
Congrats Chris and thanks for the work you've put into and all contributors.
I guess it's worth mentioning that exhale is available in a few repos.
https://repology.org/project/exhale/versions (FreeBSD just got 1.1.0 committed) :-)

Re: exhale - Open Source USAC encoder

Reply #520
Congratulations for 1.1.0 release and Thank You to Chris and all people who have helped.   :)


Re: exhale - Open Source USAC encoder

Reply #521
@C.R.Helmrich
Could you add 12 kbps/channel mode?

Re: exhale - Open Source USAC encoder

Reply #522
The best option is b which you can get a 48kHz channel at 24kbps. Helmrich has repeatedly written that he doesn't have time to deal with the lower bitrates.

Re: exhale - Open Source USAC encoder

Reply #523
Hey C.R. Helmrich,

Do you happen to know if the USAC / xHE-AAC spec supports multi-track encoding?  As in, shoving multiple tracks into a single output file?  If so, what might it take to have exhale support that?  Just curious.  :)

[edit:  I may have been doing some thing wrong before;  the first time I tried to encode multiple tracks as a single output file I got an error with exhale, but I tried again and it works.  :)  ]

Re: exhale - Open Source USAC encoder

Reply #524
Congratulation!
I've made quick ABX test of SBR, mode c encoding, and I can't distinguish two tracks, so I gave up :) maybe on some more critical tracks I could hear difference, this was type of music I usually listen when commuting, so it's good enough for that.
Error 404; signature server not available.