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 311532 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: exhale - Open Source USAC encoder

Reply #200
88.2 and 96 kHz should work from CVBR mode 5 or 6 upwards, and 24 (or even 32) bits should work in any case. Do you have a short 24-bit WAV file for me which doesn't work, to identify the issue?

I don't have a short sample, the issue seems random because all tracks which failed encoding 24 bit album in batch, encoded with varying result when I encoded them repeatedly to reproduce the fail. The conclusion is clear if you encode album and compare list of failed tracks with failed lists of another runs. It clearly identifies uninitialized data if running same code on same input with same parameters and varying results.

Re: exhale - Open Source USAC encoder

Reply #201
Regarding the Unicode issue, I just added support for Unicode file names in the exhale application when running on Windows (sorry, not on Linux yet). Turns out it was much less work than I thought... assuming, of course, I did it correctly :) The corresponding source code macro is in line 33 in src/app/exhaleApp.cpp:
Code: [Select]
#define EXHALE_APP_WCHAR  (defined (_MSC_VER) || defined (__MINGW32__))
Please let me know if this works when running exhaleApp.exe stand-alone or through foobar2000. If you're building the application with a compiler other than Visual Studio, try appending the corresponding macro (e.g. "|| defined (__INTEL_COMPILER)" to that line and report back if it compiles and runs correctly, so I can complete the list before the next release. And, in case anyone still has a Windows XP installation, please tell me if it works on that version as well. Thanks!

Update (preset 3)...
Thanks, AiZ, for the cross-check. I'm not planning any further changes at CVBR mode 3 for now, so your table will probably stay the same after the next release.

C.R.Helmrich, can you clarify exactly what you are seeing in the fb2k metadata writing that is corrupted, per this note?
...
the files are still playing fine with no issues, at least using kode54's fdk-aac decoder.
You mean the Wiki entry? This used to be an issue a few months back, it seems that, fortunately, with the newer versions of foobar2000 and/or kode54's FDK-AAC based packet decoder, that problem went away. Not sure what happens when kode54's decoder is not installed in foobar2000, though. And, as the on-the-fly resampling and 24-bit (?) issues reported by guruboolez, Anakunda, and others show, there's still something fishy going on.

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


Re: exhale - Open Source USAC encoder

Reply #203
I meant with Linux binaries. Don't now if it works on wine.

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

Re: exhale - Open Source USAC encoder

Reply #204
i dont understand. i "make release" on gitlabs download. no names issue. only win version in wine.

ps. now understanding. :)
it is good to have someone who is more knowledgeable and patient to explain...

Re: exhale - Open Source USAC encoder

Reply #205
Linux binaries should have automatically supported Unicode filenames from the start, as should macOS. Since both platforms use UTF-8 as their default 8 bit encoding, you don't need to do anything special to support it there.

Re: exhale - Open Source USAC encoder

Reply #206
Ah, good to know, didn't know that (I'm a Windows guy and don't use Linux much). Then everything's fine on Linux, I guess, and we can complete the Unicode support for Windows by just extending the EXHALE_APP_WCHAR macro which I mentioned above.

One more thing I noticed: when using exhale for converting to USAC directly during CD ripping, foobar2000 1.5.4 fails just after completing each track rip. Strange. Can anyone confirm this?

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


Re: exhale - Open Source USAC encoder

Reply #208
Hello,

One more thing I noticed: when using exhale for converting to USAC directly during CD ripping, foobar2000 1.5.4 fails just after completing each track rip. Strange. Can anyone confirm this?

Confirmed with v1.5.4.

Code: [Select]
Converting: "cdda://00BF3150" / index: 1
Audio CD extraction setup: drive: "ATAPI - iHBS112   2", sample offset: 6, security: standard
Destination: "F:\DAE\Warren G - Regulate - USAC\01. Warren G, Nate Dogg - Regulate.m4a"
CLI encoder: exhale.exe
Destination file: F:\DAE\Warren G - Regulate - USAC\01. Warren G, Nate Dogg - Regulate.m4a
Encoder stream format: 44100Hz / 2ch / 16bps
Command line: "C:\Program Files\exhale\exhale.exe" 3 "01. Warren G, Nate Dogg - Regulate.m4a"
Working folder: F:\DAE\Warren G - Regulate - USAC\
Encoder process still running, waiting...
Encoder process terminated cleanly.
Object "mdat" at 44560
Media data is truncated, the file may not be playable completely.
Writing tags to encoded file failed: invalid or incomplete data
An error occurred while finalizing the encoding process (invalid or incomplete data) : "F:\DAE\Warren G - Regulate - USAC\01. Warren G, Nate Dogg - Regulate.m4a"
Conversion failed: invalid or incomplete data
Converting: "cdda://00BF3150" / index: 2
Audio CD extraction setup: drive: "ATAPI - iHBS112   2", sample offset: 6, security: standard
Destination: "F:\DAE\Warren G - Regulate - USAC\02. Warren G - Do You See.m4a"
CLI encoder: exhale.exe
Destination file: F:\DAE\Warren G - Regulate - USAC\02. Warren G - Do You See.m4a
Encoder stream format: 44100Hz / 2ch / 16bps
Command line: "C:\Program Files\exhale\exhale.exe" 3 "02. Warren G - Do You See.m4a"
Working folder: F:\DAE\Warren G - Regulate - USAC\
Encoder process still running, waiting...
Encoder process terminated cleanly.
Object "mdat" at 42860
Media data is truncated, the file may not be playable completely.
Writing tags to encoded file failed: invalid or incomplete data
An error occurred while finalizing the encoding process (invalid or incomplete data) : "F:\DAE\Warren G - Regulate - USAC\02. Warren G - Do You See.m4a"
Conversion failed: invalid or incomplete data
Converting: "cdda://00BF3150" / index: 3

