Opened 20 months ago

Last modified 8 months ago

#11215 open defect

AAC USAC Mps212 support

Reported by: Artem S. Tashkinov Owned by: dev@lynne.ee
Priority: normal Component: avcodec
Version: git-master Keywords: xHE-AAC
Cc: alexanderino Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description (last modified by Artem S. Tashkinov)

Here's a live xHE-AAC radio station:

https://www.maxradio.ca/UHD/MaxRadio/48k/Max.m3u8

It actually worked with ffmpeg 6.1.2 albeit audio quality was horrible.

ffmpeg 7.1 just bails out:

Error decoding audio.
[ffmpeg/audio] aac: AAC USAC Mps212 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.

ffmpeg 7.1 also fails to mux it:

Input #0, hls, from 'https://www.maxradio.ca/UHD/MaxRadio/48k/Max.m3u8':
  Duration: N/A, start: 4164154.700045, bitrate: 48 kb/s
  Program 0 
    Metadata:
      variant_bitrate : 0
  Stream #0:0(und): Audio: aac (xHE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 48 kb/s (default)
      Metadata:
        variant_bitrate : 0
        compatible_brands: isomiso6hlsfmp42
        handler_name    : StreamS Encoder
        vendor_id       : [0][0][0][0]
        major_brand     : mp42
        minor_version   : 0
        creation_time   : 2024-08-13T07:32:00.000000Z
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
[adts @ 0x11498300] MPEG-4 AOT 42 is not allowed in ADTS
[out#0/mpegts @ 0x1076a9c0] Could not write header (incorrect codec parameters ?): Invalid data found when processing input
Conversion failed!


ERROR: ffmpeg exited with code 183

A few more xHE-AAC streams: https://www.hiresaudio.online/max-radio-society/

Assigning to Lynne if that's OK. :-)

Change History (11)

comment:1 by Artem S. Tashkinov, 20 months ago

Summary: xHE-AAC support is incompletexHE-AAC support is incomplete: AAC USAC Mps212 is not implemented

comment:2 by Artem S. Tashkinov, 20 months ago

Owner: set to dev@lynne.ee
Status: newopen

comment:3 by Artem S. Tashkinov, 20 months ago

Description: modified (diff)

comment:4 by Artem S. Tashkinov, 20 months ago

Description: modified (diff)

comment:5 by Lynne, 20 months ago

Analyzed by developer: set
Priority: importantnormal
Reproduced by developer: set

Mps212 is MPEG-H surround, not xHE-AAC. It's not part of the base spec.

Not really a priority right now.

The MPEG-H spec is a different dimension of cursed.

comment:6 by Artem S. Tashkinov, 20 months ago

Got it, but then why ffmpeg 6.1.2 is able to decode this stream while ffmpeg 7.1 fails?

Looks like an unintended regression to me :-)

comment:7 by Lynne, 20 months ago

It was a coincidence. xHE-AAC uses the same scalefactor coding as regular AAC, which could be mistaken by a very robust AAC decoder as valid, and result in a semi-horrible sounding output, as the per-band volume levels would be similar.

Decoding codecs with clearly incompatible decoders is not and has not been supported.

comment:8 by Artem S. Tashkinov, 20 months ago

Summary: xHE-AAC support is incomplete: AAC USAC Mps212 is not implementedAAC USAC Mps212 support

comment:9 by alexanderino, 8 months ago

Cc: alexanderino added

Hi all,

the latest ffmpeg master [2025-09-07] fails spectacularly when attempting to decode a USAC + SBR + PS file. Please check this pastebin log (skipping is enabled, and this log is much shorter than the one when no skipping is performed): https://pastebin.com/vDc6bVKN

It's worth noting that music players using ffmpeg to decode USAC files find it impossible to play them without flaws.

Please let me know if anything is required.

Regards,

alexanderino

in reply to:  9 ; comment:10 by Artem S. Tashkinov, 8 months ago

Replying to alexanderino:

Please let me know if anything is required.

Patches or funding :-)

in reply to:  10 comment:11 by alexanderino, 8 months ago

Replying to Artem S. Tashkinov:

Patches or funding :-)

*cries*

Note: See TracTickets for help on using tickets.