Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

length/TLEN #114

Closed
ai-compatible opened this issue Oct 26, 2021 · 2 comments
Closed

length/TLEN #114

ai-compatible opened this issue Oct 26, 2021 · 2 comments

Comments

@ai-compatible
Copy link

The documentation indicates length/TLEN support but I do not see a value coming back for it.

If I ask for all the tags from an mp3 file (no options), I see TALB, TPE1, COMM, TCON, TIT2, TRCK, TYER and APIC... just not TLEN. I was suspicious of the MP3 file, but MP3TAG and Windows properties tell me the value is present in several files I've tested.

Any ideas of what I might be doing wrong? Thanks in advance.

@Zazama
Copy link
Owner

Zazama commented Oct 27, 2021

Hey, can you provide me an mp3 file that works in Mp3tag but not in node-id3 via mail to jan.metzger@gmx.net?

@Zazama
Copy link
Owner

Zazama commented Dec 4, 2021

If someone has the same problem:

What you can see in MP3Tag and other tools is the length that they read from the MP3 audio data itself. Basically, in every mp3 file, you can prepend an ID3 tag with information about it to the audio data, but both of them are completely seperate things. NodeID3 reads information in the ID3 tag, which most of the time has no length stored in it. Tools like MP3Tag etc. can also read the audio data and calculate the length from that, which is what you see there.

If you need a node library for reading/calculating audio duration, I can recommend you music-metadata (https://github.com/borewit/music-metadata). It can also read ID3 data at the same time if you don't need write support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants