Closed gino0631 closed 1 year ago
The whole QuickTime format is a mess. Data can be (and often is) all over the place, often conflicting.
moov.trak[2].mdia[2].minf[2]
= 48000
moov.trak[3].mdia[2].minf[2]
= 6400/12800
I'll try taking another look at how getID3 decides which of many entries it should consider appropriate, if anyone else wants to suggest appropriate logic (that won't break all existing stuff) that'd be great too.
Cool, thanks! Yes, I know it is a mess with no consistent documentation, and really appreciate your efforts.
As for the logic, I would take a look at other tools, MediaInfo for example - I don't have an exact suggestion how to handle this particular case correctly.
The simple change I made in https://github.com/JamesHeinrich/getID3/commit/4efd6d75b396e7067b9958c6bfd12d3ad6c45a75 should fix this issue, and hopefully not break other things.
QuickTime audio metadata (sample rate, bit depth, channels) is incorrect for some MP4 files, for instance, with the sample in the original issue gino0631/nextcloud-metadata#96 getID3 (verified with the latest release v1.9.22) reports:
The expected values are:
The sample is here.