Re: [Cellar] Channel Positions for Multichannel LPCM Track Inside Matroska

Nithin Mathew Kurien via Matroska-devel <[email protected]> Tue, 10 May 2016 14:47:51 +0530
Newsgroups gmane.comp.multimedia.matroska.devel
Message-ID <CAC9y1U=sZRhsEvqO7B1Px8pwP8d_zU5V56d5YXubd_Y_wHomfw@mail.gmail.com>
--===============1201107214653138016==
Content-Type: multipart/alternative; boundary=001a113f45b440575f05327966ac

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

Hi,

On Sun, May 8, 2016 at 5:35 PM, Steve Lhomme <[email protected]> wrote:

> 2016-04-24 17:39 GMT+02:00 Nithin Mathew Kurien <[email protected]>:
> > 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
> https://matroska.org/technical/specs/index.html#ChannelPositions
>
> 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.
>
> https://web.archive.org/web/20071211091532/http://www.matroska.org/technical/specs/channelposition/index.html


This notation is appropriate for speaker positions in the horizontal plane,
but there is a problem. The LFE channel is omni-directional; so how do we
denote whether the LFE channel is present or not, in this notation?

> 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
> > [email protected]
> > https://www.ietf.org/mailman/listinfo/cellar
> >
>
>
>
> --
> Steve Lhomme
> Matroska association Chairman
>

Thanks and regards,
Nithin

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

<div dir=3D"ltr">Hi,<div><br></div><div class=3D"gmail_extra"><div class=3D=
"gmail_quote">On Sun, May 8, 2016 at 5:35 PM, Steve Lhomme <span dir=3D"ltr=
">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">slhomme@mat=
roska.org</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span cl=
ass=3D"">2016-04-24 17:39 GMT+02:00 Nithin Mathew Kurien &lt;<a href=3D"mai=
lto:[email protected]">[email protected]</a>&gt;:<br>
&gt; Hi,<br>
&gt;<br>
&gt; Currently the specification for storing a multichannel LPCM track (Cod=
ecID<br>
&gt; A_PCM/INT/LIT) inside a Matroska file [1, 2], does not specify a way t=
o<br>
&gt; indicate the channel positions of the track. Due to this, players find=
 it<br>
&gt; difficult to map the channels to the correct speaker positions when pl=
aying<br>
&gt; such a track. MakeMKV employs a workaround for this problem. It stores=
 the<br>
&gt; track under the CodecID A_MS/ACM, along with a WAVEFORMATEXTENSIBLE<br=
>
&gt; structure in CodecPrivate. This structure contains a field called<br>
&gt; dwChannelMask which specifies the channel positions [3]. This is ident=
ical<br>
&gt; to the way LPCM is stored inside AVI files. The problem with this appr=
oach<br>
&gt; is that most players do not recognise the CodecID A_MS/ACM, except for=
 a few<br>
&gt; open-source players like Kodi [4].<br>
<br>
</span>We used to have a field for that but it was never used AFAIK<br>
<a href=3D"https://matroska.org/technical/specs/index.html#ChannelPositions=
" rel=3D"noreferrer" target=3D"_blank">https://matroska.org/technical/specs=
/index.html#ChannelPositions</a><br>
<br>
This is how it used to be, describing each speaker position with an<br>
angle. I don&#39;t know there is a standard way to express this. I&#39;d<br=
>
assume the distance to the center should play a role too.<br>
<a href=3D"https://web.archive.org/web/20071211091532/http://www.matroska.o=
rg/technical/specs/channelposition/index.html" rel=3D"noreferrer" target=3D=
"_blank">https://web.archive.org/web/20071211091532/http://www.matroska.org=
/technical/specs/channelposition/index.html</a></blockquote><div><br></div>=
<div>This notation is appropriate for speaker positions in the horizontal p=
lane, but there is a problem. The LFE channel is omni-directional; so how d=
o we denote whether the LFE channel is present or not, in this notation?</d=
iv><div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"">&gt; In t=
he case of a FLAC track (inside either a raw .FLAC file or a .MKA file),<br=
>
&gt; we can specify an optional WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag [5]. =
Could<br>
&gt; a similar solution be implemented for LPCM inside Matroska too?<br>
&gt;<br>
&gt; On a related note, the ffmpeg documentation [6] specifies additional c=
hannel<br>
&gt; positions which are not found in the Microsoft documentation [3], like=
 Wide<br>
&gt; Left and Wide Right speakers. Are these speaker positions recognised b=
y<br>
&gt; players when reading WAV files?<br>
<br>
</span>VLC currently handles &#39;only&#39; 9 speaker positions out of the =
18 MS ones.<br>
<span class=3D""><br>
&gt; [1] <a href=3D"https://matroska.org/technical/specs/codecid/index.html=
" rel=3D"noreferrer" target=3D"_blank">https://matroska.org/technical/specs=
/codecid/index.html</a><br>
&gt; [2] <a href=3D"http://haali.su/mkv/codecs.pdf" rel=3D"noreferrer" targ=
et=3D"_blank">http://haali.su/mkv/codecs.pdf</a><br>
&gt; [3]<br>
&gt; <a href=3D"https://msdn.microsoft.com/en-us/library/windows/hardware/d=
n653308(v=3Dvs.85).aspx" rel=3D"noreferrer" target=3D"_blank">https://msdn.=
microsoft.com/en-us/library/windows/hardware/dn653308(v=3Dvs.85).aspx</a><b=
r>
&gt; [4] <a href=3D"http://www.makemkv.com/forum2/viewtopic.php?f=3D8&amp;t=
=3D2530" rel=3D"noreferrer" target=3D"_blank">http://www.makemkv.com/forum2=
/viewtopic.php?f=3D8&amp;t=3D2530</a><br>
&gt; [5] <a href=3D"https://sourceforge.net/p/mediainfo/discussion/297609/t=
hread/164b4fb3/" rel=3D"noreferrer" target=3D"_blank">https://sourceforge.n=
et/p/mediainfo/discussion/297609/thread/164b4fb3/</a><br>
&gt; [6] <a href=3D"https://ffmpeg.org/doxygen/2.2/channel__layout_8h_sourc=
e.html" rel=3D"noreferrer" target=3D"_blank">https://ffmpeg.org/doxygen/2.2=
/channel__layout_8h_source.html</a><br>
&gt;<br>
&gt; Thanks and regards,<br>
&gt; Nithin<br>
&gt;<br>
</span>&gt; _______________________________________________<br>
&gt; Cellar mailing list<br>
&gt; <a href=3D"mailto:[email protected]">[email protected]</a><br>
&gt; <a href=3D"https://www.ietf.org/mailman/listinfo/cellar" rel=3D"norefe=
rrer" target=3D"_blank">https://www.ietf.org/mailman/listinfo/cellar</a><br=
>
&gt;<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
<br>
<br>
--<br>
Steve Lhomme<br>
Matroska association Chairman<br>
</font></span></blockquote></div><br></div><div class=3D"gmail_extra">Thank=
s and regards,</div><div class=3D"gmail_extra">Nithin</div></div>

--001a113f45b440575f05327966ac--

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

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTWF0cm9za2Et
ZGV2ZWwgbWFpbGluZyBsaXN0Ck1hdHJvc2thLWRldmVsQGxpc3RzLm1hdHJvc2thLm9yZwpodHRw
czovL2xpc3RzLm1hdHJvc2thLm9yZy9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbWF0cm9za2Et
ZGV2ZWwKUmVhZCBNYXRyb3NrYS1EZXZlbCBvbiBHTWFuZTogaHR0cDovL2Rpci5nbWFuZS5vcmcv
Z21hbmUuY29tcC5tdWx0aW1lZGlhLm1hdHJvc2thLmRldmVs

--===============1201107214653138016==--