Channel Positions for Multichannel LPCM Track Inside Matroska

Nithin Mathew Kurien via Matroska-devel <[email protected]> Sun, 24 Apr 2016 21:09:55 +0530
Newsgroups gmane.comp.multimedia.matroska.devel
Message-ID <CAC9y1Ung2W38+uhHtp4ka5GkaHH0fjJXRPK7Tx-_hCXFWfCmfQ@mail.gmail.com>
--===============7906791035584280929==
Content-Type: multipart/alternative; boundary=001a11470a7c2e49a505313cdf59

--001a11470a7c2e49a505313cdf59
Content-Type: text/plain; charset=UTF-8

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].

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?

[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

--001a11470a7c2e49a505313cdf59
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<div><br></div><div>Currently the specification for sto=
ring a multichannel LPCM track (CodecID A_PCM/INT/LIT)=C2=A0inside a Matros=
ka 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 t=
he correct speaker positions when playing such a track. MakeMKV employs a w=
orkaround for this problem. It stores the track under the CodecID A_MS/ACM,=
 along with a WAVEFORMATEXTENSIBLE structure in CodecPrivate. This structur=
e contains a field called dwChannelMask which specifies the channel positio=
ns [3]. This is identical to the way LPCM is stored inside AVI files. The p=
roblem 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].=C2=A0</div><=
div><br></div><div>In the case of a FLAC track (inside either a raw .FLAC f=
ile or a .MKA file), we can specify an optional=C2=A0WAVEFORMATEXTENSIBLE_C=
HANNEL_MASK tag [5]. Could a similar solution be implemented for LPCM insid=
e Matroska too?</div><div><br></div><div>On a related note, the ffmpeg docu=
mentation [6] specifies additional channel positions which are not found in=
 the Microsoft documentation [3], like Wide Left and Wide Right speakers. A=
re these speaker positions recognised by players when reading WAV files?</d=
iv><div><br></div><div>[1]=C2=A0<a href=3D"https://matroska.org/technical/s=
pecs/codecid/index.html" target=3D"_blank">https://matroska.org/technical/s=
pecs/codecid/index.html</a></div><div>[2]=C2=A0<a href=3D"http://haali.su/m=
kv/codecs.pdf" target=3D"_blank">http://haali.su/mkv/codecs.pdf</a></div><d=
iv>[3]=C2=A0<a href=3D"https://msdn.microsoft.com/en-us/library/windows/har=
dware/dn653308(v=3Dvs.85).aspx" target=3D"_blank">https://msdn.microsoft.co=
m/en-us/library/windows/hardware/dn653308(v=3Dvs.85).aspx</a></div><div>[4]=
=C2=A0<a href=3D"http://www.makemkv.com/forum2/viewtopic.php?f=3D8&amp;t=3D=
2530" target=3D"_blank">http://www.makemkv.com/forum2/viewtopic.php?f=3D8&a=
mp;t=3D2530</a></div><div>[5]=C2=A0<a href=3D"https://sourceforge.net/p/med=
iainfo/discussion/297609/thread/164b4fb3/" target=3D"_blank">https://source=
forge.net/p/mediainfo/discussion/297609/thread/164b4fb3/</a></div><div>[6]=
=C2=A0<a href=3D"https://ffmpeg.org/doxygen/2.2/channel__layout_8h_source.h=
tml" target=3D"_blank">https://ffmpeg.org/doxygen/2.2/channel__layout_8h_so=
urce.html</a></div><div><br></div><div>Thanks and regards,</div><div>Nithin=
</div></div>

--001a11470a7c2e49a505313cdf59--

--===============7906791035584280929==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTWF0cm9za2Et
ZGV2ZWwgbWFpbGluZyBsaXN0Ck1hdHJvc2thLWRldmVsQGxpc3RzLm1hdHJvc2thLm9yZwpodHRw
czovL2xpc3RzLm1hdHJvc2thLm9yZy9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbWF0cm9za2Et
ZGV2ZWwKUmVhZCBNYXRyb3NrYS1EZXZlbCBvbiBHTWFuZTogaHR0cDovL2Rpci5nbWFuZS5vcmcv
Z21hbmUuY29tcC5tdWx0aW1lZGlhLm1hdHJvc2thLmRldmVs

--===============7906791035584280929==--