Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAAC parsed format is missing duration property #207
Comments
Vondry
changed the title
ACC parsed format is missing duration property
AAC parsed format is missing duration property
May 2, 2019
This comment has been minimized.
This comment has been minimized.
|
@Vondry thanks for reporting this issue. Good to hear the new AAC capability is actually being used. The duration of ADTS/AAC is a bit nasty to implement (even Foobar2000 did not calculate the duration of my sample files), so I skipped it deliberately, I was curious if someone would point it out. If I implement it, the duration calculation will be expensive (will take a while to calculate), each and every ADTS frame has to be parsed. Therefor I will map the option to retrieve the duration to the |
This comment has been minimized.
This comment has been minimized.
|
Hi, thanks for such a quick reply. Let's assume small sized file, which has between 5-10Mb. I have no idea how much time it may take, but if it takes less than a second, it is OK in my case. Since I parse all files before the actual app starts and then i really need Have a nice day. :) |
This comment has been minimized.
This comment has been minimized.
I don't think so, probably a few seconds, maybe even more then 10 seconds... Sorry, these MPEG/AFTS frames which require byte-hunting are terrible inefficient to parse in JavaScript. AAC is using very small frames which makes it even worse. |
This comment has been minimized.
This comment has been minimized.
|
This performance issue should be definitively highlighted in docs with some related topic, that is for sure. My app relies on the duration. So if no duration is present, i can not properly visualize progress of current track, so it makes |
This comment has been minimized.
This comment has been minimized.
|
Because this issue is open since a long time I will give an update. So it's a lot of work, for a file format which is not very common. Once addressed it will be limited success (it will be slow) at most. Therefor it is not high on my priority list. Since there are not to many other issues, I may do fix it one day. |


Vondry commentedMay 2, 2019
•
edited
Bug description
Parsed aac file is missing duration property. Using
await parseFile(path, {duration: true});Expected behavior
I would expect to have duration property.
Audio file demonstrating the problem
(https://github.com/Borewit/music-metadata/files/3139850/NIK.TENDO.DECKY.-.Most.Wanted.x.YZOMANDIAS.OFF.VIZUAL.zip)