问题描述
我想通过带有ffmpeg的RTP将32通道的麦克风(音频接口/混音器)作为单声道音频流化。
当前我正在使用此
:ffmpeg -f avfoundation -v info -i ":${DEVICE}" -map "0:a:0" \
-acodec libopus -ab 48k -ac 1 -ar 48000 \
-f tee "[select=a:f=rtp:ssrc=1111:payload_type=100]rtp://0.0.0.0:49386?rtcpport=59871"
我正在使用以下设备:
ffmpeg -list_devices true -f avfoundation -i ""
它对于具有正常频道数的设备运行良好。但是对于具有32个通道的设备,我会遇到以下错误:
[auto_resampler_0 @ 0x7fc6f7d1d340] [SWR @ 0x7fc6fa4f8000] Rematrix is needed between 64 channels and mono but there is not enough @R_809_4045@ion to do it
[auto_resampler_0 @ 0x7fc6f7d1d340] Failed to configure output pad on auto_resampler_0
尝试使用Channelmap后,我的错误开始于9个或更多通道。甚至可以将32个通道与ffmpeg合并,并通过RTP以单声道发送麦克风吗?
解决方法
我自己找到了解决方案。您可以使用ffmpeg中的pan过滤器,例如:
-filter_complex "pan=1c|c0=c1+c2+c3+..."