Eu tenho um monte de arquivos de áudio estéreo para executar algumas análises, específicas para cada canal. Atualmente, estou dividindo-os em dois arquivos (também com ffmpeg) e executando o filtro de detecção de silêncio.
$ ffmpeg -i left.wav -af silencedetect = noise = -60dB: d = 2 -f null / dev / null
$ ffmpeg -i right.wav -af silencedetect = noise = -60dB: d = 2 -f null / dev / null
Isso funciona bem, mas eu preferiria fazer isso em uma etapa:
$ ffmpeg -i stereo.wav -map_channel 0.0.0 -af silencedetect = noise = -60dB: d = 2 -f null / dev / null
$ ffmpeg -i stereo.wav -map_channel 0.0.1 -af silencedetect = noise = -60dB: d = 2 -f null / dev / null
Isso produz resultados muito diferentes:
Abordagem mono
Canal esquerdo
[silencedetect @ 0x7fe2cc5001a0] silence_start: 11.568
[silencedetect @ 0x7fe2cc5001a0] silence_end: 17.152 | silence_duration: 5.584
[silencedetect @ 0x7fe2cc5001a0] silence_start: 18.736
[silencedetect @ 0x7fe2cc5001a0] silence_end: 27.648 | silence_duration: 8.912
[silencedetect @ 0x7fe2cc5001a0] silence_start: 27.696
[silencedetect @ 0x7fe2cc5001a0] silence_end: 30.208 | silence_duration: 2.512
[silencedetect @ 0x7fe2cc5001a0] silence_start: 44.848
[silencedetect @ 0x7fe2cc5001a0] silence_end: 48.128 | silence_duration: 3.28
[silencedetect @ 0x7fe2cc5001a0] silence_start: 58.672
[silencedetect @ 0x7fe2cc5001a0] silence_end: 64.512 | silence_duration: 5.84
[silencedetect @ 0x7fe2cc5001a0] silence_start: 65.328
[silencedetect @ 0x7fe2cc5001a0] silence_end: 67.84 | silence_duration: 2.512
[silencedetect @ 0x7fe2cc5001a0] silence_start: 73.264
[silencedetect @ 0x7fe2cc5001a0] silence_end: 77.824 | silence_duration: 4.56
[silencedetect @ 0x7fe2cc5001a0] silence_start: 95.28
[silencedetect @ 0x7fe2cc5001a0] silence_end: 98.56 | silence_duration: 3.28...
Canal direito
[silencedetect @ 0x7fb2bc4010c0] silence_start: 31.536
[silencedetect @ 0x7fb2bc4010c0] silence_end: 35.584 | silence_duration: 4.048
[silencedetect @ 0x7fb2bc4010c0] silence_start: 40.24
[silencedetect @ 0x7fb2bc4010c0] silence_end: 47.36 | silence_duration: 7.12
[silencedetect @ 0x7fb2bc4010c0] silence_start: 49.968
[silencedetect @ 0x7fb2bc4010c0] silence_end: 57.6 | silence_duration: 7.632
[silencedetect @ 0x7fb2bc4010c0] silence_start: 69.68
[silencedetect @ 0x7fb2bc4010c0] silence_end: 72.448 | silence_duration: 2.768
[silencedetect @ 0x7fb2bc4010c0] silence_start: 86.064
[silencedetect @ 0x7fb2bc4010c0] silence_end: 93.184 | silence_duration: 7.12
[silencedetect @ 0x7fb2bc4010c0] silence_start: 189.744
[silencedetect @ 0x7fb2bc4010c0] silence_end: 193.024 | silence_duration: 3.28
[silencedetect @ 0x7fb2bc4010c0] silence_start: 195.632
[silencedetect @ 0x7fb2bc4010c0] silence_end: 207.104 | silence_duration: 11.472
[silencedetect @ 0x7fb2bc4010c0] silence_start: 208.944
[silencedetect @ 0x7fb2bc4010c0] silence_end: 225.024 | silence_duration: 16.08
[silencedetect @ 0x7fb2bc4010c0] silence_start: 249.648
[silencedetect @ 0x7fb2bc4010c0] silence_end: 254.72 | silence_duration: 5.072
[silencedetect @ 0x7fb2bc4010c0] silence_start: 258.608
[silencedetect @ 0x7fb2bc4010c0] silence_end: 264.448 | silence_duration: 5.84...
Estéreo
Canal esquerdo
[silencedetect @ 0x7ffe8b7009e0] silence_start: 44.976
[silencedetect @ 0x7ffe8b7009e0] silence_end: 47.36 | silence_duration: 2.384
[silencedetect @ 0x7ffe8b7009e0] silence_start: 218.416
[silencedetect @ 0x7ffe8b7009e0] silence_end: 223.232 | silence_duration: 4.816
[silencedetect @ 0x7ffe8b7009e0] silence_start: 301.744
[silencedetect @ 0x7ffe8b7009e0] silence_end: 305.28 | silence_duration: 3.536
[silencedetect @ 0x7ffe8b7009e0] silence_start: 365.488
[silencedetect @ 0x7ffe8b7009e0] silence_end: 367.488 | silence_duration: 2
Canal direito
[silencedetect @ 0x7fb426e04500] silence_start: 44.976
[silencedetect @ 0x7fb426e04500] silence_end: 47.36 | silence_duration: 2.384
[silencedetect @ 0x7fb426e04500] silence_start: 218.416
[silencedetect @ 0x7fb426e04500] silence_end: 223.232 | silence_duration: 4.816
[silencedetect @ 0x7fb426e04500] silence_start: 301.744
[silencedetect @ 0x7fb426e04500] silence_end: 305.28 | silence_duration: 3.536
[silencedetect @ 0x7fb426e04500] silence_start: 365.488
[silencedetect @ 0x7fb426e04500] silence_end: 367.488 | silence_duration: 2
Alguém pode me apontar na direção certa?