ClementBeal / audio_metadata_reader

A pure-dart audio metadata reader
MIT License
18 stars 2 forks source link

Wrong duration #12

Open Korvexx opened 2 months ago

Korvexx commented 2 months ago

I am unsure whether or not I understand the "duration" output of the readMetadata function.

The audio file (opus) has a duration of "0:02:58", but this is what I get:

File:

Ab jetzt.zip

Code:

final track = File("lib/assets/songs/Ab jetzt.opus");

final metadata = await readMetadata(track, getImage: false);

print(metadata.duration); print(metadata.duration!.inMicroseconds); print(metadata.duration!.inSeconds); print(metadata.duration!.inMinutes);

Output: Ab jetzt.zip

flutter: 0:05:58.000000 flutter: 358000000 flutter: 358 flutter: 5

Korvexx commented 2 months ago

Maybe something with the "_parseVorbicComment" function?

ClementBeal commented 2 months ago

Hi!

I dont have a solution yet. When i'm using exiftool, it cannot return a duration. I think I have an idea, let's see