March 2025 Update causes first second of audio to be skipped

I did try the files from thechrisgregory on 21.1 on my 4k+ if that helps… same errors

2025-04-25 10:42:58.210 T:3053 debug : ffmpeg[0xb1ce5a30]: [NULL] invalid sample size code (3)
2025-04-25 10:42:58.210 T:3053 debug : ffmpeg[0xb1ce5a30]: [NULL] sample/frame number invalid; utf8 fscked
2025-04-25 10:42:58.210 T:3053 debug : ffmpeg[0xb1ce5a30]: [NULL] sample/frame number mismatch in adjacent frames
2025-04-25 10:42:58.303 T:3053 debug : Skipped 5 duplicate messages…
2025-04-25 10:42:58.303 T:3053 debug : ffmpeg[0xb1ce5a30]: [NULL] header crc mismatch
2025-04-25 10:42:58.303 T:3053 debug : ffmpeg[0xb1ce5a30]: [NULL] sample/frame number mismatch in adjacent frames
2025-04-25 10:42:58.334 T:3053 debug : Skipped 2 duplicate messages…
2025-04-25 10:42:58.334 T:3053 debug : ffmpeg[0xb1ce5a30]: [NULL] header crc mismatch
2025-04-25 10:42:58.334 T:3053 debug : ffmpeg[0xb1ce5a30]: [NULL] sample/frame number mismatch in adjacent frames
2025

Here are the logs https://paste.osmc.tv/ebiwotebem

1 Like

OK, I’ve done some digging. I have the Led Zep tracks Chris posted (24-bit, 96kHz, stereo, libflac 1.3.0) and a couple of Elton John tracks that I think @chillbo came up with a while back (24-bit, 44.1kHz, 4-channel, libflac 1.3.1). AFIACT all my other flacs and mp3s play OK.

  • Current release: Led Zep and Elton have the problem.
  • October release: Only Led Zep has the problem
  • May 2024 release (I couldn’t get SSH to work on the August release): Only Led Zep has the problem.

So it looks like it goes way back but could be affecting more titles now which is why it’s only just surfaced.

Could people confirm exactly which files are being tested, or at least post mediainfo?

And thanks to @JimKnopf - he spotted that setting Output configuration to Fixed works around the issue. Here, any fixed samplerate seems to work, not just the samplerate of the clip.

1 Like

I converted a 44100/16 FLAC album to WavPack to see if there was any differences.
I played both the WavPack and FLAC files on my 4K+ 21.1 and my V 21.2 Staging boxes.

I still get the “sample/frame” and “broken stream, invalid padding” messages on both systems using FLAC, but not the “header crc mismatch” I got with the 24/96000 files.

I can hear the first notes on these files, as well as the 24/96000 files on my systems.
The original problems of “invalid sync codes” on vanilla March 2023 systems is not present on 21.1 or staging 21.2.

4K+ 21.1 logs - https://paste.osmc.tv/zopeniwoji

V 21.2 staging - https://paste.osmc.tv/soxahikoge

Test Files with MediaInfo - Test Files

I’m going to do the same tests with the 24/96000 files, as well as some of my own 24/96000 just to see if the “header crc mismatch” only appears on these type of files.

I tested WV and FLAC 24/96000 and 16/88200 files on both 21.1 and 21.2

Both FLAC files showed all of the above error messages from FFMPEG, including the “header crc mismatch” error.

On Vero V, 21.2 staging, the 16/88200 file skipped a second of audio after playing for a few seconds.
I played it again, and it played thru the second time.
Still a problem with FLAC it seems…

4K+ logs - https://paste.osmc.tv/odugihaluf

V logs - https://paste.osmc.tv/mamurilaba

Test 24/96000 file - Test 24-96

Test 16/88200 file - Test 16-88

Can you clarify? I can’t hear the first (two) notes on Inside flac on the March release on V. Upgraded to staging and still can’t hear the first notes. First notes are audible on the October release.

With that one, audio doesn’t start until 2 seconds in - ie there’s a silence at the beginning. Here on the October release it played at the wrong speed (fast) with some corruption the first time but OK when I restarted it.

grahamh

October 2024 Release I can hear the first notes.
March 2025 release I couldn’t hear the first notes.
Staging upgrade I could hear the first notes again.

The only difference I saw in logs was the “invalid sync codes” were gone in Staging.

thechrisgregory supplied some Led Zeppelin 24/96000 to test, where he could not hear the first notes.

On my Vero V with staging, I could hear the first notes on all but “Communication Breakdown”, where it seemed the very first note seemed cut off.

