[Libav-user] libavcodec: Reading fine-grained AAC channel layout
Peter Krefting
peter at softwolves.pp.se
Wed Dec 4 07:59:44 EET 2019
Hi!
I am trying to use libavcodec and libavutil to read the channel layout from two
different AAC stream, which are signalled according to the ARIB STD-B32 Part 2
[1]. The first stream has the channel configuration set to 2 ("2ch"), which
show up just fine as "stereo" when calling av_bprint_channel_layout().
However, the other stream has the channel configuration set to 0 and uses the
program config element to set up a "dual mono" stream by giving me a front left
and front right channel encoded as two different single channel elements (this
is from my trace printouts added to aacdec_template.c):
e2c_vec[0] = { left, SCE, elem_id = 0, aac_pos = 1 }
e2c_vec[1] = { right, SCE, elem_id = 0, aac_pos = 1 }
FFmpeg tells me "stereo" for av_bprint_channel_layout() for this mapping as
well, which I can understand why. Is there any API I can call to check the
number of input channels (to return 1 for the CPE stereo and 2 for the SCE
dual-mono), to distinguish between the two?
[1] http://www.arib.or.jp/english/html/overview/doc/6-STD-B32v3_11-2p3-E1.pdf
--
\\// Peter - http://www.softwolves.pp.se/
More information about the Libav-user
mailing list