epoupon / lms

Lightweight Music Server. Access your self-hosted music using a web interface.
http://lms-demo.poupon.dev
GNU General Public License v3.0
1.14k stars 62 forks source link

[Question] bitDepth for aac files #448

Closed GioF71 closed 7 months ago

GioF71 commented 7 months ago

Hello @epoupon and thank you for the work with the newest changes in OpenSubsonic here. You've been incredibly quick! :-)

I am about to implement the required changes in my subsonic plugin for upmpdcli, and I found this situation. I have an album which is encoded in aac format (suffix results as "aac", bitrate is 268) so I thought that in this case the bitDepth should have been set to 0, instead it is set to 16. Is maybe the aac suffix shared with other codecs, so it's not possible to understand that those files are actually encoded losslessly?

Thank you very much!

epoupon commented 7 months ago

Hmm LMS is just exposing the bitsPerSample information in the MP4 audio properties: https://taglib.org/api/classTagLib_1_1MP4_1_1Properties.html

GioF71 commented 7 months ago

You're right... I'll see what I can do on the plugin in order to clarify the "lossy" nature of the tracks. Thank you!

epoupon commented 7 months ago

I guess you want the codec information? (aac/alac)

GioF71 commented 7 months ago

No no, I wanted a "badge" (a text) that should say "lossy", or similar, when appropriate, appended to album name. I will send a picture in the thread when it's presentable

GioF71 commented 7 months ago

image

For example in this screen, the suffix " [16/44.1]" is the badge I want to show. In other cases it will show e.g. mp3@320/44.1, 24/96 (for hires), etc etc

GioF71 commented 7 months ago

about aac, those tracks did not have "aac" as suffix, their suffix was m4a, so I think we are good taking the info from taglib. I have set a whitelist for "flac" and "alac", for every other suffix, if gets displayed in the badge. They are also very rare cases in my library so no concern I believe. Thank you!