FFMPEG still spits out all the error messages, but still plays the file, even allowing me to hear the first notes on all of his files but that one.

The problem I just had with a 16/88200 file was after playing a few seconds, the sound cut out completely, then resumed.
Trying the same song again played thru no problem.

I have been doing all of my recent tests using SMB, but the original March non-staging problems even occurred on LOCAL files.

grahamh

As far as “Inside” song, I CAN hear the first notes on staging. Not on original March 2025.

Unless our staging releases are a little different… I’m guessing staging changes daily…

I don’t have Communication Breakdown. It’s odd that you get a difference on staging but I don’t. There’s no update to either Kodi or kernel in the staging repo afaict. Staging has changed only once I think since the release.

grahamh

Are you playing local files?
Possibly the delay of reading from SMB allows me to hear the first notes?
Just guessing here…

The V with staging update is playing from USB. You might have a point :stuck_out_tongue:

The V on October release is playing through WiFi. But it’s missing the first notes on all 3 Led Zep tracks I have.

grahamh

thechrisgregory originally sent me a link in a PM to the full Led Zeppelin 24/96000 album.
“Communication Breakdown” was from that link.
That song starts at 0.040 into the file.
I have a CD version that starts at 0.640
I can hear what sound like half the first note on the HD file.

“Trip to the Fair” 16/88200 has silence at the beginning. But it cut out after playing for a few seconds on the Vero V staging release.

Wait! After upgrading I’m still on kernel 80. You are on 81. Let me check again.

Now it’s installing 82 - staging is indeed getting some love atm.

My Vero V is playing “Fixed - 48000” thru HDMI to my AVR.
March 2025 non-staging still skipped the first second.
Only on staging can I hear the beginning of songs.
Direct to USB-DAC or Fixed-48000 didn’t make any difference in my testing.

Now we’re nearly on the same page. On the latest staging - kernel 82, kodi compiled 2025-04-27, files on USB disk, Best match, everything plays properly except Led Zep.

Fixed-48k everything plays properly, including Led Zep tracks 1-3.

grahamh

Let me know how it goes…
I might have to bump up to kernel 82, because… you know.

One of my earlier work-arounds was to point Kodi to my OGG library… at least it worked.

I’m considering making a WavPack library. My tests today with WavPack showed NO problems.

Of course, FFMPEG/PAPlayer correctly decoding FLAC is optimum…

I expect you will be be bumped shortly by a new release anyway. As soon as the thumbnail issue is fixed.

grahamh

I expect you will be be bumped shortly by a new release anyway. As soon as the thumbnail issue is fixed.

Hopefully with some FLAC love, as well… :wink:

1 Like

Status: with the version of Kodi now in staging, and with considerable help from users, especially @JimMinch and @thechrisgregory we believe we have restored the behaviour to what it was before the March upgrade. The problem was a side-effect of a change we made to fix a problem in video playback.

All music files should play properly with the sole exception of the album Chris shared (Led Zeppelin 1 remastered in 24/96k). It’s possible the issue applies to other files from the same source (Tidal) in flac format. This exception applies to both Vero V and Vero 4k/4k+ and, I have to say, also to a well-known fork of LibreElec running on a cheap Amlogic Kodi box. We’ll continue to hunt down the cause but most users should be unaffected. Meanwhile, setting audio output to Fixed for these files works around the issue.

I’d appreciate it if you could test this and provide feedback on what works and what doesn’t. To test this update:

  1. Login via the command line
  2. Run the following command to add the staging repository:
    echo 'deb http://apt.osmc.tv bullseye-devel main' | sudo tee /etc/apt/sources.list.d/osmc-devel.list
  3. Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
  4. Your system should have have received the update.

Please see if the issue is resolved.

I also recommend you remove /etc/apt/sources.list.d/osmc-devel.list after updating.

This will deactivate the staging repository. You can do so with the following command:
sudo rm /etc/apt/sources.list.d/osmc-devel.list.

Please note that we will automatically disable this update channel after 14 days on your device in case you forget to do so to ensure that your system reverts to the stable update channel.

grahamh, sam_nazarko, thechrisgregory, JimKnopf

Thanks to all, and anyone I forgot.
I have upgraded my 4K+ and V to the latest staging.
All music plays, all notes !!
Even the 24/96 Led Zeppelin.
Direct to USB DAC, no fixed 48000.

I have already switched the Vero V to my primary device.
I know there is a final 4K+ release coming… both devices are back to stable update channels.
Any other testing you might need from me, let me know !!

Jim

Ah yes! To a USB DAC it plays perfectly. The plot thickens :thinking: