audioEncoder
info
Added in Scrcpy 2.0
- Type:
string | undefined - Default value:
undefined
Specifies the name of the encoder to use for audio encoding.
When not specified, Scrcpy will automatically select an appropriate encoder. This option allows specifying a particular audio encoder by name if you need to override the default selection.
Related options
audioCodec: Specifies the audio codec to useaudioBitRate: Controls the audio bitrateaudioCodecOptions: Configures audio encoding parameters for the selected audio codec
Example
import { ScrcpyOptions2_0 } from "@yume-chan/scrcpy";
const options = new ScrcpyOptions2_0({
audioEncoder: "OMX.google.raw.decoder", // Specify audio encoder by name
});