Zeugma440 / atldotnet

Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
MIT License
440 stars 60 forks source link

more understandable name #252

Closed j4587698 closed 4 months ago

j4587698 commented 4 months ago

The problem

When the file is an mp3, track.AudioFormat.ShortName shows as MPEG, which doesn't seem quite accurate. Is there a way to make it display as MP3 instead?

Thank you for your audio library.

Zeugma440 commented 4 months ago

Hi there and thanks for your feedback 😄

"MP3" is a popular simplified term for "MPEG Audio layer III" (https://en.wikipedia.org/wiki/MP3).

I won't accept to change the way ATL displays information to make it less accurate. I advise you change your UI to display "MP3" every time track.AudioFormat.Name contains "Layer III".

j4587698 commented 4 months ago

Can we have more easily displayed names? Such as MP3, FLAC, APE, etc., so that they can be shown on the UI without the need for additional conversion.

Zeugma440 commented 4 months ago

track.AudioFormat.ShortName exists for that matter and already provides "FLAC" and "APE" labels for corresponding files.

As far as I understand, the only extra case you need to handle is the one where an MPEG Layer III file should be nicknamed "MP3" for user friendliness.

My problem is that, after all that's been said, an MP3 file is still an MPEG file. It's as if Audible users wanted to display AAX files as "Audible", while they're technically MPEG-4 audio.

As far as I'm concerned, these are display/aesthetics issues that should be handled by the UI, not by the library.

j4587698 commented 4 months ago

Do you mean to add a field like DisplayName that shows common names, such as MP3 or Audible? For instance, audio formats like m4a and aax are both MPEG-4 technically, and that's correct. I'm not sure if the library can actually differentiate between the two, but in AudioFormat, they are completely the same. If I am loading from a stream without an extension, I might not be able to distinguish between the two?

Zeugma440 commented 4 months ago

For instance, audio formats like m4a and aax are both MPEG-4 technically, and that's correct. I'm not sure if the library can actually differentiate between the two, but in AudioFormat, they are completely the same. If I am loading from a stream without an extension, I might not be able to distinguish between the two?

That's a very good question that might be the key to our problem. By loading an AAX file and an M4A file as a stream, the library won't be able to make any difference indeed, as AAX is a mere convention invented by Amazon when they switched from "old Audible" to MP4.

However, ATL will still be able to differentiate an MPEG Layer III stream from an MPEG Layer II stream, or an OPUS stream from a Vorbis stream, as they are distincts codecs.

=> We should actually differentiate four different kind of metadata :

Before talking about implementation, do we agree on the above?

j4587698 commented 4 months ago

Okay, thank you very much. I will try to obtain the final result by getting the default extension through the default MIMETYPE.