Author Topic: BASS for iOS failing to play specific MP4 file/stream  (Read 465 times)


  • Posts: 4

As part of certificating our app with Amazon, they have a long duration test stream that BASS for iOS v2.4.14.0 fails to play:

When this is loaded via BASS_StreamCreateURL, the call fails and calling BASS_ErrorGetCode returns BASS_ERROR_FILEFORM.  However a similar but shorter mp4 stream url in the same test set works correctly:

I can't see anything obvious in the two file's metadata that could explain this - do you have any thoughts on what might be causing the issue?


Ian @ un4seen

  • Administrator
  • Posts: 22829
The issue there is that BASS limits the amount of data that it will download to initialize an internet stream (to avoid long delays on possibly unplayable files), and that limit is insufficient for this particular MP4 file. There is a BASS_CONFIG_NET_SEEK option to change the limit (it sets the maximum seek distance) but there is currently also a hardcoded limit of 1MB applied to CoreAudio codecs (used to play MP4 on iOS). Here's an update that removes the hardcoded 1MB limit and automatically raises the limit (if necessary) to the end of an MP4 file's "moov" atom:

Let me know if it still gives you any trouble.


  • Posts: 4
That's brilliant, thanks Ian - problem sorted and that ridiculously long track now plays fine :)