FFMPEG sidechaincompress not working as it should?
I have been trying to get sidechaining to work with FFMPEG, but my complex filter skills are lacking. I'm running two aif files into ffmpeg, hoping the voice would "duck" the background music when the voice-over is speaking. But I get an error with this command-line (on Windows, with latest FFMPEG binary): ffmpeg.exe -i temp_music.aif -i temp_voice.aif -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress=threshold=0.1:ratio=5[bg]; [bg][mix]amerge[final]" -map [final] final.mp3 Everything decodes fine: ffmpeg version N-87353-g183fd30 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.2.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib libavutil 55. 76.100 / 55. 76.100 libavcodec 57.106.101 / 57.106.101 libavformat 57. 82.101 / 57. 82.101 libavdevice 57. 8.101 / 57. 8.101 libavfilter 6.105.100 / 6.105.100 libswscale 4. 7.103 / 4. 7.103 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100 Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, aiff, from 'temp_music.aif': Duration: 00:01:26.68, start: 0.000000, bitrate: 1536 kb/s Stream #0:0: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s Guessed Channel Layout for Input Stream #1.0 : stereo Input #1, aiff, from 'temp_voice.aif': Duration: 00:01:26.68, start: 0.000000, bitrate: 1536 kb/s Stream #1:0: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s Output with label 'final' does not exist in any defined filter graph, or was already used elsewhere. But then I receive an error: Output with label 'final' does not exist in any defined filter graph, or was already used elsewhere. Anybody knows why? ᐧ
On 10/23/17, Frank @ Taapo <info@taapo.com> wrote:
I have been trying to get sidechaining to work with FFMPEG, but my complex filter skills are lacking.
I'm running two aif files into ffmpeg, hoping the voice would "duck" the background music when the voice-over is speaking. But I get an error with this command-line (on Windows, with latest FFMPEG binary):
ffmpeg.exe -i temp_music.aif -i temp_voice.aif -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress=threshold=0.1:ratio=5[bg]; [bg][mix]amerge[fin**al]" -map [final] final.mp3
Everything decodes fine:
ffmpeg version N-87353-g183fd30 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.2.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib libavutil 55. 76.100 / 55. 76.100 libavcodec 57.106.101 / 57.106.101 libavformat 57. 82.101 / 57. 82.101 libavdevice 57. 8.101 / 57. 8.101 libavfilter 6.105.100 / 6.105.100 libswscale 4. 7.103 / 4. 7.103 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100 Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, aiff, from 'temp_music.aif': Duration: 00:01:26.68, start: 0.000000, bitrate: 1536 kb/s Stream #0:0: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s Guessed Channel Layout for Input Stream #1.0 : stereo Input #1, aiff, from 'temp_voice.aif': Duration: 00:01:26.68, start: 0.000000, bitrate: 1536 kb/s Stream #1:0: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s Output with label 'final' does not exist in any defined filter graph, or was already used elsewhere.
But then I receive an error:
Output with label 'final' does not exist in any defined filter graph, or was already used elsewhere.
Anybody knows why?
outputs pads names apparently can not have more than 2 chars.
2017-10-23 7:03 GMT+02:00 Frank @ Taapo <info@taapo.com>:
ffmpeg.exe -i temp_music.aif -i temp_voice.aif -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress=threshold=0.1:ratio=5[bg];
[bg][mix]amerge[final]" -map [final] final.mp3
The letter "n" in the name of the output pad is another letter than "n" in the name of the pad you want to map - type the first "final" again. Carl Eugen
On 1/8/18, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
2017-10-23 7:03 GMT+02:00 Frank @ Taapo <info@taapo.com>:
ffmpeg.exe -i temp_music.aif -i temp_voice.aif -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress=threshold=0.1:ratio=5[bg];
[bg][mix]amerge[fin*al]" -map [final] final.mp3
The letter "n*" in the name of the output pad is another letter than "n" in the name of the pad you want to map - type the first "final" again.
LOL How something like this is even possible?
2018-01-08 8:39 GMT+01:00 Paul B Mahol <onemda@gmail.com>:
On 1/8/18, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
2017-10-23 7:03 GMT+02:00 Frank @ Taapo <info@taapo.com>:
ffmpeg.exe -i temp_music.aif -i temp_voice.aif -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress=threshold=0.1:ratio=5[bg];
[bg][mix]amerge[fin*al]" -map [final] final.mp3
The letter "n*" in the name of the output pad is another letter than "n" in the name of the pad you want to map - type the first "final" again.
LOL
(Note that it was your email / your mailer that told me, asterisks were added for the control sequences.)
How something like this is even possible?
I suspect Ctrl-something instead or before or after pressing "n", Carl Eugen
participants (3)
-
Carl Eugen Hoyos -
Frank @ Taapo -
Paul B Mahol