You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Set bitrate based on the equation recommended by the documentation.
RETURN_IF_NOT_OK(AacEncErrorToAbslStatus(
aacEncoder_SetParam(
encoder, AACENC_BITRATE,
3 * num_channels * num_samples_per_frame * output_sample_rate / 2),
"Failed to configure encoder bitrate."));
This is the bitrate setting reference from iamf-tools(aac_encoder.cc), the aac packet after encoding will contain more redundant data,
which will lead to larger packet size than ffmpeg's.
Good point. Looks wrong. In current build you could try changing bitrate_mode. It matches FDK AAC's API here. So any mode 1-5 should trigger a variable bit rate modes. Which ignores the calculation above.
That default bit rate equation was supposed to come from the library documentation. I see 1.5 bits per frame for AAC-LC (§2.9.1 of doc). But it looks like the calculation is bad. I think it shouldn't have the factor of num_samples_per_frame.
And even so, we could expose per substream bit rate settings. Similar to #11, but also for AAC.
@jwcullen
This is the bitrate setting reference from iamf-tools(aac_encoder.cc), the aac packet after encoding will contain more redundant data,
which will lead to larger packet size than ffmpeg's.
Following reference is from ffmpeg:
BWT, IAMF spec specify to use AAC-LC.
The text was updated successfully, but these errors were encountered: