AudioEncoder

One configured and opened audio encoder. Some codecs require a fixed input chunk size (AAC: 1024 samples). For those, route frames through FilterGraph.buildAudio and call FilterGraph.setOutputFrameSize with frameSize (Transcoder does this automatically).

One configured and opened audio encoder. Some codecs require a fixed input chunk size (AAC: 1024 samples). For those, route frames through FilterGraph.buildAudio and call FilterGraph.setOutputFrameSize with frameSize (Transcoder does this automatically).

One configured and opened audio encoder. Some codecs require a fixed input chunk size (AAC: 1024 samples). For those, route frames through FilterGraph.buildAudio and call FilterGraph.setOutputFrameSize with frameSize (Transcoder does this automatically).

One configured and opened audio encoder. Some codecs require a fixed input chunk size (AAC: 1024 samples). For those, route frames through FilterGraph.buildAudio and call FilterGraph.setOutputFrameSize with frameSize (Transcoder does this automatically).

Properties

Link copied to clipboard
expect val channelLayoutMask: Long?

The channel layout the encoder opened with, as an FFmpeg channel mask: the spec's AudioEncoderSpec.channelLayoutMask, or FFmpeg's default layout for channels.

actual val channelLayoutMask: Long?

The channel layout the encoder opened with, as an FFmpeg channel mask: the spec's AudioEncoderSpec.channelLayoutMask, or FFmpeg's default layout for channels.

actual val channelLayoutMask: Long?

The channel layout the encoder opened with, as an FFmpeg channel mask: the spec's AudioEncoderSpec.channelLayoutMask, or FFmpeg's default layout for channels.

actual val channelLayoutMask: Long?

The channel layout the encoder opened with, as an FFmpeg channel mask: the spec's AudioEncoderSpec.channelLayoutMask, or FFmpeg's default layout for channels.

Link copied to clipboard
expect val channels: Int

The channel count the encoder opened with.

actual val channels: Int

The channel count the encoder opened with.

actual val channels: Int

The channel count the encoder opened with.

actual val channels: Int

The channel count the encoder opened with.

Link copied to clipboard
expect val frameSize: Int

Samples the codec wants per frame; 0 when the codec takes arbitrary chunk sizes.

actual val frameSize: Int

Samples the codec wants per frame; 0 when the codec takes arbitrary chunk sizes.

actual val frameSize: Int

Samples the codec wants per frame; 0 when the codec takes arbitrary chunk sizes.

actual val frameSize: Int

Samples the codec wants per frame; 0 when the codec takes arbitrary chunk sizes.

Link copied to clipboard

The sample format actually negotiated (resolves AudioEncoderSpec.sampleFormat = None).

The sample format actually negotiated (resolves AudioEncoderSpec.sampleFormat = None).

The sample format actually negotiated (resolves AudioEncoderSpec.sampleFormat = None).

The sample format actually negotiated (resolves AudioEncoderSpec.sampleFormat = None).

Link copied to clipboard
expect val sampleRate: Int

The sample rate the encoder opened with.

actual val sampleRate: Int

The sample rate the encoder opened with.

actual val sampleRate: Int

The sample rate the encoder opened with.

actual val sampleRate: Int

The sample rate the encoder opened with.

Functions

Link copied to clipboard
expect open override fun close()
actual open override fun close()
actual open override fun close()
actual open override fun close()
Link copied to clipboard
expect suspend fun drive(input: Flow<Frame>)

Drain input into this encoder + the parent muxer. Returns when the flow completes.

actual suspend fun drive(input: Flow)
actual suspend fun drive(input: Flow<Frame>)

Drain input into this encoder + the parent muxer. Returns when the flow completes.

actual suspend fun drive(input: Flow<Frame>)

Drain input into this encoder + the parent muxer. Returns when the flow completes.