<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<div>I'm using libavcodec to encode audio to AAC using the AudioToolbox encoder.<br></div><div><br></div><div>It declares its list of supported pixel formats, but doesn't include AV_SAMPLE_FMT_FLT. See <a href="https://github.com/FFmpeg/FFmpeg/blob/7368e5537db61683b535257adbc0c3b15f0f84f2/libavcodec/audiotoolboxenc.c#L633">https://github.com/FFmpeg/FFmpeg/blob/7368e5537db61683b535257adbc0c3b15f0f84f2/libavcodec/audiotoolboxenc.c#L633</a><br></div><div><br></div><div>However when setting up AudioToolbox there is code to handle AV_SAMPLE_FMT_FLT and (AV_SAMPLE_FMT_DBL):<br></div><div><a href="https://github.com/FFmpeg/FFmpeg/blob/7368e5537db61683b535257adbc0c3b15f0f84f2/libavcodec/audiotoolboxenc.c#L242">https://github.com/FFmpeg/FFmpeg/blob/7368e5537db61683b535257adbc0c3b15f0f84f2/libavcodec/audiotoolboxenc.c#L242</a><br></div><div><br></div><div>I've modifed the code locally to simply add AV_SAMPLE_FMT_FLT into `.sample_fmts` and recompiled and it encodes fine, at least with AAC on MacOS Big Sur. <br></div><div><br></div><div>Looking through the git history for the Audio Toolbox encoder, it doesn't look like .sample_fmts ever contained AV_SAMPLE_FMT_FLT. Is there a known reason they're left out? Is it possible to add in at least AV_SAMPLE_FMT_FLT? What can I do to help get that added in?<br></div><div><br></div><div><br></div> </body>
</html>