If native playback fails try playing transcoded version first before aborting - how?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AF1
    Senior Member
    • Jul 2010
    • 650

    If native playback fails try playing transcoded version first before aborting - how?

    Hi.

    This problem concerns ALAC and AAC music files (so far). Every now and then LMS comes across such a file and won't play it on devices that support native playback of AAC/ALAC files = Slim::Player::Squeezebox2::statHandler (150) Error:... Decoder does not support file format, code 0
    They play fine when transcoded, like on a Boom, and on all other non-LMS devices. Since I have no way of finding all files that produce this error (and even if, fixing them has failed so far), I thought:

    is it (already) possible to create some kind of playback failsafe, like: if there's a "Decoder does not support file format, code 0" error for a file that qualifies for native playback on a device, let's try playing a transcoded version first and only if that fails as well abort with an error?

    Thank you.
    Report a problem
  • bpa
    Senior Member
    • Oct 2005
    • 22622

    #2
    Originally posted by afriend
    Hi.

    This problem concerns ALAC and AAC music files (so far). Every now and then LMS comes across such a file and won't play it on devices that support native playback of AAC/ALAC files = Slim::Player::Squeezebox2::statHandler (150) Error:... Decoder does not support file format, code 0
    They play fine when transcoded, like on a Boom, and on all other non-LMS devices. Since I have no way of finding all files that produce this error (and even if, fixing them has failed so far), I thought:

    is it (already) possible to create some kind of playback failsafe, like: if there's a "Decoder does not support file format, code 0" error for a file that qualifies for native playback on a device, let's try playing a transcoded version first and only if that fails as well abort with an error?

    Thank you.
    No. LMS just check once for a format being playable or not either natively or transcoded . You would have to assign a new playback type with associated convert file entries for this type file but to do so you must enhance scanner to detemine which files are aac/alac playable by Touch and which are these special sort that needs transcoding.

    It is likeley this issues has already been addressed - probably a file which has the "wrong" set of MPEG4 option in the header. Usual case some streamed MP4 (e.g. podcast) which have been saved.

    edit:

    Recalling the most recent issue.I think the issues is the index table of the file is placed at then end of a file. This means when streamed to a player the file cannot be played as theinformation to where audio frrames start has nto been received by the player. Whereas with transcoding "faad" can seek up and down the file before it streams/

    The fix is usually to modify the offending file to use faststart (I.e. move index to start of file so it can be streamed)

    e.g
    ffmpeg -i input.m4a -acodec copy -movflags +faststart output-audio.mp4
    Last edited by bpa; 2019-07-09, 18:28.

    Comment

    • bpa
      Senior Member
      • Oct 2005
      • 22622

      #3
      Out of curiosity I checked the LMS scanner code - it uses a module Audio::Scan which AFAICT does detect the whether the file is suitable for streams (i.e. returns a flag "leading_mdat" ) which if it actually works could be used to identify files that cannot be played natively by Touch / Radio.

      Mods to a number of LMS file would still be needed to deliver desired functionality.

      Comment

      • bpa
        Senior Member
        • Oct 2005
        • 22622

        #4
        Change may be happen but it'll depend on not breaking other parts.

        See https://forums.slimdevices.com/showt...on-Touch-Radio

        Comment

        • AF1
          Senior Member
          • Jul 2010
          • 650

          #5
          Thank you very much, bpa, for looking into this!

          It is possible for LMS to put these files into a separate category (e.g. say mp4x and alcx instead of mp4 and alc) which has no native transcoding rules - so they will always be transcoded and "good" MP4 file will be played natively.
          I think that would solve many problems. So if this is going to happen I would be very glad.
          May I ask one thing that might help with future troubleshooting: could you please include the file path in error messages of Decoder does not support file format, code 0? Since this error won't happen all the time it won't clutter the log and still be very helpful in finding those files.


          BTW I've looked some more into my AAC/ALAC files and in my scanner log there's also a big bunch with the famous "Error: Unable to read at least 16 bytes from file (only read xx)." Oddly enough, at least those of them I've checked manually do have their metadata properly displayed. They are AAC from the iTunes Music Store (either purchased or matched).

          I have gathered all files who trigger this scanner error message in a playlist. Now I would like to have each one of them play for only like 3 seconds and see if any would also trigger this Decoder does not support file format error.
          There are too many to do this manually. Do you know how to automate this?
          Report a problem

          Comment

          • bpa
            Senior Member
            • Oct 2005
            • 22622

            #6
            Originally posted by afriend
            May I ask one thing that might help with future troubleshooting: could you please include the file path in error messages of Decoder does not support file format, code 0? Since this error won't happen all the time it won't clutter the log and still be very helpful in finding those files.
            Unlikely as that error is LMS noting a report from the player and logged by the LMS comms protocol module and IIRC doesn't have access to what created the datastream. However it should be clear to user the file/stream that is being played.

            BTW I've looked some more into my AAC/ALAC files and in my scanner log there's also a big bunch with the famous "Error: Unable to read at least 16 bytes from file (only read xx)." Oddly enough, at least those of them I've checked manually do have their metadata properly displayed. They are AAC from the iTunes Music Store (either purchased or matched).

            I have gathered all files who trigger this scanner error message in a playlist. Now I would like to have each one of them play for only like 3 seconds and see if any would also trigger this Decoder does not support file format error.
            There are too many to do this manually. Do you know how to automate this?
            I don't deal with scanner but I know MP4 which I why I picked the initial problem up.

            I've seen this 16 bytes error - I think it is the scanner trying to read part of a file to determine its type and there isn't enough data - part of scanning is a bit of guesswork . If you are really concerned - create a new thread especially with this topic as it will not be seen if buried in a different topic such as playback aborting.

            Comment

            • bpa
              Senior Member
              • Oct 2005
              • 22622

              #7
              Originally posted by bpa
              Change may be happen but it'll depend on not breaking other parts.

              See https://forums.slimdevices.com/showt...on-Touch-Radio
              Michael has rolled the change into LMS a few hours ago.

              Comment

              Working...