iOS Plex and Plexamp players won't play most AAC files I've created using Switch audio convertor

Server Version#: 1.19.4.2902
Player Version#: Plex iOS 7; Plexamp 3.1.0
I want to use AAC (m4a) files in my music library. I tend to start off with WAVs / CDs. I am trying to not use iTunes for the conversion process… If I convert audio files from wav to m4a AAC using iTunes, the two Plex iOS players can always play them. But I prefer to use an app called Switch, and the files it creates play on the Desktop and browser Plex players but they do not play in either the Plex or Plexamp players.

Can you run those files through “MediaInfo” to verify if they’re somehow non-compliant or if there’s some obstacles Plex might not be able to deal with?
So far I haven’t run into any audio files Plex couldn’t deal with…

Thanks for the speedy response. I generated a report for one of the files as below. Is it helpful?

General
Complete name : 01 Future Nostalgia.m4a
Format : MPEG-4
Format profile : Apple audio with iTunes info
Codec ID : M4A (M4A /mp42/isom)
File size : 7.57 MiB
Duration : 3 min 4 s
Overall bit rate mode : Variable
Overall bit rate : 343 kb/s
Album : Future Nostalgiax
Album/Performer : Dua Lipa
Track name : Future Nostalgia
Track name/Position : 1
Performer : Dua Lipa
Genre : Pop
Recorded date : 2020
Encoded date : UTC 2020-06-10 14:33:58
Tagged date : UTC 2020-06-10 16:21:30
Writing application : Switch Plus © NCH Software

Audio
ID : 1
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 3 min 4 s
Bit rate mode : Variable
Bit rate : 337 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 7.42 MiB (98%)
Language : English
Encoded date : UTC 2020-06-10 14:33:58
Tagged date : UTC 2020-06-10 16:21:30

could you upload the logs from the Plex for iOS client shortly after attempting to play that file on the device?

Thanks again. I hope the attached helps. I generated it immediately after trying to play the album Future Nostalgiax (note the x at the end of the album name - I have created an iTunes-converted version of the album without the x in the name that I’ve been successfully playing just before doing this, so you will possibly see logs for those too). When I press play in the app, it runs through all the tracks in sequence skipping over each one in turn.Plexamp-Logs-2020-06-10.zip (370.2 KB)

The audio engine is having trouble decoding those files. Can haz file sample and XML for a track (e.g. Get Info + View XML) in web app?

2 Likes

Here’s the XML:

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="1" librarySectionTitle="Music" librarySectionUUID="12e9d1f6-4391-4ae0-90d5-713b7c2cc156" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1591215478">

<Track ratingKey="27478" key="/library/metadata/27478" parentRatingKey="27477" grandparentRatingKey="5745" guid="local://27478" parentGuid="com.plexapp.agents.none://27477?lang=xn" grandparentGuid="com.plexapp.agents.none://5745?lang=xn" type="track" title="Future Nostalgia" grandparentKey="/library/metadata/5745" parentKey="/library/metadata/27477" librarySectionTitle="Music" librarySectionID="1" librarySectionKey="/library/sections/1" grandparentTitle="Dua Lipa" parentTitle="Future Nostalgiax" originalTitle="Dua Lipa" summary="" index="1" thumb="/library/metadata/27477/thumb/1591801570" parentThumb="/library/metadata/27477/thumb/1591801570" duration="184947" addedAt="1591801565" updatedAt="1591802505">

<Media id="17983" duration="184947" bitrate="343" audioChannels="2" audioCodec="aac" container="mp4" optimizedForStreaming="1" audioProfile="lc" has64bitOffsets="0">

<Part accessible="1" exists="1" id="18032" key="/library/parts/18032/1591802490/file.m4a" duration="184947" file="/Volumes/Media/iTunes/iTunes Media/Music/Dua Lipa/Future Nostalgiax/01 Future Nostalgia.m4a" size="7936950" audioProfile="lc" container="mp4" has64bitOffsets="0" hasThumbnail="1" optimizedForStreaming="1">

<Stream id="19033" streamType="2" selected="1" default="1" codec="aac" index="0" channels="2" bitrate="343" language="English" languageCode="eng" audioChannelLayout="stereo" profile="lc" samplingRate="44100" streamIdentifier="1" displayTitle="English (AAC Stereo)"/>

</Part>

</Media>

<Extras size="0"> </Extras>

</Track>

</MediaContainer>

Mod-Edit: Added some code-tags so we can all see the XML :wink:

And the audio file…
01 Future Nostalgia.m4a.zip (7.5 MB)

Thanks Elan - hope I provided what you need!

Hey Elan. Hope all is well! Were the files and XML any help?

Absolutely. Have filed an issue internally with the sample for more analysis.

1 Like

Great, thank you so much.

:wave: OK, so it looks like your encoder is creating slightly corrupt files. Analysis from someone who looked into it:

That encoder appears to be creating slightly corrupt files, which is unfortunately tripping up the CoreAudio MP4 parser. The problem is the file’s “free” atom header does not state the correct size (it says 2048 bytes when it should be 23045), which means the subsequent “mdat” atom can’t be found. The “mdat” atom’s location isn’t strictly needed to be able to decode the file, but the CoreAudio MP4 parser apparently needs to see it.

1 Like

You can see this pretty clearly here:

$ ❯ mp4dump '/Users/elan/Downloads/Brendon Moeller - Materialize/bogus aac/01 Future Nostalgia.m4a'
[ftyp] size=8+20
  major_brand = M4A
  minor_version = 0
  compatible_brand = M4A
  compatible_brand = mp42
  compatible_brand = isom
[moov] size=8+38306
  [mvhd] size=12+96
    timescale = 44100
    duration = 8156160
    duration(ms) = 184947
  [trak] size=8+33749
    [tkhd] size=12+80, flags=1
      enabled = 1
      id = 1
      duration = 8156160
      width = 0.000000
      height = 0.000000
    [mdia] size=8+33649
      [mdhd] size=12+20
        timescale = 44100
        duration = 8156160
        duration(ms) = 184946
        language = ```
      [hdlr] size=12+22
        handler_type = soun
        handler_name =
      [minf] size=8+33575
        [smhd] size=12+4
          balance = 0
        [dinf] size=8+28
          [dref] size=12+16
            [url ] size=12+0, flags=1
              location = [local to file]
        [stbl] size=8+33515
          [stsd] size=12+91
            entry_count = 1
            [mp4a] size=8+79
              data_reference_index = 1
              channel_count = 2
              sample_size = 16
              sample_rate = 44100
              [esds] size=12+39
                [ESDescriptor] size=5+34
                  es_id = 0
                  stream_priority = 0
                  [DecoderConfig] size=5+20
                    stream_type = 5
                    object_type = 64
                    up_stream = 0
                    buffer_size = 6144
                    max_bitrate = 377040
                    avg_bitrate = 0
                    DecoderSpecificInfo = 12 10
                  [Descriptor:06] size=5+1
          [stts] size=12+12
            entry_count = 1
          [stsc] size=12+28
            entry_count = 2
          [stsz] size=12+31868
            sample_size = 0
            sample_count = 7965
          [stco] size=12+1456
            entry_count = 363
  [udta] size=8+4433
    [meta] size=12+4421
      [hdlr] size=12+22
        handler_type = mdir
        handler_name =
      [ilst] size=8+283
        [trkn] size=8+24
          [data] size=8+16
            type = 0
            lang = 0
        [.nam] size=8+32
          [data] size=8+24
            type = 1
            lang = 0
            value = Future Nostalgia
        [.alb] size=8+33
          [data] size=8+25
            type = 1
            lang = 0
            value = Future Nostalgiax
        [.ART] size=8+24
          [data] size=8+16
            type = 1
            lang = 0
            value = Dua Lipa
        [.gen] size=8+19
          [data] size=8+11
            type = 1
            lang = 0
            value = Pop
        [.day] size=8+20
          [data] size=8+12
            type = 1
            lang = 0
            value = 2020
        [.enc] size=8+43
        [aART] size=8+24
          [data] size=8+16
            type = 1
            lang = 0
            value = Dua Lipa
      [free] size=8+4088
[free] size=8+2040
[....] size=8+7896552

Thank you so much for taking the time to investigate. I’m in touch with the support team from Switch - I’ll pass on the information. Very much appreciated!

My pleasure, let me know what you figure out. I would assume they’ll be happy to fix, nobody likes corrupt files :grimacing:

1 Like

Just to say they were slow but they have finally replied! They requested a problematic file, so I have sent them the same I sent you (odd - presumably they could make one themselves…). Thank you again for all your help with the problem :slight_smile:

Ah cool, let me know if they end up fixing it :crossed_fingers:

Hey Elan, overdue a response to you… I contacted the developers of Switch, it took them a loooong time to reply requesting a sample file, I sent them the same I sent you and their response a couple of days later said that they couldn’t see the problem. That threw me a bit, I’ve just been super busy and couldn’t imagine how to respond given they had been so slow and seemed to be contradicting your findings. Meantime I’d found an alternative app called Audio Converter Pro that isn’t quite as easy to use as Switch but it does the trick. So that’s my update for you, and I wanted to reply to stress how much I appreciated your response to my request for help and in particular to show appreciation that you are personally involved. I’m really enjoying using Plex and Plexamp as my music player, both on my phone and in my car (I have Apple Car Play) and love that it appears to be in continuous development. There are quite a few things I’d like to see improved - both a few little bugs / instabilities and some features, some of which I’ve found already mentioned in the forums - and just really appreciate that there does seem to be a pipeline and progress. So… thanks!!!

3 Likes

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