2.1 downmix with libfdk_aac using ffmpeg
I have several input media files I'd like to process. The input audio stream of each file is encoded in ac-3 with a 5.1 channel layout (back or side) at 384kbps.
The objective is for the target media file to contain a downmixed audio stream converted to 2.1 channel layout (at 192kbps) in aac format!
I use ffmpeg for the entire process and I can achieve the objective using the following parameters:
ffmpeg -i infile.mp4 -vn -c:a aac -b:a 192k -filter_complex "pan=2.1|FL<c0+c2+c4|FR<c1+c2+c5|LFE=c2" outfile.m4a
The resulting audio file has the following properties:
Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 2.1, fltp, 192 kb/s (default)
However(!) if I use libfdk_aac
instead, I end up with a stereo file and the LFE channel being dropped:
Stream #0:0: Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 192 kb/s (default)
How do I encode the audio stream using libfdk_aac without dropping the LFE channel?
The result is the same when using automatic channel mapping. The following command produces a 2.1 audio stream when using aac
instead of libfdk_aac
as audio codec option:
ffmpeg -y -i infile.mp4 -vn -c:a aac -b:a 192k -af pan=2.1 test.m4a
For the sake of this questions I neglect all properties of the source video material as I am convinced it is not important to the answer of the question.
ffmpeg aac
add a comment |
I have several input media files I'd like to process. The input audio stream of each file is encoded in ac-3 with a 5.1 channel layout (back or side) at 384kbps.
The objective is for the target media file to contain a downmixed audio stream converted to 2.1 channel layout (at 192kbps) in aac format!
I use ffmpeg for the entire process and I can achieve the objective using the following parameters:
ffmpeg -i infile.mp4 -vn -c:a aac -b:a 192k -filter_complex "pan=2.1|FL<c0+c2+c4|FR<c1+c2+c5|LFE=c2" outfile.m4a
The resulting audio file has the following properties:
Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 2.1, fltp, 192 kb/s (default)
However(!) if I use libfdk_aac
instead, I end up with a stereo file and the LFE channel being dropped:
Stream #0:0: Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 192 kb/s (default)
How do I encode the audio stream using libfdk_aac without dropping the LFE channel?
The result is the same when using automatic channel mapping. The following command produces a 2.1 audio stream when using aac
instead of libfdk_aac
as audio codec option:
ffmpeg -y -i infile.mp4 -vn -c:a aac -b:a 192k -af pan=2.1 test.m4a
For the sake of this questions I neglect all properties of the source video material as I am convinced it is not important to the answer of the question.
ffmpeg aac
In this post, I don't see 2.1 as listed format supported bylibfdk_aac
: wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC
– der_michael
Jan 8 at 4:41
add a comment |
I have several input media files I'd like to process. The input audio stream of each file is encoded in ac-3 with a 5.1 channel layout (back or side) at 384kbps.
The objective is for the target media file to contain a downmixed audio stream converted to 2.1 channel layout (at 192kbps) in aac format!
I use ffmpeg for the entire process and I can achieve the objective using the following parameters:
ffmpeg -i infile.mp4 -vn -c:a aac -b:a 192k -filter_complex "pan=2.1|FL<c0+c2+c4|FR<c1+c2+c5|LFE=c2" outfile.m4a
The resulting audio file has the following properties:
Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 2.1, fltp, 192 kb/s (default)
However(!) if I use libfdk_aac
instead, I end up with a stereo file and the LFE channel being dropped:
Stream #0:0: Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 192 kb/s (default)
How do I encode the audio stream using libfdk_aac without dropping the LFE channel?
The result is the same when using automatic channel mapping. The following command produces a 2.1 audio stream when using aac
instead of libfdk_aac
as audio codec option:
ffmpeg -y -i infile.mp4 -vn -c:a aac -b:a 192k -af pan=2.1 test.m4a
For the sake of this questions I neglect all properties of the source video material as I am convinced it is not important to the answer of the question.
ffmpeg aac
I have several input media files I'd like to process. The input audio stream of each file is encoded in ac-3 with a 5.1 channel layout (back or side) at 384kbps.
The objective is for the target media file to contain a downmixed audio stream converted to 2.1 channel layout (at 192kbps) in aac format!
I use ffmpeg for the entire process and I can achieve the objective using the following parameters:
ffmpeg -i infile.mp4 -vn -c:a aac -b:a 192k -filter_complex "pan=2.1|FL<c0+c2+c4|FR<c1+c2+c5|LFE=c2" outfile.m4a
The resulting audio file has the following properties:
Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 2.1, fltp, 192 kb/s (default)
However(!) if I use libfdk_aac
instead, I end up with a stereo file and the LFE channel being dropped:
Stream #0:0: Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 192 kb/s (default)
How do I encode the audio stream using libfdk_aac without dropping the LFE channel?
The result is the same when using automatic channel mapping. The following command produces a 2.1 audio stream when using aac
instead of libfdk_aac
as audio codec option:
ffmpeg -y -i infile.mp4 -vn -c:a aac -b:a 192k -af pan=2.1 test.m4a
For the sake of this questions I neglect all properties of the source video material as I am convinced it is not important to the answer of the question.
ffmpeg aac
ffmpeg aac
asked Jan 8 at 4:40
der_michaelder_michael
2910
2910
In this post, I don't see 2.1 as listed format supported bylibfdk_aac
: wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC
– der_michael
Jan 8 at 4:41
add a comment |
In this post, I don't see 2.1 as listed format supported bylibfdk_aac
: wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC
– der_michael
Jan 8 at 4:41
In this post, I don't see 2.1 as listed format supported by
libfdk_aac
: wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC– der_michael
Jan 8 at 4:41
In this post, I don't see 2.1 as listed format supported by
libfdk_aac
: wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC– der_michael
Jan 8 at 4:41
add a comment |
1 Answer
1
active
oldest
votes
libfdk_aac doesn't support the 2.1 channel layout:
$ ffmpeg -h encoder=libfdk_aac
[...]
Encoder libfdk_aac [Fraunhofer FDK AAC]:
Supported channel layouts: mono stereo 3.0 4.0 5.0 5.1 7.1(wide) 7.1
You'll have to use a supported layout or use a different encoder instead, such as -c:a aac
as you mentioned.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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%2fsuperuser.com%2fquestions%2f1391754%2f2-1-downmix-with-libfdk-aac-using-ffmpeg%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
libfdk_aac doesn't support the 2.1 channel layout:
$ ffmpeg -h encoder=libfdk_aac
[...]
Encoder libfdk_aac [Fraunhofer FDK AAC]:
Supported channel layouts: mono stereo 3.0 4.0 5.0 5.1 7.1(wide) 7.1
You'll have to use a supported layout or use a different encoder instead, such as -c:a aac
as you mentioned.
add a comment |
libfdk_aac doesn't support the 2.1 channel layout:
$ ffmpeg -h encoder=libfdk_aac
[...]
Encoder libfdk_aac [Fraunhofer FDK AAC]:
Supported channel layouts: mono stereo 3.0 4.0 5.0 5.1 7.1(wide) 7.1
You'll have to use a supported layout or use a different encoder instead, such as -c:a aac
as you mentioned.
add a comment |
libfdk_aac doesn't support the 2.1 channel layout:
$ ffmpeg -h encoder=libfdk_aac
[...]
Encoder libfdk_aac [Fraunhofer FDK AAC]:
Supported channel layouts: mono stereo 3.0 4.0 5.0 5.1 7.1(wide) 7.1
You'll have to use a supported layout or use a different encoder instead, such as -c:a aac
as you mentioned.
libfdk_aac doesn't support the 2.1 channel layout:
$ ffmpeg -h encoder=libfdk_aac
[...]
Encoder libfdk_aac [Fraunhofer FDK AAC]:
Supported channel layouts: mono stereo 3.0 4.0 5.0 5.1 7.1(wide) 7.1
You'll have to use a supported layout or use a different encoder instead, such as -c:a aac
as you mentioned.
answered Jan 10 at 18:03
lloganllogan
25.4k54679
25.4k54679
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- 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%2fsuperuser.com%2fquestions%2f1391754%2f2-1-downmix-with-libfdk-aac-using-ffmpeg%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
In this post, I don't see 2.1 as listed format supported by
libfdk_aac
: wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC– der_michael
Jan 8 at 4:41