24 bit libfdk_aac audio with ffmpeg
I would like to ask why ffmpeg's libfdk_aac
encoder is automatically downsampling my audio's bit depth when encoding and I want to know how to stop it.
My encoding is as such (all data is there, except for metadata & file paths):
ffmpeg -i "/Path/To/Input.flac" -c:a libfdk_aac -b:a 192k -ar 48000 -map_metadata -1 -metadata title="Title" -metadata artist="Artist" -metadata date="Date" "/Path/To/Output.m4a"
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.10.44.4)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-opencl --enable-videotoolbox --enable-nonfree
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, flac, from '/Path/To/Input.flac':
Duration: 00:31:31.71, start: 0.000000, bitrate: 4721 kb/s
Stream #0:0: Audio: flac, 192000 Hz, stereo, s32 (24 bit)
Stream mapping:
Stream #0:0 -> #0:0 (flac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
Output #0, ipod, to '/Path/To/Output.m4a':
Metadata:
title : Title
artist : Artist
date : Date
encoder : Lavf58.20.100
Stream #0:0: Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 192 kb/s
Metadata:
encoder : Lavc58.35.100 libfdk_aac
[NULL @ 0x7fb747801000] sample/frame number mismatch in adjacent frames
size= 44686kB time=00:31:31.71 bitrate= 193.5kbits/s speed=22.2x
video:0kB audio:44338kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.784360%
No problems with encoding... (I simply encode to AAC, set bitrate to 192kbps, and downsample to 48000 kHz) except that for some reason, the bit depth is downsampled to 16 bit when encoding from a 24 bit source. I know the libfdk_aac
encoder supports 24 bit, but for some reason, the encoder auto-downsamples. I have attempted to force 24 bit, with -sample_fmt s32
but that returned with this error:
[libfdk_aac @ 0x7fc58100b200] Specified sample format s32 is invalid or not supported
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
If anyone knows, I'd greatly appreciate a response.
audio ffmpeg encoding
add a comment |
I would like to ask why ffmpeg's libfdk_aac
encoder is automatically downsampling my audio's bit depth when encoding and I want to know how to stop it.
My encoding is as such (all data is there, except for metadata & file paths):
ffmpeg -i "/Path/To/Input.flac" -c:a libfdk_aac -b:a 192k -ar 48000 -map_metadata -1 -metadata title="Title" -metadata artist="Artist" -metadata date="Date" "/Path/To/Output.m4a"
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.10.44.4)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-opencl --enable-videotoolbox --enable-nonfree
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, flac, from '/Path/To/Input.flac':
Duration: 00:31:31.71, start: 0.000000, bitrate: 4721 kb/s
Stream #0:0: Audio: flac, 192000 Hz, stereo, s32 (24 bit)
Stream mapping:
Stream #0:0 -> #0:0 (flac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
Output #0, ipod, to '/Path/To/Output.m4a':
Metadata:
title : Title
artist : Artist
date : Date
encoder : Lavf58.20.100
Stream #0:0: Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 192 kb/s
Metadata:
encoder : Lavc58.35.100 libfdk_aac
[NULL @ 0x7fb747801000] sample/frame number mismatch in adjacent frames
size= 44686kB time=00:31:31.71 bitrate= 193.5kbits/s speed=22.2x
video:0kB audio:44338kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.784360%
No problems with encoding... (I simply encode to AAC, set bitrate to 192kbps, and downsample to 48000 kHz) except that for some reason, the bit depth is downsampled to 16 bit when encoding from a 24 bit source. I know the libfdk_aac
encoder supports 24 bit, but for some reason, the encoder auto-downsamples. I have attempted to force 24 bit, with -sample_fmt s32
but that returned with this error:
[libfdk_aac @ 0x7fc58100b200] Specified sample format s32 is invalid or not supported
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
If anyone knows, I'd greatly appreciate a response.
audio ffmpeg encoding
add a comment |
I would like to ask why ffmpeg's libfdk_aac
encoder is automatically downsampling my audio's bit depth when encoding and I want to know how to stop it.
My encoding is as such (all data is there, except for metadata & file paths):
ffmpeg -i "/Path/To/Input.flac" -c:a libfdk_aac -b:a 192k -ar 48000 -map_metadata -1 -metadata title="Title" -metadata artist="Artist" -metadata date="Date" "/Path/To/Output.m4a"
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.10.44.4)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-opencl --enable-videotoolbox --enable-nonfree
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, flac, from '/Path/To/Input.flac':
Duration: 00:31:31.71, start: 0.000000, bitrate: 4721 kb/s
Stream #0:0: Audio: flac, 192000 Hz, stereo, s32 (24 bit)
Stream mapping:
Stream #0:0 -> #0:0 (flac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
Output #0, ipod, to '/Path/To/Output.m4a':
Metadata:
title : Title
artist : Artist
date : Date
encoder : Lavf58.20.100
Stream #0:0: Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 192 kb/s
Metadata:
encoder : Lavc58.35.100 libfdk_aac
[NULL @ 0x7fb747801000] sample/frame number mismatch in adjacent frames
size= 44686kB time=00:31:31.71 bitrate= 193.5kbits/s speed=22.2x
video:0kB audio:44338kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.784360%
No problems with encoding... (I simply encode to AAC, set bitrate to 192kbps, and downsample to 48000 kHz) except that for some reason, the bit depth is downsampled to 16 bit when encoding from a 24 bit source. I know the libfdk_aac
encoder supports 24 bit, but for some reason, the encoder auto-downsamples. I have attempted to force 24 bit, with -sample_fmt s32
but that returned with this error:
[libfdk_aac @ 0x7fc58100b200] Specified sample format s32 is invalid or not supported
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
If anyone knows, I'd greatly appreciate a response.
audio ffmpeg encoding
I would like to ask why ffmpeg's libfdk_aac
encoder is automatically downsampling my audio's bit depth when encoding and I want to know how to stop it.
My encoding is as such (all data is there, except for metadata & file paths):
ffmpeg -i "/Path/To/Input.flac" -c:a libfdk_aac -b:a 192k -ar 48000 -map_metadata -1 -metadata title="Title" -metadata artist="Artist" -metadata date="Date" "/Path/To/Output.m4a"
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.10.44.4)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-opencl --enable-videotoolbox --enable-nonfree
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, flac, from '/Path/To/Input.flac':
Duration: 00:31:31.71, start: 0.000000, bitrate: 4721 kb/s
Stream #0:0: Audio: flac, 192000 Hz, stereo, s32 (24 bit)
Stream mapping:
Stream #0:0 -> #0:0 (flac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
Output #0, ipod, to '/Path/To/Output.m4a':
Metadata:
title : Title
artist : Artist
date : Date
encoder : Lavf58.20.100
Stream #0:0: Audio: aac (libfdk_aac) (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 192 kb/s
Metadata:
encoder : Lavc58.35.100 libfdk_aac
[NULL @ 0x7fb747801000] sample/frame number mismatch in adjacent frames
size= 44686kB time=00:31:31.71 bitrate= 193.5kbits/s speed=22.2x
video:0kB audio:44338kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.784360%
No problems with encoding... (I simply encode to AAC, set bitrate to 192kbps, and downsample to 48000 kHz) except that for some reason, the bit depth is downsampled to 16 bit when encoding from a 24 bit source. I know the libfdk_aac
encoder supports 24 bit, but for some reason, the encoder auto-downsamples. I have attempted to force 24 bit, with -sample_fmt s32
but that returned with this error:
[libfdk_aac @ 0x7fc58100b200] Specified sample format s32 is invalid or not supported
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
If anyone knows, I'd greatly appreciate a response.
audio ffmpeg encoding
audio ffmpeg encoding
asked Dec 7 '18 at 1:12
Henry7720
84
84
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I'm afraid not. The encoded output will decode to floating-point samples but the library only accepts 16-bit samples as input.
This answer is seemingly off topic; the question is why is thelibfdk_aac
encoder downsampling the bit depth to 16-bit and how do I solve it? I am aware that there is no issue with ffmpeg's built-inaac
encoder. I just want to know if it's possible to encode 24-bit AAC withlibfdk_aac
.
– Henry7720
Dec 8 '18 at 4:17
FDK isn't downsampling anything - the library only accepts 16-bit PCM samples as input. What is unclear?
– Gyan
Dec 8 '18 at 4:33
ffmpeg's command line is nicely confusing. But I've checked and it seems the file actually is 24-bit. Thank you for your help.
– Henry7720
Dec 8 '18 at 4:49
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%2f1381511%2f24-bit-libfdk-aac-audio-with-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
I'm afraid not. The encoded output will decode to floating-point samples but the library only accepts 16-bit samples as input.
This answer is seemingly off topic; the question is why is thelibfdk_aac
encoder downsampling the bit depth to 16-bit and how do I solve it? I am aware that there is no issue with ffmpeg's built-inaac
encoder. I just want to know if it's possible to encode 24-bit AAC withlibfdk_aac
.
– Henry7720
Dec 8 '18 at 4:17
FDK isn't downsampling anything - the library only accepts 16-bit PCM samples as input. What is unclear?
– Gyan
Dec 8 '18 at 4:33
ffmpeg's command line is nicely confusing. But I've checked and it seems the file actually is 24-bit. Thank you for your help.
– Henry7720
Dec 8 '18 at 4:49
add a comment |
I'm afraid not. The encoded output will decode to floating-point samples but the library only accepts 16-bit samples as input.
This answer is seemingly off topic; the question is why is thelibfdk_aac
encoder downsampling the bit depth to 16-bit and how do I solve it? I am aware that there is no issue with ffmpeg's built-inaac
encoder. I just want to know if it's possible to encode 24-bit AAC withlibfdk_aac
.
– Henry7720
Dec 8 '18 at 4:17
FDK isn't downsampling anything - the library only accepts 16-bit PCM samples as input. What is unclear?
– Gyan
Dec 8 '18 at 4:33
ffmpeg's command line is nicely confusing. But I've checked and it seems the file actually is 24-bit. Thank you for your help.
– Henry7720
Dec 8 '18 at 4:49
add a comment |
I'm afraid not. The encoded output will decode to floating-point samples but the library only accepts 16-bit samples as input.
I'm afraid not. The encoded output will decode to floating-point samples but the library only accepts 16-bit samples as input.
answered Dec 7 '18 at 4:46
Gyan
14.5k21745
14.5k21745
This answer is seemingly off topic; the question is why is thelibfdk_aac
encoder downsampling the bit depth to 16-bit and how do I solve it? I am aware that there is no issue with ffmpeg's built-inaac
encoder. I just want to know if it's possible to encode 24-bit AAC withlibfdk_aac
.
– Henry7720
Dec 8 '18 at 4:17
FDK isn't downsampling anything - the library only accepts 16-bit PCM samples as input. What is unclear?
– Gyan
Dec 8 '18 at 4:33
ffmpeg's command line is nicely confusing. But I've checked and it seems the file actually is 24-bit. Thank you for your help.
– Henry7720
Dec 8 '18 at 4:49
add a comment |
This answer is seemingly off topic; the question is why is thelibfdk_aac
encoder downsampling the bit depth to 16-bit and how do I solve it? I am aware that there is no issue with ffmpeg's built-inaac
encoder. I just want to know if it's possible to encode 24-bit AAC withlibfdk_aac
.
– Henry7720
Dec 8 '18 at 4:17
FDK isn't downsampling anything - the library only accepts 16-bit PCM samples as input. What is unclear?
– Gyan
Dec 8 '18 at 4:33
ffmpeg's command line is nicely confusing. But I've checked and it seems the file actually is 24-bit. Thank you for your help.
– Henry7720
Dec 8 '18 at 4:49
This answer is seemingly off topic; the question is why is the
libfdk_aac
encoder downsampling the bit depth to 16-bit and how do I solve it? I am aware that there is no issue with ffmpeg's built-in aac
encoder. I just want to know if it's possible to encode 24-bit AAC with libfdk_aac
.– Henry7720
Dec 8 '18 at 4:17
This answer is seemingly off topic; the question is why is the
libfdk_aac
encoder downsampling the bit depth to 16-bit and how do I solve it? I am aware that there is no issue with ffmpeg's built-in aac
encoder. I just want to know if it's possible to encode 24-bit AAC with libfdk_aac
.– Henry7720
Dec 8 '18 at 4:17
FDK isn't downsampling anything - the library only accepts 16-bit PCM samples as input. What is unclear?
– Gyan
Dec 8 '18 at 4:33
FDK isn't downsampling anything - the library only accepts 16-bit PCM samples as input. What is unclear?
– Gyan
Dec 8 '18 at 4:33
ffmpeg's command line is nicely confusing. But I've checked and it seems the file actually is 24-bit. Thank you for your help.
– Henry7720
Dec 8 '18 at 4:49
ffmpeg's command line is nicely confusing. But I've checked and it seems the file actually is 24-bit. Thank you for your help.
– Henry7720
Dec 8 '18 at 4:49
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f1381511%2f24-bit-libfdk-aac-audio-with-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