AudioTrack
The audio track a VideoWriter carries beside its frames: sample_rate in Hz, channels (1 mono, 2 stereo, ...) and codec, the audio codec name; '' picks the container's default encoder (AAC in an MP4). Declared at VideoWriter.open(audio=...); the samples arrive through write_audio and land in the file at close.
channels (property)
The interleaved channel count.
codec (property)
The audio codec name; '' picks the container's default.
sample_rate (property)
The sample rate in Hz.
__init__
__init____init__(self, sample_rate: int, channels: int, codec: str = '') -> None
init(self, sample_rate: int, channels: int, codec: str = '') -> None
AudioTrack(sample_rate, channels, codec='')
A track of channels interleaved channels at sample_rate Hz, encoded with codec ('' = the container's default).