Menerapkan saluran tertentu ke filter ffmpeg


0

Saya memiliki banyak file audio stereo untuk menjalankan beberapa analisis, khusus untuk setiap saluran. Saat ini saya membaginya menjadi dua file (juga dengan ffmpeg) dan menjalankan filter deteksi diam.

$ ffmpeg -saya.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

Ini berfungsi dengan baik tetapi saya lebih suka melakukan ini dalam satu langkah:

$ 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

Ini menghasilkan hasil yang sangat berbeda:

Pendekatan mono

Saluran kiri

[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...

Saluran yang tepat

[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...

Stereo

Saluran kiri

[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

Saluran yang tepat

[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

Adakah yang bisa mengarahkan saya ke arah yang benar?

Jawaban:


0

Apa yang dilakukan map_channel adalah menyisipkan filter pan, tetapi ia melakukan ini setelah filter audio diterapkan.

Anda harus memasukkan panci secara manual sebelumnya.

ffmpeg -i stereo.wav -af "pan=1c|c0=c0,silencedetect=noise=-60dB:d=2" -f null /dev/null

ffmpeg -i stereo.wav -af "pan=1c|c0=c1,silencedetect=noise=-60dB:d=2" -f null /dev/null
Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.