iOS Plex & Plexamp consistently skips certain tracks

Server Version#: 4.33.1 running on macOS 10.9.5
Player Version#: Plex 6.10.1 & Plexamp 3.0.2 on iOS 12.3.1

For each track it skips it generates the error:

Exception handled: bad lexical cast: source type value could not be interpreted as target

All tracks in this particular album were created with youtube-dl (which used ffmpeg to encode to AAC saved with an m4a extension). Some tracks work, others are skipped completely. All tracks play fine in the desktop browser Plex client (and Music.app). Here’s the info for a track that gets skipped:

And for one that plays successfully:

Besides the variable bitrate the only difference I see is the one that plays is Web Optimized. But this track is also Web Optimized but gets skipped so that’s probably not it:

Let me know if there’s anything else I can provide to help diagnose the issue

Here’s some more info (from afinfo).

First, an example problem file that Plex players skip right over:

afinfo "1-01 The Prelude - Reunion.m4a" 
File:           1-01 The Prelude - Reunion.m4a
File type ID:   m4af
Num Tracks:     1
----
Data format:     2 ch,  48000 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
                no channel layout.
estimated duration: 193.046000 sec
audio bytes: 10956262
audio packets: 9050
bit rate: 453988 bits per second
packet size upper bound: 1513
maximum packet size: 1513
audio data file offset: 40
not optimized
audio 9266208 valid frames + 688 priming + 304 remainder = 9267200
format list:
[ 0] format:	  2 ch,  48000 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
Channel layout: Stereo (L R)

And a file that plays without being skipped:

afinfo "1-09 Shinra's Theme (short).m4a" 
File:           1-09 Shinra_s Theme (short).m4a
File type ID:   m4af
Num Tracks:     1
----
Data format:     2 ch,  48000 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
                no channel layout.
estimated duration: 39.910000 sec
audio bytes: 2419802
audio packets: 1872
bit rate: 484735 bits per second
packet size upper bound: 1494
maximum packet size: 1494
audio data file offset: 40
not optimized
audio 1915680 valid frames + 688 priming + 560 remainder = 1916928
format list:
[ 0] format:	  2 ch,  48000 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
Channel layout: Stereo (L R)
----

I can’t spot any difference. I’ve since updated to Plexamp 3.03, the problem persists in the iOS clients.

I’m not on ios, I use android but I just switched to .aac for my music and I’m having the same problem. Just skips seemingly random songs while they play fine on other players. On both the plex app and plexamp.

Plex for iOS and Android, as well as Plexamp all use the same player engine (which was developed during the Plexamp development, but shipped first in the “normal” apps, fun fact!), so you’ll probably see the same issues on all of them for things like that. Do you have a sample file you can reliably reproduce this with?

So not all of my library has been re-ripped yet, only the new .aac files do it, so there’s samples spread out throughout the new ones. I’ve tried seeing if aac in the .m4a container would fix it but it makes no difference. Here’s two, one .m4a and one just raw .aac
Samples.zip (19.8 MB)

Thanks for looking into this @DaveBinM, here are the two problem files from my original post: problem m4a.zip (13.3 MB)

Out of curiosity, what are you using to generate these files? I just ask because we recently came across this: iOS Plex and Plexamp players won't play most AAC files I've created using Switch audio convertor

Mine were encoded with youtube-dl (which uses ffmpeg).

Almost everything uses ffmpeg :sweat_smile: But thanks for the info. I’ll pass your samples along :slight_smile:

Hi All,

I’ve faced the same issue, but it doesn’t seem as though the issue is file format specific. I first noticed tracks being skipped to the last few seconds on the track being played when I was using VLC as the player over DLNA. I’ve since moved to Plexamp on both my desktop and Android phone (hoping that that would solve the problem) but the issue seems to have become worse - almost every album I play has a playback issue of some kind. Most of my music collection is in flac, encoded with SoundJuicer on Linux.

If there is any further information I can provide, happy to upload logs, media files, etc.

Thanks for the samples! Based on them, we’ve fixed two issues:

  1. Failure to play certain AAC files.
  2. Crash playing certain AAC files.

Both will be included in the next release.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.