[Matroska-devel] [Cellar] Channel Positions for Multichannel LPCM Track Inside Matroska

Steve Lhomme via Matroska-devel matroska-devel at lists.matroska.org
Sun May 8 14:05:30 CEST 2016

2016-04-24 17:39 GMT+02:00 Nithin Mathew Kurien <nithinmkurien at gmail.com>:
> Hi,
> Currently the specification for storing a multichannel LPCM track (CodecID
> A_PCM/INT/LIT) inside a Matroska file [1, 2], does not specify a way to
> indicate the channel positions of the track. Due to this, players find it
> difficult to map the channels to the correct speaker positions when playing
> such a track. MakeMKV employs a workaround for this problem. It stores the
> track under the CodecID A_MS/ACM, along with a WAVEFORMATEXTENSIBLE
> structure in CodecPrivate. This structure contains a field called
> dwChannelMask which specifies the channel positions [3]. This is identical
> to the way LPCM is stored inside AVI files. The problem with this approach
> is that most players do not recognise the CodecID A_MS/ACM, except for a few
> open-source players like Kodi [4].

We used to have a field for that but it was never used AFAIK

This is how it used to be, describing each speaker position with an
angle. I don't know there is a standard way to express this. I'd
assume the distance to the center should play a role too.

> In the case of a FLAC track (inside either a raw .FLAC file or a .MKA file),
> we can specify an optional WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag [5]. Could
> a similar solution be implemented for LPCM inside Matroska too?
> On a related note, the ffmpeg documentation [6] specifies additional channel
> positions which are not found in the Microsoft documentation [3], like Wide
> Left and Wide Right speakers. Are these speaker positions recognised by
> players when reading WAV files?

VLC currently handles 'only' 9 speaker positions out of the 18 MS ones.

> [1] https://matroska.org/technical/specs/codecid/index.html
> [2] http://haali.su/mkv/codecs.pdf
> [3]
> https://msdn.microsoft.com/en-us/library/windows/hardware/dn653308(v=vs.85).aspx
> [4] http://www.makemkv.com/forum2/viewtopic.php?f=8&t=2530
> [5] https://sourceforge.net/p/mediainfo/discussion/297609/thread/164b4fb3/
> [6] https://ffmpeg.org/doxygen/2.2/channel__layout_8h_source.html
> Thanks and regards,
> Nithin
> _______________________________________________
> Cellar mailing list
> Cellar at ietf.org
> https://www.ietf.org/mailman/listinfo/cellar

Steve Lhomme
Matroska association Chairman

More information about the Matroska-devel mailing list