So I have been trying to program some transcoders for use in Airsonic, but found that there's a funky bug.
Whenever a transcoding tool does not output Airsonic seems to retry accessing the file indefinitely, resulting in:
(900+ plays within seconds)
'Too long didnt read': A failing transcode catched Airsonic in an infinite loop, accessing the file forever.
The software in question is dsf2flac, I have also tried implementing MIDI but that didnt work for another transcoder input problem.
Compared to ffmpeg this would result in a much more efficient and clearer transcode but no luck:
When dsf2flac seems to get a DSD128 file as input or any other transcoder does 'something' wrong resulting in an empty file, Airsonic keeps trying until stopped manually by playing something else.
Maybe this bug could be catched with some kind of popup for the user, or something similar. "This file could not be transcoded", something like that. Instead of endlessly trying to play, messing up the play counter and possibly other aspects.
I have also tried doing this in a script with a conditional statement, but that made me think there is something deeper inside Airsonic that makes it mess up when there is no file to play.
with 'bash /var/airsonic/transcode/dsf.sh' in the transcoder text box:
This only executes if a DSD64 file is found, since Airsonic's transcoder window does not accept ] or ' in its transcoder text box. Anyway, I thought having this would prevent it from playing DSD128 files, but alas.
Now this is quite complicated but if any corrupt file appears or inplayable the same result would/could appear.
Steps to reproduce
Install dsf2flac into /var/airsonic/transcoders or other accessible place.
Add a DSD128 and DSD64 file to your library. (You can get demo files, also you might need to add dsf to scannable files in General > Music Files)
Add a transcoder rule: dsf2flac -i %s -o -
See if DSD64 does play just fine (Output should be a 88.2Khz FLAC), and the DSD128 file should fail completely, engaging the loop.
There are probably easier ways to trigger this but still.
What happened?
So I have been trying to program some transcoders for use in Airsonic, but found that there's a funky bug.
Whenever a transcoding tool does not output Airsonic seems to retry accessing the file indefinitely, resulting in: (900+ plays within seconds)
'Too long didnt read': A failing transcode catched Airsonic in an infinite loop, accessing the file forever.
The software in question is dsf2flac, I have also tried implementing MIDI but that didnt work for another transcoder input problem. Compared to ffmpeg this would result in a much more efficient and clearer transcode but no luck:
When dsf2flac seems to get a DSD128 file as input or any other transcoder does 'something' wrong resulting in an empty file, Airsonic keeps trying until stopped manually by playing something else. Maybe this bug could be catched with some kind of popup for the user, or something similar. "This file could not be transcoded", something like that. Instead of endlessly trying to play, messing up the play counter and possibly other aspects.
I have also tried doing this in a script with a conditional statement, but that made me think there is something deeper inside Airsonic that makes it mess up when there is no file to play.
with 'bash /var/airsonic/transcode/dsf.sh' in the transcoder text box:
This only executes if a DSD64 file is found, since Airsonic's transcoder window does not accept ] or ' in its transcoder text box. Anyway, I thought having this would prevent it from playing DSD128 files, but alas.
Now this is quite complicated but if any corrupt file appears or inplayable the same result would/could appear.
Steps to reproduce
dsf2flac -i %s -o -
There are probably easier ways to trigger this but still.
Version
11.1.x (Edge)
Version Detail
11.1.3-SNAPSHOT.20230503053148
Operating System
Debian 11
Java Version
openjdk 17.0.6 2023-01-17 (build 17.0.6+10-Debian-1deb11u1)
Database
Other
DB Detail
Built-In
Configuration paramter
Default, other than the aforementioned addition of dsf to Airsonic's scanning list.
Proxy Server
NGiNX
client detail
Web players, external as well, probably.
language
English
Relevant log output