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
460 stars 61 forks source link

track artist has invisible spaces? #258

Closed orbittwz closed 6 months ago

orbittwz commented 6 months ago

Hey there! Using ATL 4.36 here... Reading this mp3 track and parsing the track artist and title gets me this: ARTIST -- "Britney Spears " TITLE -- "Me Against The Music (Dragon M"

image

notice the spaces using your library, counted 8 spaces... whereas in MP3Tag, there are none, and none when copying the value and pasting it to notepad for example, zero spaces. i was wondering if that's a bug when the ID3 is lyrics? anyways, here is the file:

another example, this time it's both ARTIST and TITLE having spaces, whereas in MP3Tag there are none. ARTIST -- "Britney Spears " TITLE -- "Me Against the Music "

Would be nice if you check this... thanks

orbittwz commented 6 months ago

image the 2nd example is also ID3 having lyrics in it... hmmm

Zeugma440 commented 6 months ago

Thanks for your feedback. Having the files themselves to be able to test is super useful, but uploading them on Github directly -especially copyrighted pop music- is super risky for us.

I've downloaded the files and removed the links you posted. Next time, please use a 3rd party host. Thanks for your understanding.

orbittwz commented 6 months ago

hehe sorry, for next time will do

Zeugma440 commented 6 months ago

The first file (dragon_man_radio_mix)-twc) is only tagged with an ID3v1 tag, which is its sole source of metadata.

According to the ID3v1 specifications, every field has a fixed length. When the useful size of the metadata is smaller than the field's maximum fixed length, the remaining bytes should be filled with \0.

On the file you submitted, the remaining bytes are not filled with \0's but with spaces, which are read by ATL.

If you want them to disappear, you're welcome to trim them on your app's side.

image


The second file (ksi) is tagged with both ID3v1 and ID3v2 tags.

image

Are you sure you sent me the correct file?

orbittwz commented 6 months ago

image Hey thanks for the info. For KSI, I think it was the 2nd file?

orbittwz commented 6 months ago

https://www.mediafire.com/file/4n9zhig5n9vyl8l/02-britney_spears-me_against_the_music_(call-out_hook)-ksi.mp3/file

Zeugma440 commented 6 months ago

Thanks. The new file you just sent is in the very same situation as the 1st file : ID3v1 tag only, with spaces as trailing bytes.

orbittwz commented 6 months ago

no problems, I used Trim() method on artist and title and that should solve my issue. have a nice day!