Validated encoder quality settings.
These settings tune the encoding quality and size:
:bitrate— target bitrate in bits/second (a positive integer), ornilto keep the codec default (64_000).:complexity— encoding complexity from0(fast) to10(best), ornil.:cbr—trueto force constant bitrate,falsefor variable, ornilfor default.:fec—trueto enable in-band forward error correction.:packet_loss— expected packet-loss percentage0..100used for rate estimation.
Raise :bitrate to increase output size/fidelity, or lower it to shrink it — this is
the knob behind "changing the quality" of an encoding.
Summary
Functions
Builds validated settings from a keyword list.
Returns the native NifMap shape consumed by the encoder NIF.
Types
@type t() :: %RustyOpus.Settings{ bitrate: non_neg_integer() | nil, cbr: boolean() | nil, complexity: 0..10 | nil, fec: boolean(), packet_loss: 0..100 }
Functions
@spec new(keyword()) :: {:ok, t()} | {:error, RustyOpus.Error.t()}
Builds validated settings from a keyword list.
Returns {:ok, settings} or {:error, %RustyOpus.Error{}}.
Returns the native NifMap shape consumed by the encoder NIF.