force Audio Track
Sets whether the output file should always contain an audio track.
The default value is false.
If true, the output will always contain an audio track.
If false:
If the Composition export doesn't produce any audio at timestamp 0, but produces audio later on, the export is aborted.
If the Composition doesn't produce any audio during the entire export, the output won't contain any audio.
If the Composition export produces audio at timestamp 0, the output will contain an audio track.
If the output contains an audio track, silent audio will be generated for the segments where the Composition export doesn't produce any audio.
The MIME type of the output's audio track can be set using Transformer.Builder.setAudioMimeType(String)
. The sample rate and channel count can be set by passing relevant AudioProcessor instances to the Composition.
Forcing an audio track and requesting audio transmuxing are not allowed together because generating silence requires transcoding.
This is experimental and may be removed or changed without warning.