pi4 - headphone audio cracking/clipping on certain video steams

  • Hi all,

    When using the built-in 3.5mm headphone output on the Raspberry Pi 4, I am experiencing audible crackling, popping, and clipping during playback of certain video streams.

    The issue is most noticeable when playing Live TV streams from a TVHeadend server. I have provided a sample .ts recording that can be used for testing:

    Weekend Today.ts

    Weekend Today-1.ts

    This has been a long-standing issue on the current stable LibreELEC release when using the onboard headphone audio output. I recently upgraded to the latest nightly builds in the hope that the problem had been resolved; however, the issue still persists and, if anything, appears to be more pronounced.

    I am posting this in the hope that the issue can be investigated and addressed before the next stable release.

    For troubleshooting, I have tested the following:

    • Setting audio_pwm_mode=1 and audio_pwm_mode=2 – neither setting made any significant difference.
    • Changing audio output configuration between Optimized, Fixed, and Best Match – no noticeable improvement was observed.

    Any assistance, testing, or guidance would be greatly appreciated.

    Thank you.

    Edited 2 times, last by Loggio (June 6, 2026 at 10:50 PM).

  • Hi, "using the built-in 3.5mm headphone output on the Raspberry Pi" for video streams isn't the best combination. Some times ago I struggled with that, till I bought an RPi compatible audio DAC module. I don't exclude the possibility, in the future a solution for that, but low chance. The fast solution could be to buy an RPi audio DAC hat or an HDMI audio extractor module. Or if you have any USB-audio dongle around, you could try it too.

  • I understand using a DAC or USB adapter yields better results. I have plenty of these, they're chunky add-ons that can't be used if you house your pi in a case and I don't feel that's a fix to the problem, rather a bandaid solution.

    It seems to be only certain audio streams that cause it so im hopeful maybe a codec or fw/driver or ALSA issue. Outside of my expertise though.

    Edited once, last by Loggio (June 7, 2026 at 5:12 PM).

  • If I know well, that jack output isn't a "real" audio output. It's one of the GPIO of the processor, used with software PWM and a bare bone RC filter to work as an audio output. And probably that is the reason why sometimes isn't synchronized perfectly with the video screen. That is working in this way for many years. If you wait for a fix for this, or switch to something else, with better sound quality, it's up to you only.