Closed jtbr closed 1 year ago
What Audio::Scan version is reported in Settings/Information? Did you post on forums.slimdevices.com, too? Some users might be able to identify the issue.
What Audio::Scan version is reported in Settings/Information? Did you post on forums.slimdevices.com, too? Some users might be able to identify the issue.
Version 1.05.
I did not. I guess I will now then :), but I hadn't found any relevant discussion there so far. New discussion is here
Logitech Media Server Version: 8.3.1 - 1676361197 @ Fri 17 Feb 2023 06:37:09 AM CET Hostname: bruserv Server IP Address: 192.168.10.9 Server HTTP Port Number: 9000 Operating system: Debian - EN - utf8 Platform Architecture: x86_64-linux Perl Version: 5.34.0 - x86_64-linux-gnu-thread-multi Audio::Scan: 1.05 IO::Socket::SSL: 2.074 Database Version: DBD::SQLite 1.58 (sqlite 3.22.0) Total Players Recognized: 4
Upon further experimentation, it seems that re-writing the file (with the same contents) using ffmpeg resolves the error. This would appear to be a viable workaround.
ffmpeg -i input.m4a -movflags faststart -c copy output.m4a
So it seems there is some incompatibility between Mp3tag and LMS. As I don't seem to have any issues with other players, I suspect the issue may be on the LMS side.
Note that this does seem to affect playback, at least with the castbridge plugin (LMS to chromecast), and is also associated with the server log message:
Slim::Player::Squeezebox2::statHandler (156) Error: 9c:b6:d0:ec:8e:8f: Decoder does not support file format, code 0
The issue is that offending files have an empty mdat atom at the end of the file. (Thanks to bpa for discovering this). Audio::Scan is checking for a minimum of 16 bytes in an atom, while this atom has only 8. A patch to Audio::Scan has been submitted: https://github.com/LMS-Community/Audio-Scan/pull/3
Such files also encounter a decoder error during playback on squeezelite and derivative players (eg castbridge), as described here: https://github.com/ralph-irving/squeezelite/issues/184
As the atom is useless, users can work around related issues by removing it using the above ffmpeg command.
Closing, as the error message is from an embedded project (Audio::Scan).
The above error appears in scanner.log for hundreds (thousands?) of my files. They all appear to be m4a files (I also have mp3 and a few flac files in my library). Although I've seen discussions of similar errors, they seem unrelated to what I'm seeing.
E.g:
Despite the error, the scanner appears to be able to recognize, read, and LMS can play the files. Nonetheless, it may be linked with some other problems I am seeing (like playback stopping and further tracks in the playlist not loading).
Many of my m4a files have tags that were written by Mp3tag, including the two which were updated here (by Mp3tag v3.19 [Jan 27 2023]); that may be connected. But my understanding is that this app is known for producing good tags. The LMS is version 8.3.1. I am happy to attach one of the m4a files referenced, or a more complete log if I find a way to.