Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Feb 2019
    Posts
    7

    Logitech Media Server 7.9.2+squeezelite: Some m4a files don't play(faad_decode error)

    I'm running LMS 7.9.2 on a Linux server and squeezelite on a number of Linux clients (Raspberries and Intel). I see the phenomenon that some of my m4a files play without problem while others don't.

    Here's the mediainfo for a file that works:

    Code:
    General
    Complete name                            : Austin Lucas/The Common Cold/01 Dead Factories.m4a
    Format                                   : MPEG-4
    Format profile                           : Apple audio with iTunes info
    Codec ID                                 : M4A  (M4A /mp42/isom)
    File size                                : 3.85 MiB
    Duration                                 : 2 min 44 s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 196 kb/s
    Album                                    : The Common Cold
    Track name                               : Dead Factories
    Track name/Position                      : 1
    Track name/Total                         : 9
    Performer                                : Austin Lucas
    Performer/Sorted by                      : Lucas, Austin
    Genre                                    : Country
    Encoded date                             : UTC 2008-06-10 23:55:55
    Tagged date                              : UTC 2013-02-02 17:16:40
    Writing application                      : iTunes v7.6.2, QuickTime 7.4.5
    Cover                                    : Yes
    
    Audio
    ID                                       : 1
    Format                                   : AAC LC
    Format/Info                              : Advanced Audio Codec Low Complexity
    Codec ID                                 : mp4a-40-2
    Duration                                 : 2 min 44 s
    Bit rate mode                            : Variable
    Bit rate                                 : 192 kb/s
    Maximum bit rate                         : 257 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                              : 3.79 MiB (98%)
    Encoded date                             : UTC 2008-06-10 23:55:55
    Tagged date                              : UTC 2013-02-02 17:16:40
    and here for one that doesn't:

    Code:
    General
    Complete name                            : Jayme Stone/Jayme Stone's Lomax Project/01 Lazy John.m4a
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 1
    Codec ID                                 : mp41 (mp41/isom)
    File size                                : 7.22 MiB
    Duration                                 : 3 min 1 s
    Overall bit rate mode                    : Constant
    Overall bit rate                         : 334 kb/s
    Album                                    : Jayme Stone's Lomax Project
    Track name                               : Lazy John
    Track name/Position                      : 1
    Performer                                : Jayme Stone
    Encoded date                             : UTC 2014-12-24 16:16:01
    Tagged date                              : UTC 2015-09-27 19:27:04
    Cover                                    : Yes
    
    Audio
    ID                                       : 1
    Format                                   : AAC LC
    Format/Info                              : Advanced Audio Codec Low Complexity
    Codec ID                                 : mp4a-40-2
    Duration                                 : 3 min 1 s
    Bit rate mode                            : Constant
    Bit rate                                 : 320 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                              : 6.92 MiB (96%)
    Language                                 : English
    Encoded date                             : UTC 2014-12-24 16:16:01
    Tagged date                              : UTC 2015-09-27 19:27:04
    Upon trying to play back the latter, I get the following entry in the server log:

    Code:
    [19-02-07 11:49:33.2965] Slim::Player::Squeezebox2::statHandler (150) Error: 84:2b:2b:ad:e2:30: Decoder does not support file format, code 0
    And the following in squeezelite's log:

    Code:
    HTTP/1.1 200 OK
    Server: Logitech Media Server (7.9.2 - 1548942599)
    Connection: close
    Content-Type: audio/aac
    
    
    [13:16:10.178956] sendRESP:202 RESP
    [13:16:10.581453] read_mp4_header:294 type: ftyp len: 24 consume: 24
    [13:16:10.581532] read_mp4_header:235 type: mdat len: 7256342 pos: 32
    [13:16:10.581555] faad_decode:372 samplerate: 44100 channels: 2
    [13:16:10.581574] faad_decode:377 setting track_start
    [13:16:10.581600] faad_decode:414 error: 32 Bitstream value not allowed by specification
    [13:16:10.581621] faad_decode:453 unable to decode further
    [13:16:10.581640] decode_thread:99 decode error
    [13:16:10.581693] sendSTAT:171 STAT: STMn
    I assume the faad_decode error is the problem but doing a websearch for it didn't turn up any useful information.

    There's no DRM involved and VLC e.g. is able to play the file without problems.

    Any ideas anyone? Thank you very much in advance!
    Last edited by Manul; 2019-02-07 at 12:59.

  2. #2
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    2,485
    So I did a search for

    Code:
    squeezebox mp41/isom
    and found this

    https://forums.slimdevices.com/showt...sique-Podcasts

    I'm not saying that this is the answer (or even the problem) but yer man is a bit busy at the mo.

    It might give you a bit of a clue though/or not (I don't understand it )

    ronnie

  3. #3
    Junior Member
    Join Date
    Feb 2019
    Posts
    7
    Thank you very much for your help!

    Unfortunately, I think the linked thread doesn't help me much as it's mainly concerned with conversion settings. I think, however, that squeezelite should be able to play both files natively.

    Interestingly, the 'faad' binary on the same machine is able to decode the file without any issues.

    Any other ideas anybody?

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    16,719
    Quote Originally Posted by Manul View Post
    Thank you very much for your help!

    Unfortunately, I think the linked thread doesn't help me much as it's mainly concerned with conversion settings. I think, however, that squeezelite should be able to play both files natively.
    Not if the index to the audio is at the end of the file - a streamed file needs to have index at the start (in this cae the file needs to modified by ffmpeg with faststart flag to move index to start of file).

    Try disabling native AAC playing in LMS (WebUI Setting/Advanced/Filetypes) and then see if they play OK - if they do then the problem is the index header is at the end of the file (i.e the file is not suited to streaming).

  5. #5
    Junior Member
    Join Date
    Feb 2019
    Posts
    7
    Thank you, @bpa, seems like that was indeed the solution. I wasn't even aware it was possible to have the metadata (at least that's my interpretation of "index to the audio") at the end of the file. Sounds like an...interesting design decision. At least I can't think of any use case where it would make sense to have the raw data before knowing how to interpret it.

    Anyway, I have a way to deal with this now, so not my concern. Thanks again!

    P.S. I didn't find any way to mark this thread as solved.
    Last edited by Manul; 2019-02-07 at 12:57. Reason: Added P.S.

  6. #6
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    16,719
    Quote Originally Posted by Manul View Post
    Thank you, @bpa, seems like that was indeed the solution. I wasn't even aware it was possible to have the metadata (at least that's my interpretation of "index to the audio") at the end of the file. Sounds like an...interesting design decision. At least I can't think of any use case where it would make sense to have the raw data before knowing how to interpret i.
    Not metadata but index into audio data. AAC audio is split up into "frames" - player needs to know the start of a frame in order to play audio - index tell player where to find the start of each frame. When creating an audio file in a single pass it is easy to put index at end of file as it is only available when compressed audio has been created. To put index at start of file requires a 2nd pass.

    The "offending" files can be easily fixed using ffmpeg and the "movflags faststart" option.

  7. #7
    Junior Member
    Join Date
    Feb 2019
    Posts
    7
    Thanks for the explanation. I would also consider that metadata, but I guess that's a matter of semantics and personal taste.

    Thank you also for the pointer to the faststart option, researching that I found that ffmpeg also comes with a tool "qt-faststart" which does just that, so the files are fixed now.

  8. #8
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    16,719
    [QUOTE=Manul;933399]Thanks for the explanation. I would also consider that metadata, but I guess that's a matter of semantics and personal taste. [quote]
    Metadata can be removed and the file will play. Without this index the file is unplayable - it is essential part of the MPEG4 compressed audio.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •