Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the “libxaac” project #58

Open
jiangzemin-xudamin opened this issue Jan 31, 2025 · 4 comments
Open

About the “libxaac” project #58

jiangzemin-xudamin opened this issue Jan 31, 2025 · 4 comments

Comments

@jiangzemin-xudamin
Copy link

Hey, Martin,
I recently noticed a project called “libxaac” on GitHub, I wonder if it could be a better alternative to “exhale”?
https://github.com/ittiam-systems/libxaac

@MartinEesmaa
Copy link
Owner

MartinEesmaa commented Feb 10, 2025

Hey, @jiangzemin-xudamin! It is good to see you back there after questions by issuing. :)

I tried using libxaac which is good alternative license to fdk-aac non-free license.
However, the problem is only for xHE-AAC does not support AAC ADTS output which I can't decode probably.

xaacenc -ifile:sine_2ch.wav -ofile:sine_2ch_aot_4112.es -adts:1 -br:64000
 -aot:42
-ifile:sine_2ch.wav -ofile:sine_2ch_aot_4112.es -adts:1 -br:64000 -aot:42
Stream bit rate = 64000

 loudness level : -6.761214
 sample_peak_level : -1.938333
                       ITTIAM SYSTEMS PVT LTD, BANGALORE
                             http:\\www.ittiam.com
                                IXHEAACE : V2.0


************************************************************************************************

Parameters Taken:

AOT : 42 - USAC
USAC Codec Mode : Not Enabled
Harmonic SBR : 0
High quality esbr : 0
Complex Prediction Flag : 0
TNS Flag : 1
Core-coder framelength index (Unsupported configuration, enabling 2:1 eSBR) : 3
Noise Filling Flag : 0
Use ADTS Flag (Invalid config value, setting to default) : 0
Use TNS Flag : 1
Bitrate : 64000 bps
Frame Length : 1024
Sampling Frequency : 48000 Hz
************************************************************************************************

Frames Processed [232]

I tried set flag of ADTS from 0 to 1 when encoding USAC and refuses which encodes to raw audio file encoded lossy without ADTS/MP4 mux.

Tried decode (first error):

xaacdec -ifile:sine_2ch_aot_4112.es -ofile:sine_2ch_aot_4112.ts3
-ifile:sine_2ch_aot_4112.es -ofile:sine_2ch_aot_4112.ts3
                       ITTIAM SYSTEMS PVT LTD, BANGALORE
                             http:\\www.ittiam.com
                         IA_XHEAAC_DEC_MSVC Rev: 1.41

Channel Mode: NONE_OF_THESE or MULTICHANNEL
SBR Mode: NOT_PRESENT
Channel Mode: NONE_OF_THESE or MULTICHANNEL
SBR Mode: NOT_PRESENT
Channel Mode: NONE_OF_THESE or MULTICHANNEL
SBR Mode: NOT_PRESENT
Channel Mode: NONE_OF_THESE or MULTICHANNEL
SBR Mode: NOT_PRESENT
non fatal error: Ittiam xheaac_dec: Execution: : LTP data found, not supported
fatal error: Ittiam xheaac_dec: Initialization: : No. of channels in stream greater than max channels defined

So I can't decode raw audio frame except ADTS flag works for AAC LC container... I will try to figure out to decode raw audio frames of .ES file.

UPDATE: I think I finally got it to decode:

xaacdec -ifile:sine_2ch_aot_223.es -imeta:sine_2ch_aot_223.txt -mp4:1 -ofile:sine_2ch_aot_21.wav

Log:

xaacdec -ifile:sine_2ch_aot_223.es -imeta:sine_2ch_aot_223.txt -mp4:1 -ofile:sine_2ch_aot_21.wav
-ifile:sine_2ch_aot_223.es -imeta:sine_2ch_aot_223.txt -mp4:1 -ofile:sine_2ch_aot_21.wav
                       ITTIAM SYSTEMS PVT LTD, BANGALORE
                             http:\\www.ittiam.com
                         IA_XHEAAC_DEC_MSVC Rev: 1.41

Channel Mode: NONE_OF_THESE or MULTICHANNEL
SBR Mode: NOT_PRESENT
Channel Mode: NONE_OF_THESE or MULTICHANNEL
SBR Mode: NOT_PRESENT
Channel Mode: NONE_OF_THESE or MULTICHANNEL
SBR Mode: NOT_PRESENT
Channel Mode: NONE_OF_THESE or MULTICHANNEL
SBR Mode: NOT_PRESENT
Channel Mode: NONE_OF_THESE or MULTICHANNEL
SBR Mode: UPSAMPLING FACTOR 2 or 8/3
TOTAL FRAMES : [  234]
Channel Mode: NONE_OF_THESE or MULTICHANNEL
SBR Mode: NOT_PRESENT

It requires metadata file of text and mp4 flag to decode from USAC to WAV file. I tested and it worked, but it sounded buffer weird glitches.

  • Martin Eesmaa

@jiangzemin-xudamin
Copy link
Author

jiangzemin-xudamin commented Feb 11, 2025

@MartinEesmaa ! I'm glad you're returning to your project and thank you for helping me test the usability of libxaac.

However, the problem is only for xHE-AAC does not support AAC ADTS output which I can't decode probably.

So, I wonder if it is theoretically possible to modify the MPV player to support AAC ADTS?

@jiangzemin-xudamin
Copy link
Author

It requires metadata file of text and mp4 flag to decode from USAC to WAV file. I tested and it worked, but it sounded buffer weird glitches.

It's a shame, probably it will still take some time before it becomes a full-fledged audio codec, looking forward to its merger with FFMPEG!

@jiangzemin-xudamin
Copy link
Author

I was wondering if you can send the compiled libxaac binaries to your vvceasy project? Just like the previous UVG266 binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants