Bug #425

Certain .m4a files do not play

Added by John Lindgren over 9 years ago. Updated about 9 years ago.

Target version:
Start date:
April 01, 2014
Due date:
% Done:


Estimated time:
Affects version:


As mentioned on the forum [1], some .m4a files do not play in Audacious. The example file provided [2] can be played fine using VLC or ffplay.



#1 Updated by John Lindgren over 9 years ago

Technical details:

The MP4 container in this example file has an empty "time-to-sample atom", a.k.a. seek table [1]. The MP4 demuxer used in Audacious (mp4ff, part of libfaad) needs the seek table to work correctly. Running faad from a terminal also fails to decode the example file, reporting that it is "0.000 secs". Instead of mp4ff, some other players (VLC, for example) use FFmpeg's MP4 demuxer, which can handle files without a valid seek table.


1. Disable the AAC (MP4) Decoder in Audacious. Audacious will then fall back on its FFmpeg plugin, which can play the file.

2. Use FFmpeg to remux the file, building a new seek table. Note that this is a lossless operation that does not involve re├źncoding the audio data. Example terminal command:

$ ffmpeg -i in.m4a -acodec copy -movflags faststart out.m4a

Long-term solutions:

Patching mp4ff is not a workable solution since much of its API is based on the assumption that a seek table is available; also, upstream apparently discourages the use of mp4ff outside libfaad [2]. faad itself has not seen a release since 2009.

That leaves three options:

1) Keep the current MP4/AAC plugin and do not support MP4 files without a valid seek table.

2) Remove the current MP4/AAC plugin altogether and rely on the FFmpeg plugin ("ffaudio") to play all MP4 files. FFmpeg is already used for other audio codecs (Apple Lossless, for example) within MP4 containers, so this would make format detection simpler.

3) Write a new MP4 plugin for Audacious using a different demuxer. mp4v2 [3] was suggested on the Debian bug report mentioned earlier [2]. I'm not sure if this has any clear advantage over 2), other than keeping format-specific code like the album art support (itunes-cover.c) out of ffaudio.

The latter two options involve changes that are too big to make before Audacious 3.5, but they should be considered for 3.6.

[1] (search for "stts")

#2 Updated by John Lindgren about 9 years ago

  • Status changed from New to Closed
  • Target version set to 3.6
  • % Done changed from 0 to 100

Also available in: Atom PDF