Music playback stutter at start of next track

I seem to have a long standing minor glitch with music playback. When a track (Amazon MP3s) ends and another starts there’s a little stutter at the beginning of the second track. It only happens when transitioning from track to track. If I start any of the tracks manually, it doesn’t happen. I have cross fade turned off. Audio and video goes through an AV receiver (HDMI) which is set to always keep alive. I was wondering if anyone had any idea what could be causing this?

I have exact the same problem.
I use pi 2 with hifi berry dac plus.
Changed buffer and every other setting but still if for example set crossfade to 5 sec then exactly on 5 second a short stutter and then song plays further.
Im using flac music files from a usb stick.

So im also looking for a solution …

I too tried setting a cross fade, and like you, observed that after the cross fade the same stutter existed at the start of the next track.

@jamieburchell To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Thanks for your understanding. We hope that we can help you get up and running again shortly.

@cisk0 I think you should open a separate thread since your HifiBerry DAC+ and you have an issue when crossfade is active.

@JimKnopf I’m aware, thank you. I wanted to see if this was a common or reported or otherwise known about issue before wiping the slate clean, spending time reproducing the issue and sending logs. Which I will do, when I have time. The Pi has been running for days and the logs are full of unrelated stuff, library scans etc etc and I want to start with fresh logs and make sure I’m not broadcasting to the world my entire Video and Music library collection in the process :wink:

Here are the logs

https://paste.osmc.tv/merizayiva

Cheers
Jamie

Looks to be a Pi 2 B.

Can you check that OMX player is disabled and MMAL is active? Settings->Playback->Video

Does this make any difference?

Both were enabled, made no difference disabling OMX Player

Ok, can you leave OMX disabled , MMAL enabled?
Please, provide another log set following the sequence of

  • enable logging
  • reboot
  • reproduce the issue
  • provide the URL here
  • disable logging

Thx

Here you go:

https://paste.osmc.tv/oqifizunig

The transition between the second to last and last track had a noticeable stutter.

Ok, tried to reconfigure my Pi 2 B as near as possible meeting your config:

  • changed fstab location to use nfs instead of nfs4

  • downloaded some Amazon stuff I bought the CD of

  • even activated stereo upmix

  • what I did not implemented is the usage of MySQL

-> whether I try to play the bunch of mp3 files or even the unpacked zip file … I cannot reproduce the issue at all but … but I see log difference I cannot explain right now:

From you’re log file:

01:09:45.937 T:1925466624   DEBUG: FactoryCodec - Audio: passthrough - Opening
01:09:45.937 T:1925466624   DEBUG: FactoryCodec - Audio: passthrough - Failed
01:09:45.937 T:1925466624   DEBUG: FactoryCodec - Audio: FFmpeg - Opening
01:09:45.938 T:1925466624   DEBUG: FactoryCodec - Audio: FFmpeg - Opened
01:09:45.980 T:1925466624   DEBUG: unrecognized ID3 frame detected: PRIV
01:09:45.982 T:1925466624   DEBUG: ffmpeg[72C44A00]: [mp3] Could not update timestamps for skipped samples.
01:09:45.983 T:1925466624   DEBUG: SeekTime - seek ended up on time 0
01:09:45.983 T:1925466624   DEBUG: Previous line repeats 1 times.
01:09:45.983 T:1925466624    INFO: CActiveAEResamplePi::CActiveAEResamplePi
01:09:45.983 T:1925466624    INFO: CActiveAEResamplePi::Init remap:(nil) chan:2->2 rate:44100->44100 format:6->3 bits:16->32 dither:0->0 norm:0 upmix:0
01:09:45.984 T:1925466624    INFO: CActiveAEResamplePi::Init    1.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
01:09:45.984 T:1925466624    INFO: CActiveAEResamplePi::Init    0.00   1.00   0.00   0.00   0.00   0.00   0.00   0.00
01:09:45.984 T:1925466624    INFO: CActiveAEResamplePi::Init    0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
01:09:45.988 T:1925466624    INFO: Previous line repeats 5 times.
01:09:45.988 T:1925466624   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_mixer input port 232 output port 231 m_handle 0x57d5a698
01:09:46.006 T:1925466624   DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_mixer) - port(232), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288), nBufferAlignmen(32)
01:09:46.008 T:1925466624   DEBUG: COMXCoreComponent::AllocOutputBuffers component(OMX.broadcom.audio_mixer) - port(231), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288) nBufferAlignmen(32)
01:09:46.023 T:1925466624   DEBUG: ffmpeg[72C44A00]: [mp3] Could not update timestamps for skipped samples.
01:09:46.279 T:1925466624    INFO: AudioDecoder: File is queued
01:09:46.280 T:1925466624   DEBUG: AudioDecoder::GetReplayGain - Final Replaygain applied: 1.000000, Track/Album Gain 89.000000, Peak 1.000000
01:09:46.282 T:1894859520    INFO: CActiveAEResamplePi::CActiveAEResamplePi
01:09:46.282 T:1894859520    INFO: CActiveAEResamplePi::Init remap:(nil) chan:2->6 rate:44100->44100 format:3->3 bits:32->32 dither:0->0 norm:1 upmix:1
01:09:46.283 T:1894859520    INFO: CActiveAEResamplePi::Init    1.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
01:09:46.284 T:1894859520    INFO: CActiveAEResamplePi::Init    0.00   1.00   0.00   0.00   0.00   0.00   0.00   0.00
01:09:46.284 T:1894859520    INFO: CActiveAEResamplePi::Init    0.50   0.50   0.00   0.00   0.00   0.00   0.00   0.00
01:09:46.284 T:1894859520    INFO: Previous line repeats 1 times.
01:09:46.284 T:1894859520    INFO: CActiveAEResamplePi::Init    1.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
01:09:46.284 T:1894859520    INFO: CActiveAEResamplePi::Init    0.00   1.00   0.00   0.00   0.00   0.00   0.00   0.00
01:09:46.284 T:1894859520    INFO: CActiveAEResamplePi::Init    0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
01:09:46.288 T:1894859520    INFO: Previous line repeats 1 times.
01:09:46.289 T:1894859520   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_mixer input port 232 output port 231 m_handle 0x706ff638
01:09:46.306 T:1894859520   DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_mixer) - port(232), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288), nBufferAlignmen(32)
01:09:46.309 T:1894859520   DEBUG: COMXCoreComponent::AllocOutputBuffers component(OMX.broadcom.audio_mixer) - port(231), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288) nBufferAlignmen(32)
01:09:46.325 T:1894859520   DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
01:09:46.344 T:1925466624    INFO: PAPlayer::PrepareStream - Ready
01:09:46.345 T:1925466624   DEBUG: PlayFile: OpenFile succeed, play state 1
01:09:46.345 T:1647309568   DEBUG: Thread PAPlayer start, auto delete: false
01:09:46.345 T:1647309568   DEBUG: PAPlayer::Process - Playback started