etc.

Same behaviour with v1.5.5 beta 1.

    AiZ

Re: exhale - Open Source USAC encoder

Reply #209
Thanks for the detailed report! I think I found the culprit. Please try the newest code from Git. The exhale application assumed 1024 new samples per channel are always available when encoding a new frame, which isn't necessarily the case when ripping from CD (which uses sectors of 588 samples per channel). I tried to re-tune the PCM reading code in exhale accordingly.

Edit: This might actually also fix the on-the-fly downsampling and 24-bit issues. Please check if you may.

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

Re: exhale - Open Source USAC encoder

Reply #210
Works Ok with commit b83a3c48 and foobar v1.5.5 beta 1 for CDDA to USAC

    AiZ

Re: exhale - Open Source USAC encoder

Reply #211
I have downloaded one 24/88.2 file from this site.
- FLAC -> USAC direct conversion with foobar (v1.5.5 beta 1) to 24/88.2 or 24/44.1 is Ok.
- WAV -> USAC conversion, using CLI, at 24/88.2, 24/44.1, 16/88.2 or 16/44.1 is Ok. Seems legit, as all the FLAC to WAV conversions are made with foobar.
But:
- exhale doesn't like WAV files above 16/48 written by ffmpeg (16/88.2, 24/44.1 or 24/88.2).
- exhale doesn't like 24-bit WAV files written by sox.

foobar can read all the WAV files generated above.

    AiZ

Re: exhale - Open Source USAC encoder

Reply #212
to AiZ
are unicode is worked?

Re: exhale - Open Source USAC encoder

Reply #213
Well, seems to...

Code: [Select]
D:\temp\aac\exhale\test>"c:\Program Files\exhale\exhale.exe" 5 .\Ťęşť_ʄīŀė.wav .\┴ǝsʇ‾ɟᴉlǝ˙m4a

  ---------------------------------------------------------------------
 | exhale - ecodis extended high-efficiency and low-complexity encoder |
 |                                                                     |
 | version 1.0.4 (x64, built on Jun 13 2020) - written by C.R.Helmrich |
  ---------------------------------------------------------------------

 Encoding 44-kHz 2-channel 16-bit WAVE to low-complexity xHE-AAC at 128 kbit/s

 Progress: --------------------------------- Done, actual average 139.8 kbit/s

 Input statistics: Mobile loudness -23.68 LUFS, sample peak level -6.17 dBFS

    AiZ

Re: exhale - Open Source USAC encoder

Reply #214
Wonderful, thanks for testing! One more question, though (emphasis mine):
I have downloaded one 24/88.2 file from this site.
- FLAC -> USAC direct conversion with foobar (v1.5.5 beta 1) to 24/88.2 or 24/44.1 is Ok.
Does that mean on-the-fly downsampling while encoding works now with exhale?

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

Re: exhale - Open Source USAC encoder

Reply #215
Since both platforms use UTF-8 as their default 8 bit encoding

There is no encoding used at all. It's just raw bytes.
It's raw bytes, in a specific encoding. The encoding depends on the locale setting used by the OS. For most, this defaults to UTF-8, because there is no point in making the default anything less Unicode compatible these days. Windows is really the only modern OS that uses anything but UTF-8 for its 8 bit strings these days.

Don't give me any crap about "raw bytes", if you want to manipulate these strings in any way, you have to know how they're encoded. It's only by standards that the path separators are ASCII compatible, therefore manipulating UTF-8 strings for path operations doesn't require understanding anything but ASCII. Maybe some other 8 bit encodings mix ASCII alike characters into their multi-byte encoding, but UTF-8 does not.

Re: exhale - Open Source USAC encoder

Reply #216
Hello,

Does that mean on-the-fly downsampling while encoding works now with exhale?
I've tested various combinations on the same (previous) file at 96, 64, 48, 44, 32Khz etc. with the three resamplers installed in my foobar, everything went Ok.
But...  :D

