True gapless playback not working

I don’t think so… The same tracks are properly gapless in foobar2000. I recorded the stereo mix using Audacity and there’s clearly a gap in the waveform (approximately 6ms long) only from Plexamp and not from foobar2000. I manually lined them up and they’re in sync at the start, but once the second track starts playing Plexamp is behind by ~6ms.

image

Top is Plexamp, bottom is Foobar2000 playing the exact same tracks.

(only looking at the left channel to simplify things)

2 Likes

thanks very much, i take this analysis seriously!

is it consistently occurring with the same tracks? can you give me the two tracks in question?

~6ms is around ~256 samples @ 44.1kHz, i’m wondering if the decoded is padding start or end for some reason.

https://files.d.sb/d/0d3218a9c1414e658358/, password is “plexbug1”

They’re both VBR MP3s (this particular mix is over 10 years old now and I had much less disk space back then, so all my old content is encoded as VBR MP3 files) so maybe that has something to do with it?

PlexAmp on Android seems to behave the same as PlexAmp on Windows in that there’s a small blip between the two tracks.

hmm, are you sure this isn’t just an issue with VBR MP3? Possible modification to VBR encoding to allow true gapless

It works fine in Foobar2000 though. I haven’t tried any other players yet, but can’t Plex do whatever Foobar2000 is doing?

Plus the separate MP3s were split from a single MP3 using a CUE file, so the bitrate at the end of one track should be approximately the same as the bitrate at the start of the next track?

I do still have the original (unsplit) MP3 somewhere so I can try splitting a different way if you think that’d help? I think I originally split it with mp3splt + a CUE file.

RE: Plex vs PlexAmp, This would have been nice to know earlier in my comments. Why then does my android phone and ipad not have this issue with the same content?

generally for best compatibility, the MP3 files need a tag; c.f. Fix gapless playback in mp3 files in LAME without transcoding?

with same version of Plexamp? if so, quite likely using different decoders. some decoders probably behave differently in terms of trying to strip delays.

I’ll take a closer look at that tomorrow. Are you saying that Plex is pickier than Foobar2000?

I would have thought that mp3splt would write all the necessary tags but I’ll double check everything. Do you know of any other command-line apps that can split MP3s using a CUE file and write all the proper gapless tags?

No, let me clarify. All my devices are using Plex, not PlexAmp. All my devices are pulling the same content.

  • Android using Plex app = gapless OK
  • iPad using Plex app = gapless OK
  • desktop PC using Plex app = gapless FAIL
  • laptop using Plex app = gapless FAIL

So with your regards to this comment:

  • plexamp on desktop pre-fetches play queue, next track, etc. and should be gapless
  • plex on desktop does no pre-fetching and will only be gapless if it manages to load the data for the next track before playback buffer empties.

Referring to my previous comment:

I will note that Android and iPad are on WiFi, whereas the desktop apps are on ethernet cable.

You would think something with direct gigabit ethernet connection would fetch the data much faster than WiFi.

If Plex desktop app does not perform any pre-fetching of content, then surely the very same app (Plex, not PlexAmp, and knowing that they are coded for different platforms) should be doing the same thing. But it’s not.

It just seems to me that Plex desktop is an after thought, with very little attention paid compared to the other platforms.

you’re in a thread tagged plexamp, hence why it’s confusing.

The mobile apps use the Player engine from Plexamp; the desktop apps do not.

So essentially: Plexamp player (inside the Plexamp app itself, and official Plex mobile apps) will be gapless.

(and ignore what i said above about tags, as it’s working fine with a player which is designed for gapless)

So essentially: Plexamp player (inside the Plexamp app itself, and official Plex mobile apps) will be gapless.

OK, this makes a lot more sense. Apologies for not knowing I was in the wrong thread. Is there a roadmap for this for the desktop app, or is it never to be?

1 Like

Rather than Plex being “picky”, Foobar might be better at “fixing” errors in files.

FWIW, I haven’t noticed this issue in any of my files, MP3 or lossless, but I’ve always used the most recent LAME (at the time) that was available. And I hate single MP3 with cues, so I’ve always had proper split files from the source from the start… :smiley:

I would like to get the same player core integrated into the desktop app. That takes time, and it’s proven challenging to schedule.

Yeah, but per what I said earlier, I was confused about which player is involved. The silence observed could easily just be the time it took to buffer the next track given that it doesn’t pre-cache.

1 Like

Often these continuous DJ mixes are a single track on the original CD, so there’s not really any choice other than to rip it to a single file and split it later.

I re-split the MP3s from the source MP3 and CUE using this mp3splt command:

mp3splt -f -b -T 2 -o '@n  @p - @t' -d output -c input.cue input.mp3

I didn’t use the -f and -b options last time I split this file (I don’t think -b existed at the time):

 -f   Frame mode (mp3 only): process all frames. For higher precision and VBR.
 -b   [Experimental] Bit reservoir handling for gapless playback (mp3 only).

I think this fixed it. I did the “Plex Dance” and cleared my local cache (took a while to find but eventually I used Process Monitor to watch where Plexamp wrote its files, and found the cache at C:\Users\Daniel\AppData\Local\Temp\Plexamp\Caches\Media). At first I thought it didn’t fix it, but it was because I forgot to clear the Plexamp cache so it was still playing the ‘old’ version from the cache.

I just encountered the same issue with a different album, and unfortunately I don’t have the original un-split MP3 any more (and the original CD is long-gone too, so I can’t re-rip it). Given Foobar2000 gaplessly plays the album perfectly, is there some way to fix it so other plays can gaplessly play it too?

No idea if it will work, but maybe you could recombine them with a program like Audacity, then redo the split. Probably won’t be optimal to do MP3 → MP3 conversions like that, but it might fix the gapless issue?

I’m going to retract this previous statement. One track is 13 seconds long. On Plexamp for Windows and iOS is it not gapless from this track to the next on the album. It is gapless in Foobar on Windows and Prism however not on either Plexamp app. The track was ripped by me from the source as V0 Lame mp3 and is tagged properly.

Any thoughts or anything I can do to get this sorted so it is true gapless?

I’ve since tried a live album that is perfect in the Windows Plexamp app, Foobar on Windows and Prism on iOS. However in the Plexamp on iOS it is not gapless. I’ve been testing by playing, seeking to about 30 seconds left and listening for the changeover to the next track. Is there a specific amount of time required to cache before moving into the next track with gapless playback? I know there isn’t on Prism however that uses the system music player and I assume is different than Plexamp.

Again this is a V0 Lame encoded mp3.

Thanks!