Class: OptionInfo
Defined in: src/lib/option.ts:88
Option information descriptor.
Describes a single option available on an FFmpeg object. Contains metadata about the option including name, type, default value, valid range, and documentation. Used to discover and validate options.
Direct mapping to FFmpeg's AVOption.
Example
import { Option } from 'node-av';
// Get option info
const optInfo = Option.find(obj, 'bitrate');
if (optInfo) {
console.log(`Option: ${optInfo.name}`);
console.log(`Help: ${optInfo.help}`);
console.log(`Type: ${optInfo.type}`);
console.log(`Default: ${optInfo.defaultValue}`);
console.log(`Range: ${optInfo.min} - ${optInfo.max}`);
}
See
AVOption - FFmpeg Doxygen
Constructors
Constructor
new OptionInfo(
native
):OptionInfo
Defined in: src/lib/option.ts:96
Internal
Parameters
native
The native option instance
Returns
OptionInfo
Accessors
defaultValue
Get Signature
get defaultValue():
unknown
Defined in: src/lib/option.ts:141
Default value.
The default value for this option. Type depends on the option type.
Direct mapping to AVOption->default_val.
Returns
unknown
flags
Get Signature
get flags():
AVOptionFlag
Defined in: src/lib/option.ts:174
Option flags.
Combination of AV_OPT_FLAG_* indicating option properties.
Direct mapping to AVOption->flags.
Returns
help
Get Signature
get help():
null
|string
Defined in: src/lib/option.ts:118
Option help text.
Human-readable description of the option's purpose.
Direct mapping to AVOption->help.
Returns
null
| string
max
Get Signature
get max():
number
Defined in: src/lib/option.ts:163
Maximum value.
Maximum valid value for numeric options.
Direct mapping to AVOption->max.
Returns
number
min
Get Signature
get min():
number
Defined in: src/lib/option.ts:152
Minimum value.
Minimum valid value for numeric options.
Direct mapping to AVOption->min.
Returns
number
name
Get Signature
get name():
null
|string
Defined in: src/lib/option.ts:107
Option name.
The name used to get/set this option.
Direct mapping to AVOption->name.
Returns
null
| string
type
Get Signature
get type():
AVOptionType
Defined in: src/lib/option.ts:129
Option type.
Data type of the option value (AV_OPT_TYPE_*).
Direct mapping to AVOption->type.
Returns
unit
Get Signature
get unit():
null
|string
Defined in: src/lib/option.ts:185
Option unit.
Unit string for grouping related options.
Direct mapping to AVOption->unit.
Returns
null
| string
Methods
getNative()
getNative():
NativeOption
Defined in: src/lib/option.ts:196
Internal
Get the underlying native Option object.
Returns
The native Option binding object