Matching log block from my device:

13:35:20.419 T:1926113792   DEBUG: FactoryCodec - Audio: passthrough - Opening
13:35:20.419 T:1926113792   DEBUG: FactoryCodec - Audio: passthrough - Failed
13:35:20.419 T:1926113792   DEBUG: FactoryCodec - Audio: FFmpeg - Opening
13:35:20.420 T:1926113792   DEBUG: FactoryCodec - Audio: FFmpeg - Opened
13:35:20.423 T:1926113792   DEBUG: unrecognized ID3 frame detected: PRIV
13:35:20.424 T:1926113792   DEBUG: ffmpeg[72CE2A00]: [mp3] Could not update timestamps for skipped samples.
13:35:20.425 T:1926113792   DEBUG: SeekTime - seek ended up on time 0
13:35:20.426 T:1926113792   DEBUG: Previous line repeats 1 times.
13:35:20.426 T:1926113792   DEBUG: ffmpeg[72CE2A00]: [mp3] Could not update timestamps for skipped samples.
13:35:20.540 T:1926113792    INFO: AudioDecoder: File is queued
13:35:20.541 T:1926113792   DEBUG: AudioDecoder::GetReplayGain - Final Replaygain applied: 1.000000, Track/Album Gain 89.000000, Peak 1.000000
13:35:20.547 T:1895908096   DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
13:35:20.559 T:1926113792    INFO: PAPlayer::PrepareStream - Ready
13:35:20.559 T:1926113792   DEBUG: PlayFile: OpenFile succeed, play state 1
13:35:20.559 T:1325945600   DEBUG: Thread PAPlayer start, auto delete: false
13:35:20.559 T:1325945600   DEBUG: PAPlayer::Process - Playback started

So, in your log one can see CActiveAEResamplePi is heavily used and there seems to be a switch from 2-channel audio to 6-channel … but I do not have a clue right now of the origin.

Other folks able to add a value here?

I use stereo upmix to get audio from all speakers on the 5.1 AVR (Sony HT-SS1300). Not sure if the AVR supports MP3, is it trying to pass it through? It supports AC3 and DTS which are set to passthru.

Really appreciate you taking the time to help and mirror my setup by the way.

Ok, finally got the setting that causes CActiveAEResamplePito be used in my environment

OSMC GUI: Settings-> System -> Audio -> Resample Quality -> GPU acceleration
(the default is medium)

With this setting, number of channels = 5.1 and stereo upmix I also get a single audio dropout when the standard playlist switches from one mp3 to the next … and only specific transitions regarding the files index of my test album are affected. But with these transitions I can reproduce it every time.

So, would be worth a try to set back the Resample Quality to low, medium or high but to avoid the GPU acceleration.

Interesting. I’ll see what happens if I don’t stereo upmix too. I can just switch my AVR to output to all speakers if that’s the issue.

Only certain transitions do if for me too, I think where there’s a quiet part at the end or beginning it just isn’t noticeable.

Will have a play with those settings and report back.

Thanks again

OK. If I turn off stereo upmix or set resample quality to anything other than GPU accelerated there’s no stutter.

1 Like