I've downloaded another 24/96 file (the smallest one) to build the table below:

123456
16/1654648194131*
16/22.56779104123172222
16/246779102118157198
16/327588105113130139
16/44.17791109119139151
16/48-90107117137149
16/64--110121141155
16/88.2----197219
16/96----210233
24/1654638194130*
24/22.56779104123171222
24/246779102118157198
24/327588105113130138
24/44.17791109119139151
24/48-90106117137149
24/64--110122141155
24/88.2----197219
24/96----210232
*: ERROR while trying to initialize xHE-AAC encoder: error value 33 was returned!

From preset 3 or 4, there's a problem with 22.5 and 24Khz files. And perhaps with 16Khz ones at preset 5 and above.

Files are encoded with commit 7d9e0db9, I discovered that preset 1 can now encode 44.1 files. Cool!

    AiZ

Re: exhale - Open Source USAC encoder

Reply #217
I've tested various combinations on the same (previous) file at 96, 64, 48, 44, 32Khz etc. with the three resamplers installed in my foobar, everything went Ok.
Awesome, thanks! So I can stop adding automatic downsampling to exhale for now.
Quote
But...  :D
From preset 3 or 4, there's a problem with 22.5 and 24Khz files. And perhaps with 16Khz ones at preset 5 and above.
Good catch, that should be fixed with the latest version. Could you try the 16-44.1 kHz configurations again for verification, please?
Quote
Files are encoded with commit 7d9e0db9, I discovered that preset 1 can now encode 44.1 files. Cool!
Another good catch ;) But keep in mind that, at such a low target bit-rate and without SBR support, strong compromises had to be made (only 14.5 kHz audio bandwidth, and audible spectral holes on some samples). So 44.1 kHz probably doesn't sound better than 32 kHz on average, actually, it may sometimes sound worse.

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

Re: exhale - Open Source USAC encoder

Reply #218
Updated with commit 28ba11cf

123456
16/1654638189112*
16/22.56779104115145168
16/246779102112136153
16/327588105113130139
16/44.17591109119139151
16/48-90107117137149
16/64--110121141155
16/88.2----197219
16/96----210233
24/1654638189112*
24/22.56779104115145167
24/246779102112135153
24/327588105113130138
24/44.17591109119139151
24/48-90106117137149
24/64--110122141155
24/88.2----197219
24/96----210232
*: ERROR while trying to initialize xHE-AAC encoder: error value 33 was returned!

    AiZ

 

Re: exhale - Open Source USAC encoder

Reply #219
Confirmed problem with exhale vs foobar2000 using exhale git from a few days ago, fixed in latest exhale. Can you please correct the wiki entry, since it's not a foobar2000 problem? Thanks.

I'll look into making exhale supported out of the box in near future so no manual settings are needed.
Microsoft Windows: We can't script here, this is bat country.


Re: exhale - Open Source USAC encoder

Reply #221
I wonder how long it would take ffmpeg to support xHE-AAC decoding.  Someting to do with license and legal considerations.


Re: exhale - Open Source USAC encoder

Reply #223
A beta version of exhale 1.0.5 has been released today, see
https://gitlab.com/ecodis/exhale

exhale 1.0.5 - Change Log
- slightly reduced bit-rates with lower modes, better compatibility when using stdin
- exhaleApp: support for Unicode text on Windows™, 44100 Hz with CVBR mode 1
- exhaleApp: automatic upsampling of low-sample-rate input*, better WAVE reading
- exhaleLib: optimized noise filling tool for slightly lower bit-rates at CVBR mode <4

There's also a new version 1.12 of kode54's FDK-AAC packet decoder available here.

Note that using an input sampling rate of 44.1 kHz at CVBR mode 1 might not actually sound better than using 32 kHz input, but I found it to sound acceptable at both sampling rates (although I'd recommend to use CVBR mode 2 or 3 instead, unless you really have to restrict yourself to ~64 kbit/s stereo or ~32 kbit/s mono on average). Note, also, that the functionality marked with a * above is not finished yet but will, hopefully, make it into the final version, due at the end of the month. That will circumvent the "error 33" issue reported by AiZ here in the unlikely case when exhale is used to encode sampling rates lower than 32 kHz with high CVBR modes.

Support for Unicode can be checked by running the Windows executable as "exhale.exe -V". If supported, the output string contains the word "Unicode".

And finally, I also managed to speed up the encoder by roughly 10% at the lower CVBR modes, and even more than that when encoding 32-kHz content.

Quote from: Peter
Can you please correct the wiki entry, since it's not a foobar2000 problem? Thanks. I'll look into making exhale supported out of the box in near future so no manual settings are needed.
Done. Thanks very much, built-in configuration via foobar2000's GUI would be great!

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