[vlc-devel] [RFC v2 0/3] let VLC decode more than 9 audio channels
egrange at gopro.com
Mon Oct 12 18:02:36 CEST 2015
VLC has an hardcoded limit (AOUT_CHAN_MAX=9) determining how many audio channels
can be decoded and processed.
Increasing this limit alone works for some particular use cases, eg: using libvlc
to decode PCM files with 16 channels, getting the decoded samples through
vlc_player_audiocallback() and outputting them with third party libraries.
However a audio filters and mixer will not be able to take advantage after the
These channels doesn't have to correspond to "real" output speakers, so the code
related to new speakers from the WAVE_FORMAT_PCM is just here to avoid VLC
segfaulting when playing these files directly.
As said by JB, more than 9 channels coded into a PCM file will mostly means we
have "object-based audio" (with Dolby Atmos) or "Scene-based audio" (with MPEG-H).
These channels can be fully re-spatialized (with the use of Higher Order Ambisonics,
very usefull for VR) or can be individually selected (prefered language, commentary...).
These object-based stream are made to be downmixed to "consumer grade" equipment,
from stereo headphones up to 10.1 speakers (I think the best Dolby amplifier has
12 channels) while still retaining the advantages of the high number of audio object
(MPEG-H and Dolby Auros mention up to 128 objects).
Thank you Ilkka, JB and Remis for reviewing the first patch. The V2 has:
- A bit more context
- Speaker order has been modified, fix the AOUT_CHAN_PHYSMASK and the part dealing
with channel limits in the decoders has been split.
- I set the new limit to 18 channels (to match with WAVEFORMATEXTENSIBLE structure)
but why not push it directly to 32?
More information about the vlc-devel