我可以检测(使用 ffmpeg
或类似的东西)立体声文件的左右 2 个 channel 是否实际上相同并且文件因此是单声道的?
伪代码:
left_channel = read_left_channel_from(file)
right_channel = read_right_channel_from(file)
return left_channel.equals(right_channel)
最佳答案
反转一个 channel 的相位,然后缩混为单声道和音量检测(如果有的话):
-filter_complex "stereotools=phasel=1[tmp];[tmp]pan=1c:c0=0.5*c0+0.5*c1,volumedetect"
关于ffmpeg 检测立体声 channel 是否实际上是单声道,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54466714/