drewnoakes / metadata-extractor

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Apache License 2.0
2.56k stars 480 forks source link

Support MP3 duration #492

Open loriling opened 4 years ago

loriling commented 4 years ago

When I try to detect mp3 file to get its duration, I print out all the tags but not found a duration info tag.

MP3 Directory (8 tags) ID - 1 - MPEG-1 Layer - 2 - Layer III Bitrate - 3 - 128 Frequency - 4 - 44100 Mode - 5 - Joint stereo Copyright - 7 - False Emphasis Method - 6 - none Frame Size - 8 - 417 bytes

File Type Directory (4 tags) Detected File Type Name - 1 - MP3 Detected File Type Long Name - 2 - MPEG Audio Layer III Detected MIME Type - 3 - audio/mpeg Expected File Name Extension - 4 - mp3

drewnoakes commented 4 years ago

The library does not currently support duration.

https://github.com/drewnoakes/metadata-extractor/blob/master/Source/com/drew/metadata/mp3/Mp3Directory.java

sirajahmadzai commented 2 weeks ago

Hello, does the library still not support duration? I also noticed I am getting a null Bitrate? Is that how it is supposed to work?