March 2025 Update causes first second of audio to be skipped

After updating Vero V to March 2025 release, the first second of audio gets skipped when playing music. This originally happened on my Vero 4K+. I ordered a new Vero V, and the same problem happens on the new device. I am playing FLAC files.

I reinstalled November 2024 release on the Vero V, and music plays normally.
I created 2 debug logs.
The first is the November 2024 where music plays correctly… https://paste.osmc.tv/odeqawivan.xml

Then I updated again to March 2025, and created a new debug log, where the first second of audio gets skipped…
https://paste.osmc.tv/edogategew.xml

Looking at other support topics, there was a similar report about MP3 files, but no resolution. I DID try keep alive, fixed 48k bitrate, and different audio outputs (HDMI, Analog, USB DAC (my default). All have the same symptoms.

I will try using OGG and MP3, although I would prefer to stick with FLAC.
Thanks for an otherwise great product !!
Jim

I tried March update with both OGG and MP3 and they worked.
It seems the problem is only with FLAC files.
I have yet to find a FLAC file that works correctly…

Further testing…
I re-created some FLAC files using the latest versions of FFMPEG and FLAC command line. Original and new files work fine with every other player I try.
New versions also have invalid sync code errors from “ffmpegdirect” in Kodi.
Only in the March 2025 version of software.

I am now using an OGG copy of my library in Kodi…

2 Likes

I copied some FLAC files to the Vero V local storage.
I removed all SMB sources from the Vero.
I recreated the Music library using only the local files.
First second of audio still skipped.

The relevant and significant difference I see in the second of your log files (as you have already stated), are errors thrown out by ffmpeg (invalid sync code, frame header, resulting in a decode frame failure) as it reads the input file file for playback (to convert to PCM) - this happens at the very beginning of the file being played back.

2025-04-17 17:36:01.269 T:3263    error <general>: ffmpeg[0xb0d4c850]: [flac] invalid sync code
2025-04-17 17:36:01.269 T:3263    error <general>: ffmpeg[0xb0d4c850]: [flac] invalid frame header
2025-04-17 17:36:01.269 T:3263    error <general>: ffmpeg[0xb0d4c850]: [flac] decode_frame() failed

Have a look at this post: Freeze when playing large FLAC file, it might be worth installing autofs to improve the reliability of your disk data transfers (Mounting network shares with autofs (alternative to fstab))

What sort of setup do you have for accessing the audio files from disk, is this rate limited in anyway ?

Have you tried copying one of the FLAC files over to Vero-V local storage and playing from there. Do the same playback errors occur ?

Does the same problem occur with gapless playback of multiple FLAC files (in the same folder) ?

I appreciate that this was not a problem with the earlier version of the Vero-V software, however the version of Kodi (the media player) is now different (V21.2) and this may have introduced some regression, which my be potetially be overcome by the suggestions above.

Hi, Thanks for looking into this…

I currently use smb to access my files, and scan the files on Windows.
I DO use autofs for my backup drive. I could try autofs for the media, but I think my scans would have to be performed by the Vero.

I did place some flac files on local storage, and turn off SQL shared library. I scanned the files to the local database, but still had the same lost second of music at the beginning.

I am currently back to using the October 2024 version of OSMC, but I still have my 4k+ on October 2024. I can, if it will help, upgrade the Vero V to March again, and redo the test of local files with debug turned on.

Every FLAC file I have tried reports the same problem. I have rebuilt the FLAC files using the latest FFMPEG and the latest Command Line FLAC tools. I know the files are good, but the version of FFMPEG reading the files is reporting errors.

I’ll recreate a new debug log with local files, and report back…
Jim

Depending on the outcome of your tests I think it would be well worth creating and submitting a bug report upstream to the Kodi GITHub (GitHub · Where software is built) this sort of problem has been fixed before, and this looks like regression to me.

I would probably check with @sam_nazarko first, as there may be other submissions from the OSMC side of things to the Kodi developers.

At the very least it would help to understand those ffmpeg errors, better, and their precise cause.

Chris.

Here is the latest test, FLAC file on local storage, same results…

https://paste.osmc.tv/ogigemirim.xml

1 Like

I did try autofs for my media files, with path substitution. I’m able to access the files from Windows and Vero. Still the same problem I have with local files, and direct SMB access.

I’ll see if @sam_nazarko adds anything, otherwise I will post to Kodi GITHub.

I am going to try installing Kodi 21.2 on Windows to see if the problem also occurs there, but I’m thinking the FFMPEG stuff might be different…

Kodi 21.2 on Windows plays FLAC files normally.
My only other Kodi boxes are Vero 4K+ and Vero V.
Both have the same problems with the March 2025 21.2 update.
I’ll leave the Vero V on the latest update for further testing.
I’ll continue to use the 4K+ for daily use, running 21.1

Also, per your earlier question, playing a full album, each song skips at the beginning, so gapless playing is gone…

Hi

The problem with Windows and Linux is the audio sink is quite different.
Thanks for verifying that playing from local storage also exhibits an issue.

As it’s a new issue (i.e. not present in Nov 24), we need to think.

I cannot think of any kernel changes that could cause this.

Thanks Sam,

I also created a “playercorefactory.xml” and tried playing “FLAC” files with VideoPlayer.
FLAC plays fine there, but I must leave the TV on while playing music.

PAPlayer and FFMPEG seems to be causing the problem.

That was going to be one of my suggestions after some brief investigation.
I’ll have a look at changes to paplayer shortly.

@grahamh I’m wondering if invocation of videoplayer causes (or possibly doesn’t) cause a videomode change? That is if we are to assume it’s a kernel based change.

Thought about this a little more, here’s a possibility -

Given that ffmpeg is throwing errors about its input at the beginning of the file, this could well be related to the size of the meta data field used to store the cover artwork. This can get quite big for some FLAC files. This might well be upsetting the particular version of ffmpeg called up by PAplayer in Kodi. I know that ‘oversized’ ( ~>4Kb ) artwork meta data in FLAC files gives windows explorer a problem in displaying other fields from the FLAC file.

As another test, I’d suggest removing the artwork from these FLAC files (using a meta data editor like MP3TAG on Windows), and see if the problem goes away.

Perhaps @JimMinch can you provide some of the FLAC files you are working with, I’ll do a quick check on my setup (Vero-V March 2025) ?

Chris.

I never embed artwork in my music files. Except MP3 for my car player.

I saw on an old Kodi post about possibly metadata padding causing a problem.
I currently use 4096 default padding (FLAC documentation mentions 8192, but that is wrong). I was going to try creating a file with no padding just to test.

The old Kodi post was many versions ago, and was supposedly fixed. I’ll have to check, but I think it WAS an FFMPEG error. I’ll see if I can find that again. “DavidBlake”, who is the main Kodi Music maintainer, was involved in the discussion.

The local files I tested with had all but basic metadata stripped (artist, album, track, title, genre). I’ll see about uploading a couple files somewhere you can access to test with.

Stripped down FLAC padding fails as well.

“C:\bin\snd\flac-1.5.0\metaflac.exe” --list “D:\Temp\Ocean Sounds\01-Inside.flac”
METADATA block #0
type: 0 (STREAMINFO)
is last: false
length: 34
minimum blocksize: 4096 samples
maximum blocksize: 4096 samples
minimum framesize: 1259 bytes
maximum framesize: 13268 bytes
sample_rate: 44100 Hz
channels: 2
bits-per-sample: 16
total samples: 9275700
MD5 signature: 46f115120562c9abe84f3e36f7afb3f8
METADATA block #1
type: 3 (SEEKTABLE)
is last: false
length: 396
seek points: 22
point 0: sample_number=0, stream_offset=0, frame_samples=4096
point 1: sample_number=438272, stream_offset=476198, frame_samples=4096
point 2: sample_number=880640, stream_offset=1049587, frame_samples=4096
point 3: sample_number=1318912, stream_offset=1786484, frame_samples=4096
point 4: sample_number=1761280, stream_offset=2523801, frame_samples=4096
point 5: sample_number=2203648, stream_offset=3338058, frame_samples=4096
point 6: sample_number=2641920, stream_offset=4208348, frame_samples=4096
point 7: sample_number=3084288, stream_offset=5153855, frame_samples=4096
point 8: sample_number=3526656, stream_offset=6086901, frame_samples=4096
point 9: sample_number=3964928, stream_offset=7047858, frame_samples=4096
point 10: sample_number=4407296, stream_offset=8102165, frame_samples=4096
point 11: sample_number=4849664, stream_offset=9182868, frame_samples=4096
point 12: sample_number=5287936, stream_offset=10037297, frame_samples=4096
point 13: sample_number=5730304, stream_offset=10928584, frame_samples=4096
point 14: sample_number=6172672, stream_offset=11944435, frame_samples=4096
point 15: sample_number=6610944, stream_offset=12870584, frame_samples=4096
point 16: sample_number=7053312, stream_offset=13689252, frame_samples=4096
point 17: sample_number=7495680, stream_offset=14591274, frame_samples=4096
point 18: sample_number=7933952, stream_offset=15545778, frame_samples=4096
point 19: sample_number=8376320, stream_offset=16604840, frame_samples=4096
point 20: sample_number=8818688, stream_offset=17786198, frame_samples=4096
point 21: sample_number=9256960, stream_offset=18900886, frame_samples=4096
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: true
length: 162
vendor string: reference libFLAC 1.5.0 20250211
comments: 6
comment[0]: album=Ocean Sounds
comment[1]: ALBUMARTIST=iamthemorning
comment[2]: ARTIST=iamthemorning
comment[3]: title=Inside
comment[4]: TRACKNUMBER=01
comment[5]: DATE=2018

“C:\bin\snd\flac-1.5.0\flac.exe” -t “D:\Temp\Ocean Sounds\01-Inside.flac”

flac 1.5.0
Copyright (C) 2000-2009 Josh Coalson, 2011-2025 Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac’ for details.

01-Inside.flac: ok

There is no video mode change when starting a music stream. HDMI is just told about the samplerate, channels etc.

There has always been a delay when playing some very short channel check test files (flacs in various samplerates) which I’ve never got to the bottom of but ‘real’ flacs ripped from CDs play perfectly here from the conductor’s raise of the baton. Here’s what I just tried, and it has embedded artwork

T:\Music\CD\Bach>c:\ProgramFiles\flac-1.4.3-win\Win64\metaflac.exe --list "Bach - Complete Violin Concertos 1.flac"
METADATA block #0
  type: 0 (STREAMINFO)
  is last: false
  length: 34
  minimum blocksize: 4096 samples
  maximum blocksize: 4096 samples
  minimum framesize: 14 bytes
  maximum framesize: 11690 bytes
  sample_rate: 44100 Hz
  channels: 2
  bits-per-sample: 16
  total samples: 134700216
  MD5 signature: 93ea33fd8446f6cac10cfb05dd3ca9cb
METADATA block #1
  type: 3 (SEEKTABLE)
  is last: false
  length: 5796
  seek points: 322
    point 0: sample_number=0, stream_offset=0, frame_samples=4096
    point 1: sample_number=438272, stream_offset=822868, frame_samples=4096
    point 2: sample_number=880640, stream_offset=1833385, frame_samples=4096
    point 3: sample_number=1318912, stream_offset=2786688, frame_samples=4096
    point 4: sample_number=1761280, stream_offset=3685372, frame_samples=4096
    point 5: sample_number=2203648, stream_offset=4649232, frame_samples=4096
    point 6: sample_number=2641920, stream_offset=5570120, frame_samples=4096
etc

and

METADATA block #2
  type: 5 (CUESHEET)
  is last: false
  length: 960
  media catalog number:
  lead-in: 88200
  is CD: true
  number of tracks: 10
    track[0]
      offset: 0
      number: 1
      ISRC:
      type: AUDIO
      pre-emphasis: false
      number of index points: 1
        index[0]
          offset: 0
          number: 1
    track[1]
      offset: 11174940
      number: 2
      ISRC:
      type: AUDIO
      pre-emphasis: false
      number of index points: 2
        index[0]
          offset: 0
          number: 0
        index[1]
          offset: 115836
          number: 1
    track[2]
      offset: 32360580
      number: 3
      ISRC:
      type: AUDIO
      pre-emphasis: false
      number of index points: 2
        index[0]
          offset: 0
          number: 0
        index[1]
          offset: 54096
          number: 1
    track[3]
      offset: 42966336
      number: 4
      ISRC:
      type: AUDIO
      pre-emphasis: false
      number of index points: 2
        index[0]
          offset: 0
          number: 0
        index[1]
          offset: 102900
          number: 1
    track[4]
      offset: 65312100
      number: 5
      ISRC:
      type: AUDIO
      pre-emphasis: false
      number of index points: 2
        index[0]
          offset: 0
          number: 0
        index[1]
          offset: 133476
          number: 1
    track[5]
      offset: 84742560
      number: 6
      ISRC:
      type: AUDIO
      pre-emphasis: false
      number of index points: 2
        index[0]
          offset: 0
          number: 0
        index[1]
          offset: 71736
          number: 1
    track[6]
      offset: 91973196
      number: 7
      ISRC:
      type: AUDIO
      pre-emphasis: false
      number of index points: 2
        index[0]
          offset: 0
          number: 0
        index[1]
          offset: 49980
          number: 1
    track[7]
      offset: 102292596
      number: 8
      ISRC:
      type: AUDIO
      pre-emphasis: false
      number of index points: 2
        index[0]
          offset: 0
          number: 0
        index[1]
          offset: 308700
          number: 1
    track[8]
      offset: 121060380
      number: 9
      ISRC:
      type: AUDIO
      pre-emphasis: false
      number of index points: 2
        index[0]
          offset: 0
          number: 0
        index[1]
          offset: 230496
          number: 1
    track[9]
      offset: 134700216
      number: 170 (LEAD-OUT)
METADATA block #3
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 2363
  vendor string: reference libFLAC 1.3.1 20141125
  comments: 13
    comment[0]: album=Bach - Complete Violin Concertos
    comment[1]: ALBUMARTIST=Stern, Zukerman, Perlman, Mehta, Bernstein, Marriner
    comment[2]: Artist=Stern, Zukerman, Perlman, Mehta
    comment[3]: COMPOSER=Johann Sebastian Bach
    comment[4]: CONDUCTOR=Zukerman, Mehta
    comment[5]: CUESHEET=REM GENRE Classical
REM DISCID 8F0BEE09
REM COMMENT "ExactAudioCopy v1.1"
PERFORMER "Stern, Zukerman, Perlman, Mehta, Bernstein, Marriner"
TITLE "Bach - Complete Violin Concertos"
FILE "Bach - Complete Violin Concertos 1.flac" WAVE
  TRACK 01 AUDIO
    TITLE "Violin Concerto 1 in A minor - I Allegro"
    PERFORMER "Pinchas Zukerman, English Chamber Orch."
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Violin Concerto 1 in A minor - II Andante"
    PERFORMER "Pinchas Zukerman, English Chamber Orch."
    INDEX 00 04:13:30
    INDEX 01 04:16:02
  TRACK 03 AUDIO
    TITLE "Violin Concerto 1 in A minor - III Allegro assai"
    PERFORMER "Pinchas Zukerman, English Chamber Orch."
    INDEX 00 12:13:60
    INDEX 01 12:15:02
  TRACK 04 AUDIO
    TITLE "Violin Concerto 2 in E major - I Allegro"
    PERFORMER "Pinchas Zukerman, English Chamber Orch."
    INDEX 00 16:14:22
    INDEX 01 16:16:47
  TRACK 05 AUDIO
    TITLE "Violin Concerto 2 in E major - II Adagio"
    PERFORMER "Pinchas Zukerman, English Chamber Orch."
    INDEX 00 24:41:00
    INDEX 01 24:44:02
  TRACK 06 AUDIO
    TITLE "Violin Concerto 2 in E major - III Allegro assai"
    PERFORMER "Pinchas Zukerman, English Chamber Orch."
    INDEX 00 32:01:45
    INDEX 01 32:03:17
  TRACK 07 AUDIO
    TITLE "Concerto in D Minor for 2 violins - I Vivace"
    PERFORMER "Zubin Mehta, New York Phil., Perlman, Stern"
    INDEX 00 34:45:42
    INDEX 01 34:46:52
  TRACK 08 AUDIO
    TITLE "Concerto in D Minor for 2 violins - II Largo ma non tanto"
    PERFORMER "Zubin Mehta, New York Phil., Perlman, Stern"
    INDEX 00 38:39:42
    INDEX 01 38:46:42
  TRACK 09 AUDIO
    TITLE "Concerto in D Minor for 2 violins - III Allegro"
    PERFORMER "Zubin Mehta, New York Phil., Perlman, Stern"
    INDEX 00 45:45:10
    INDEX 01 45:50:27
    comment[6]: DISCID=8F0BEE09
    comment[7]: DISCNUMBER=1/2
    comment[8]: Genre=Classical
    comment[9]: PERFORMER=Pinchas Zukerman, English Chamber Orch.
    comment[10]: ARTISTS=Stern / Zukerman / Perlman / Mehta
    comment[11]: ALBUMARTISTS=Stern / Zukerman / Perlman / Mehta / Bernstein / Marriner
    comment[12]: TRACKNUMBER=02/9
METADATA block #4
  type: 6 (PICTURE)
  is last: false
  length: 139767
  type: 3 (Cover (front))
  MIME type: image/jpeg
  description:
  width: 472
  height: 460
  depth: 24
  colors: 0 (unindexed)
  data length: 139725
  data:
    00000000: FF D8 FF E0 00 10 4A 46 49 46 00 01 01 01 00 64 ......JFIF.....d
    00000010: 00 64 00 00 FF DB 00 43 00 02 01 01 01 01 01 02 .d.....C........
    00000020: 01 01 01 02 02 02 02 02 04 03 02 02 02 02 05 04 ................
    00000030: 04 03 04 06 05 06 06 06 05 06 06 06 07 09 08 06 ................
etc
1 Like

I tried emailing a flac file, but 18mb was larger than your server could handle.
These are copyrighted files, I don’t know if I can post them online somewhere.
Unless you have in internal server, like pastebin, where I can send the file ??

I’ll be heading out for a while, when I get back, I’m going to try a fresh install of March 2025, instead of updating from October 2024… I haven’t tried that, yet…

I still can’t find the conversation about FFMPEG, FLAC, and caching I referenced earlier, in case this is a regression type error in Kodi’s code.

Again, ALL of my flac files have this error, downloaded from Bandcamp, ripped from CD, extracted from Bluray, re-converted using latest FFMPEG or latest FLAC.
Also tried FLAC compression level 8, 5, 0, padding, no-padding, minimum metadata…

None of the files I’m using are stripped down, short test files. All are full songs. I did strip down metadata on some tests, to rule out bad characters in metadata blocks.

Jim

No worries, looks like we have checked those FLACs fully.

thechrisgregory,

I sent you a PM with a link to one of my test files

Jim

1 Like

I wouldn’t be suprised if it is infact a FFMPEG regression type error. I have had regression problems with FFMPEG in other apps (e.g. Streamlink).

It shoud be possible, but I’m not quite sure how, to figure out the command line sent to FFMPEG, for a FLAC to PCM conversion, and then retry this manually. Not sure whether the version of FFMPEG used was built specifically for Kodi.