wapmorgan / Mp3Info

The fastest PHP library to extract mp3 meta information (duration, bitrate, samplerate and so on) and tags (id3v1, id3v2).
https://wapmorgan.github.io/Mp3Info/
GNU Lesser General Public License v3.0
139 stars 41 forks source link

id3v1 or id3v2 not getting. #15

Closed shouvick closed 3 years ago

shouvick commented 4 years ago

after executing this : new Mp3Info($path); output is
+codecVersion: 1 +layerVersion: 3 +audioSize: 2184462 +duration: 274.33795918367 +bitRate: 64000 +sampleRate: 44100 +isVbr: false +vbrProperties: [] +channel: "stereo" +tags: [] +tags1: [] +tags2: [] +id3v2MajorVersion: null +id3v2MinorVersion: null +id3v2Flags: [] +id3v2TagsFlags: [] +_fileName: "D:\laragon\www\add-music-cms\public\images/922883200.mp3" +_fileSize: 2188626 +_framesCount: 10503.0 +_parsingTime: 0.0057120323181152 -_cbrFrameSize: 208.0 +_id3Size: 4164

But the problem is I am not getting the tags value I need song and artist information ?

wapmorgan commented 4 years ago

Can you attach the mp3?

shouvick commented 4 years ago

here is the file welcome-to-the-jungle.zip

shouvick commented 4 years ago

and also please attach any workable mp3 here in which all metadata are coming.

wapmorgan commented 4 years ago

This file has id3v2.4.0 tag, which has not been implemented. Right now I've updated mp3info to read this tag version.

Check out dev-master version and try again.

wapmorgan commented 4 years ago

Most popular tag version is 2.3.0, so a lot of mp3-files are readable. Yours is different, so I didn't read properly

sjardim commented 3 years ago

Hi @shouvick and @wapmorgan, I forked and adapted a class that can handle ID3V2.2 and V2.4 mp3 files: https://gist.github.com/sjardim/32f182be2ab11a53b07633798ada7f04

It is based on Philip Norton's originals post and gist: https://www.hashbangcode.com/article/extracting-data-mp3-php

Let me know if this is useful somehow.

Cheers, Sergio

wapmorgan commented 3 years ago

Check out 0.0.6