[RPi5] AC3 transcoding broken since nightly-20260329 — IEC958 AES3 byte regression (FFmpeg 8.1?) Body:

  • AC3 transcoding of AAC 5.1, Opus 5.1 and EAC3 5.1 produces complete silence on RPi5 starting with nightly-20260329. Native AC3 and DTS passthrough are unaffected.

    Bisection

    ✅ nightly-20260327-ff72cfe — working

    ❌ nightly-20260329-14b0c24 — broken

    ❌ nightly-20260330-2bbb06d — broken

    ❌ nightly-20260401-9f66601 — broken


    Root cause

    The IEC958 AES3 channel status byte is set incorrectly when opening the HDMI sink for AC3 transcoded output.

    Working build (20260327):

    CAESinkALSA::Initialize - Opened device "hdmi:CARD=vc4hdmi0,DEV=0,AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x02"

    CAEEncoderFFmpeg::Initialize - AC3 encoder ready

    Broken build (20260329+):

    CAESinkALSA::Initialize - Opened device "hdmi:CARD=vc4hdmi0,DEV=0,AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x0e"

    CAEEncoderFFmpeg::Initialize - AC3 encoder ready

    AES3=0x0e is not a valid IEC958 sample rate code for AC3. The sink cannot lock, resulting in continuous ~1000ms audio sync errors and silence. The encoder itself initializes fine — the problem is purely the AES3 byte passed to the ALSA sink.

    Suspected cause

    FFmpeg 8.1 was integrated around nightly-20260329. This likely changed IEC958 channel status byte handling in the AC3 encoder or ALSA sink initialization path. The passthrough path is unaffected as it sets AES3=0x02 correctly in both builds.

    Setup

    RPi5, LibreELEC 13.0 nightlies

    Audio: HDMI → HDMI switch with optical out → receiver

    Kodi settings: channels 2.0, passthrough ON, AC3 transcoding ON, Dolby capable receiver ON

    Workaround

    Roll back to nightly-20260327-ff72cfe.

    Previously reported and fixed back in 2021:

    HiassofT  chewitt

    Thanks

  • Hi. I don't know what's happening.

    I did what I used to do when reporting. Enabled verbose logging on Kodi. Then went to settings, Libreelec and asked to upload latest Kodi crash log and configs and view the short url. I did even enable persistent log this time.

    Just to describe what's really happening here. I played two titles both with AV1. But with different audio codecs Opus and EAC3.. I have sound playing real ac3 and DTS files

    I got no sound on both files played. I went to the url generated and didn't see any crashes again. This is a relatively new install.

    Here's the log generated:

    https://paste.libreelec.tv/genuine-cub.log

    Please, let me know if there's something else missed by me.

    I will gladly help. During this whole Piers development this is the very first time I have encountered an issue

    Thanks

  • After enabling debug logging you need to reboot, then reproduce the issue, then upload the crash log - the journal in your log didn't show any signs of a kodi crash.

    Verify the uploaded crash log and be sure it contains the kodi log at the beginning - sometimes creating a crash log can fail if it gets too large.

    so long,

    Hias

  • Still nothing kodi related in your paste, but I noticed you are running piracy crap. You are in violation of our forum rules so support ends here.

    so long,

    Hias

  • 2026-04-02 14:31:03.180 T:1205 info <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=vc4hdmi0,DEV=0"

    2026-04-02 14:31:03.181 T:1205 info <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=vc4hdmi0,DEV=0,AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x0e"

    2026-04-02 14:31:03.182 T:1204 warning <general>: CAEEncoderFFmpeg::Initialize - EAC3 encoder not available, falling back to AC3

    2026-04-02 14:31:03.182 T:1204 info <general>: CAEEncoderFFmpeg::Initialize - AC3 encoder ready

    ... (then the flood of sync errors starts)

    2026-04-02 14:31:05.333 T:1204 warning <general>: ActiveAE - large audio sync error: -1077.993643

    2026-04-02 14:31:05.433 T:1204 warning <general>: ActiveAE - large audio sync error: -1173.965773

    ... (continues with errors around -1045 to -1461 ms)


    This isn't being captured by the logs uploaded by the Libreelec.

    I strip this myself watching the Kodi log being written

    Edited once, last by hbbs: Merged a post created by hbbs into this post. (April 2, 2026 at 6:39 PM).