gpac / mp4box.js

JavaScript version of GPAC's MP4Box tool
https://gpac.github.io/mp4box.js/
BSD 3-Clause "New" or "Revised" License
1.95k stars 330 forks source link

Wrong Audio Channel count, defaulting it to 2 #376

Open nonitasharmaMSFT opened 8 months ago

nonitasharmaMSFT commented 8 months ago

Hi Team,

We are facing an issue wherein we see an incorrect identification of channel counts in multiple videos, when we check in ffprobe, it comes correct but here in mp4box, somehow it defaults the channel count to 2

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

cc: @JenilKhandhra

hughfenghen commented 3 months ago

Prefer using the channel count obtained from DecoderSpecificInfo in the ESDS box.

https://github.com/bilibili/WebAV/blob/7694db198905e9302de33017361212a90400ef1d/packages/av-cliper/src/mp4-utils/mp4box-utils.ts#L113