FFMPEG: Properly sidechain_compress stereo background with stereo sidechain into stereo output
I'm doing voiceover and since Sony Vegas does not support sidechaining, I render voiceover into voices.wav and then use sidechain_compress filter, as per ffmpeg documentation:
ffmpeg -y -i background.m4a -i voices.wav -filter_complex
"[1:a]asplit=2[sc][mix];
[0:a][sc]sidechaincompress=threshold=0.015:ratio=2:level_sc=0.8:release=500:attack=1[compr];
[compr][mix]amerge" sidechain_1.wav
voices.wav is a stereo audio file, as well as background.m4a. But here's how the result file looks like when loaded into Sony Vegas:

This shows that in channels 1/2 I get the compressed background, while in channel 3 and 4 I get two mono tracks that somehow differ (probably, that's the original voices input and somewhat altered voices input, both in mono). UPD: I don't want to further process resulting tracks in Sony Vegas, I'd prefer ffmpeg to be the last step in my production process. The screenshot above is for illustration purposes only.
- Is the background gets sidechain compressed with only left or right channel of voices? If so, how to change that to make it compressed by both channels (some voices are panned into left or right, so there might be actual difference in compressed result)
- What are those channels 3 and 4? Why are they mono?
- How do I get single 1/2 stereo track in the output wav file instead of this weird 4 channels in 3 tracks? (I've looked at pan complex filter, but didn't figure out how to set it up in my case).
audio filter ffmpeg
add a comment |
I'm doing voiceover and since Sony Vegas does not support sidechaining, I render voiceover into voices.wav and then use sidechain_compress filter, as per ffmpeg documentation:
ffmpeg -y -i background.m4a -i voices.wav -filter_complex
"[1:a]asplit=2[sc][mix];
[0:a][sc]sidechaincompress=threshold=0.015:ratio=2:level_sc=0.8:release=500:attack=1[compr];
[compr][mix]amerge" sidechain_1.wav
voices.wav is a stereo audio file, as well as background.m4a. But here's how the result file looks like when loaded into Sony Vegas:

This shows that in channels 1/2 I get the compressed background, while in channel 3 and 4 I get two mono tracks that somehow differ (probably, that's the original voices input and somewhat altered voices input, both in mono). UPD: I don't want to further process resulting tracks in Sony Vegas, I'd prefer ffmpeg to be the last step in my production process. The screenshot above is for illustration purposes only.
- Is the background gets sidechain compressed with only left or right channel of voices? If so, how to change that to make it compressed by both channels (some voices are panned into left or right, so there might be actual difference in compressed result)
- What are those channels 3 and 4? Why are they mono?
- How do I get single 1/2 stereo track in the output wav file instead of this weird 4 channels in 3 tracks? (I've looked at pan complex filter, but didn't figure out how to set it up in my case).
audio filter ffmpeg
add a comment |
I'm doing voiceover and since Sony Vegas does not support sidechaining, I render voiceover into voices.wav and then use sidechain_compress filter, as per ffmpeg documentation:
ffmpeg -y -i background.m4a -i voices.wav -filter_complex
"[1:a]asplit=2[sc][mix];
[0:a][sc]sidechaincompress=threshold=0.015:ratio=2:level_sc=0.8:release=500:attack=1[compr];
[compr][mix]amerge" sidechain_1.wav
voices.wav is a stereo audio file, as well as background.m4a. But here's how the result file looks like when loaded into Sony Vegas:

This shows that in channels 1/2 I get the compressed background, while in channel 3 and 4 I get two mono tracks that somehow differ (probably, that's the original voices input and somewhat altered voices input, both in mono). UPD: I don't want to further process resulting tracks in Sony Vegas, I'd prefer ffmpeg to be the last step in my production process. The screenshot above is for illustration purposes only.
- Is the background gets sidechain compressed with only left or right channel of voices? If so, how to change that to make it compressed by both channels (some voices are panned into left or right, so there might be actual difference in compressed result)
- What are those channels 3 and 4? Why are they mono?
- How do I get single 1/2 stereo track in the output wav file instead of this weird 4 channels in 3 tracks? (I've looked at pan complex filter, but didn't figure out how to set it up in my case).
audio filter ffmpeg
I'm doing voiceover and since Sony Vegas does not support sidechaining, I render voiceover into voices.wav and then use sidechain_compress filter, as per ffmpeg documentation:
ffmpeg -y -i background.m4a -i voices.wav -filter_complex
"[1:a]asplit=2[sc][mix];
[0:a][sc]sidechaincompress=threshold=0.015:ratio=2:level_sc=0.8:release=500:attack=1[compr];
[compr][mix]amerge" sidechain_1.wav
voices.wav is a stereo audio file, as well as background.m4a. But here's how the result file looks like when loaded into Sony Vegas:

This shows that in channels 1/2 I get the compressed background, while in channel 3 and 4 I get two mono tracks that somehow differ (probably, that's the original voices input and somewhat altered voices input, both in mono). UPD: I don't want to further process resulting tracks in Sony Vegas, I'd prefer ffmpeg to be the last step in my production process. The screenshot above is for illustration purposes only.
- Is the background gets sidechain compressed with only left or right channel of voices? If so, how to change that to make it compressed by both channels (some voices are panned into left or right, so there might be actual difference in compressed result)
- What are those channels 3 and 4? Why are they mono?
- How do I get single 1/2 stereo track in the output wav file instead of this weird 4 channels in 3 tracks? (I've looked at pan complex filter, but didn't figure out how to set it up in my case).
audio filter ffmpeg
audio filter ffmpeg
edited Jan 21 at 11:10
Eduard Sukharev
asked Jan 20 at 11:43
Eduard SukharevEduard Sukharev
5431826
5431826
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
amerge adds the channels of the inputs. amix uses the channel count of the input with the most channels. So, switch to amix.
ffmpeg -y -i background.m4a -i voices.wav -filter_complex
"[1:a]asplit=2[sc][mix];
[0:a][sc]sidechaincompress=threshold=0.015:ratio=2:level_sc=0.8:release=500:attack=1[compr];
[compr][mix]amix" sidechain_1.wav
Perhaps I put it the wrong way: I use Vegas for editing, then export voices as separate track to sidechain compress the original background. But I don't want to create new or otherwise alter the original vegas project, I'd prefer ffmpeg to be the last step. The actual last step will be the script that uses ffmpeg to combine muted HD source with voiceovered audio track.
– Eduard Sukharev
Jan 21 at 6:57
Modified command.
– Gyan
Jan 21 at 7:28
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54276085%2fffmpeg-properly-sidechain-compress-stereo-background-with-stereo-sidechain-into%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
amerge adds the channels of the inputs. amix uses the channel count of the input with the most channels. So, switch to amix.
ffmpeg -y -i background.m4a -i voices.wav -filter_complex
"[1:a]asplit=2[sc][mix];
[0:a][sc]sidechaincompress=threshold=0.015:ratio=2:level_sc=0.8:release=500:attack=1[compr];
[compr][mix]amix" sidechain_1.wav
Perhaps I put it the wrong way: I use Vegas for editing, then export voices as separate track to sidechain compress the original background. But I don't want to create new or otherwise alter the original vegas project, I'd prefer ffmpeg to be the last step. The actual last step will be the script that uses ffmpeg to combine muted HD source with voiceovered audio track.
– Eduard Sukharev
Jan 21 at 6:57
Modified command.
– Gyan
Jan 21 at 7:28
add a comment |
amerge adds the channels of the inputs. amix uses the channel count of the input with the most channels. So, switch to amix.
ffmpeg -y -i background.m4a -i voices.wav -filter_complex
"[1:a]asplit=2[sc][mix];
[0:a][sc]sidechaincompress=threshold=0.015:ratio=2:level_sc=0.8:release=500:attack=1[compr];
[compr][mix]amix" sidechain_1.wav
Perhaps I put it the wrong way: I use Vegas for editing, then export voices as separate track to sidechain compress the original background. But I don't want to create new or otherwise alter the original vegas project, I'd prefer ffmpeg to be the last step. The actual last step will be the script that uses ffmpeg to combine muted HD source with voiceovered audio track.
– Eduard Sukharev
Jan 21 at 6:57
Modified command.
– Gyan
Jan 21 at 7:28
add a comment |
amerge adds the channels of the inputs. amix uses the channel count of the input with the most channels. So, switch to amix.
ffmpeg -y -i background.m4a -i voices.wav -filter_complex
"[1:a]asplit=2[sc][mix];
[0:a][sc]sidechaincompress=threshold=0.015:ratio=2:level_sc=0.8:release=500:attack=1[compr];
[compr][mix]amix" sidechain_1.wav
amerge adds the channels of the inputs. amix uses the channel count of the input with the most channels. So, switch to amix.
ffmpeg -y -i background.m4a -i voices.wav -filter_complex
"[1:a]asplit=2[sc][mix];
[0:a][sc]sidechaincompress=threshold=0.015:ratio=2:level_sc=0.8:release=500:attack=1[compr];
[compr][mix]amix" sidechain_1.wav
edited Jan 21 at 7:28
answered Jan 20 at 12:46
GyanGyan
32.2k22869
32.2k22869
Perhaps I put it the wrong way: I use Vegas for editing, then export voices as separate track to sidechain compress the original background. But I don't want to create new or otherwise alter the original vegas project, I'd prefer ffmpeg to be the last step. The actual last step will be the script that uses ffmpeg to combine muted HD source with voiceovered audio track.
– Eduard Sukharev
Jan 21 at 6:57
Modified command.
– Gyan
Jan 21 at 7:28
add a comment |
Perhaps I put it the wrong way: I use Vegas for editing, then export voices as separate track to sidechain compress the original background. But I don't want to create new or otherwise alter the original vegas project, I'd prefer ffmpeg to be the last step. The actual last step will be the script that uses ffmpeg to combine muted HD source with voiceovered audio track.
– Eduard Sukharev
Jan 21 at 6:57
Modified command.
– Gyan
Jan 21 at 7:28
Perhaps I put it the wrong way: I use Vegas for editing, then export voices as separate track to sidechain compress the original background. But I don't want to create new or otherwise alter the original vegas project, I'd prefer ffmpeg to be the last step. The actual last step will be the script that uses ffmpeg to combine muted HD source with voiceovered audio track.
– Eduard Sukharev
Jan 21 at 6:57
Perhaps I put it the wrong way: I use Vegas for editing, then export voices as separate track to sidechain compress the original background. But I don't want to create new or otherwise alter the original vegas project, I'd prefer ffmpeg to be the last step. The actual last step will be the script that uses ffmpeg to combine muted HD source with voiceovered audio track.
– Eduard Sukharev
Jan 21 at 6:57
Modified command.
– Gyan
Jan 21 at 7:28
Modified command.
– Gyan
Jan 21 at 7:28
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54276085%2fffmpeg-properly-sidechain-compress-stereo-background-with-stereo-sidechain-into%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown