Not correctly identifying non ac3 audio in profile parameters

<encoder>-audio is used when the source file has non AC3 audio and <encoder-audioac3> is used when the source file has ac3 audio.

I’m assuming in your case your source has ac3 audio. Usually unless you want different handling for them you set them to both to the same parameters.

See profile basics for details: