Closed fyuvb closed 2 years ago
I think there is an inconsistency in your file. At the container level, the value of channelcount
in the Sample Entry is 2. Running MP4Box(.exe) with -diso
gives the following
<MPEGAudioSampleDescriptionBox Size="90" Type="mp4a" Specification="p14" Container="stsd" DataReferenceIndex="1" SampleRate="44100" Channels="2" BitsPerSample="16">
The codecs
parameter as reported in your logs says:
RFC6381 Codec Parameters: mp4a.40.2
What is reported in:
MPEG-4 Audio AAC LC (AOT=2 implicit) - 1 Channel(s) - SampleRate 44100
is obtained by parsing the DecoderSpecificInfo which has a channelconfiguration
field set to 1, setting the channel count to 1.
mp4box.js does not go as deep as mp4box(.exe) and does not show the inconsistency.
I'm closing this issue as it does not seem to be a bug in mp4box.js.
@cconcolato @fyuvb We are also facing the similar issue and we can see this incorrect identification of channel counts in multiple videos, sharing some here for reference:
Channel count for this 5.1 but is coming as 2 https://github.com/gpac/mp4box.js/assets/148072691/fcee59e4-b76d-43f2-95af-665ac68573fb
Similary for this it should be 1 (mono) but is coming as 2 https://github.com/gpac/mp4box.js/assets/148072691/69882081-2032-4f00-974f-1d2290f2f9e4
In ffprobe it's coming correct though.
Prefer using the channel count obtained from DecoderSpecificInfo in the ESDS box.
Thank for this great project.
I was trying to use mp4box.js to do some metadata collection. However, I found that there might be something wrong with the audio channel count metadata retrieval. It seemed to me that it tend to return that there are 2 channels even it is a mono channel audio.
Here is an example:
https://user-images.githubusercontent.com/35753211/148497627-f4cf1ba8-3373-4299-8222-bdd66afb7b35.mp4
I have used local mp4box binary to check the meta and here is the output:
However, mp4box.js would give meta saying that there are two channels in audio.
Is there something I missed? Thank you so much!