node-id3: Incorrect timestamps on Syncronized lyrics

I used these settings to update syncronizedLyrics on a song.

{
                contentType: TagConstants.SynchronisedLyrics.ContentType.LYRICS,
		language: 'ENG',
		timeStampFormat: TagConstants.TimeStampFormat.MILLISECONDS,
		shortText: 'this is short text',
		synchronisedText: [
			{ text: 'Lyrics line 1', timeStamp: 12.5 },
			{ text: 'Lyrics line 2', timeStamp: 14.5 },
			{ text: 'Lyrics line 3', timeStamp: 16.5 },
			{ text: 'Lyrics line 4', timeStamp: 18.5 },
			{ text: 'Lyrics line 5', timeStamp: 20.5 },
		],
	}

But when I read the same song, I get a different output with incorrect timestamps and the last lyric line missing.

{
        language: "ENG",
        timeStampFormat: 2,
        contentType: 1,
        shortText: "this is short text",
        synchronisedText: [
          {
            text: "Lyrics line 1",
            timeStamp: 4294855680,
          },
          {
            text: "yrics line 2",
            timeStamp: 4294855680,
          },
          {
            text: "yrics line 3",
            timeStamp: 4294855680,
          },
          {
            text: "yrics line 4",
            timeStamp: 4294855680,
          },
        ],
      },

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (11 by maintainers)

Commits related to this issue

Most upvoted comments

@Sandakan thanks for reporting the bug! Thanks @Zazama for the quick fix!

@Sandakan You can update to version 0.2.6 and your problem should be fixed

https://www.npmjs.com/package/node-id3/v/0.2.6

@Zazama Thanks for the update and the quick fix. 😁😁🎉🎉

The value is not the same because timeStamp must be an integer value. If you replace your values with an integer value, the timeStamp will be correct, this will also fix the issue with the missing line.