Closed ptrzs3 closed 2 months ago
Add supplementary note
const mm = await parseFile(this.filePath, { duration: true })
Would love to see lyrics support! It's an official ID3 tag.
There is some lyrics support present, including the ID3v2 / ID3v2 SYLT tag.
Unit test covering this: https://github.com/Borewit/music-metadata/blob/ca9870493a1a286b22a5a049a0c97fdfb281277f/test/test-id3v2-lyrics.ts#L17-L20
Tag mapping (I know, very hard to scroll to the right side of the table): here.
But there maybe lyric standards which are not support yet, such as Lyrics3 v2.00, which I believe is requested here: Borewit/music-metadata#264.
Interesting. I can't tell what version of lyrics kid3 is using, but see the screenshot below:
And (surprisingly) ffprobe
can detect this too:
Input #0, wav, from 'quiet.wav':
Metadata:
genre : Ambient
creation_time : 10:54:55
time_reference : 283583
umid : 0xBB6126C10EAD442384B897E045E2CC3200000000000000000000000000000000
title : Test Track
artist : Sam Hulick
album : Album Name
track : 1
lyrics-eng : Hello hello!
date : 2023
And actually, I do see lyrics in music-metadata
's output! Just not where I thought it would be (under a USLT
tag in native
):
{
native: {
'ID3v2.3': [
{ id: 'TIT2', value: 'Test Track' },
{ id: 'TPE1', value: 'Sam Hulick' },
{ id: 'TALB', value: 'Album Name' },
{ id: 'TRCK', value: '1' },
{
id: 'USLT',
value: { language: 'eng', description: '', text: 'Hello hello!' }
},
{ id: 'TYER', value: '2023' },
{ id: 'TCON', value: 'Ambient' }
]
},
So this really isn't a big issue. It would be nice if it appeared under common
for easy access, but it's just a nice-to-have.
Seems that an attempt to map USLT
had defined, but was never really implemented properly.
Adding support for SYLT
frame as well here: #2159
If there are other types of lyrics, please open issue, and provide solid sample data. Preferable very small samples.
Has the question been asked before?
Question
I searched existed questions to find out if music-metadata support parse embeded lyrics while there isn't results. code like this below,
this.lyrics
is always null while the.mp3
file does exist embeded lyrics:To avoid the
.mp3
file is broken, I tried other npm library like id3-parser, it can parse the embeded lyrics