Encoder configuration structure.
This structure contains the encoder settings that have common representations across all codecs. This doesn't imply that all codecs support all features, however.
Stream timebase units.
Indicates the smallest interval of time, in seconds, used by the stream. For fixed frame rate material, or variable frame rate material where frames are timed at a multiple of a given clock (ex: video capture), the RECOMMENDED method is to set the timebase to the reciprocal of the frame rate (ex: 1001/30000 for 29.970 Hz NTSC). This allows the pts to correspond to the frame number, which can be handy. For re-encoding video from containers with absolute time timestamps, the RECOMMENDED method is to set the timebase to that of the parent container or multimedia framework (ex: 1/1000 for ms, as in FLV).
| unsigned int vpx_codec_enc_cfg::g_lag_in_frames |
Allow lagged encoding.
If set, this value allows the encoder to consume a number of input frames before producing output frames. This allows the encoder to base decisions for the current frame on future frames. This does increase the latency of the encoding pipeline, so it is not appropriate in all situations (ex: realtime encoding).
Note that this is a maximum value – the encoder may produce frames sooner than the given limit. Set this value to 0 to disable this feature.
| unsigned int vpx_codec_enc_cfg::rc_dropframe_thresh |
Temporal resampling configuration, if supported by the codec.
Temporal resampling allows the codec to "drop" frames as a strategy to meet its target data rate. This can cause temporal discontinuities in the encoded video, which may appear as stuttering during playback. This trade-off is often acceptable, but for many applications is not. It can be disabled in these cases.
Note that not all codecs support this feature. All vpx VPx codecs do. For other codecs, consult the documentation for that algorithm.
This threshold is described as a percentage of the target data buffer. When the data buffer falls below this percentage of fullness, a dropped frame is indicated. Set the threshold to zero (0) to disable this feature.
| unsigned int vpx_codec_enc_cfg::rc_resize_allowed |
Enable/disable spatial resampling, if supported by the codec.
Spatial resampling allows the codec to compress a lower resolution version of the frame, which is then upscaled by the encoder to the correct presentation resolution. This increases visual quality at low data rates, at the expense of CPU time on the encoder/decoder.
Rate control algorithm to use.
Indicates whether the end usage of this stream is to be streamed over a bandwidth constrained link, indicating that Constant Bit Rate (CBR) mode should be used, or whether it will be played back on a high bandwidth link, as from a local disk, where higher variations in bitrate are acceptable.
| unsigned int vpx_codec_enc_cfg::rc_overshoot_pct |
Rate control adaptation overshoot control.
VP8: Expressed as a percentage of the target bitrate, controls the maximum allowed adaptation speed of the codec. This factor controls the maximum amount of bits that can be added to the target bitrate in order to compensate for prior undershoot. VP9: Expressed as a percentage of the target bitrate, a threshold overshoot level (current rate vs target) beyond which more agressive corrective measures are taken.
Valid values in the range VP8:0-1000 VP9: 0-100.
| unsigned int vpx_codec_enc_cfg::ts_layer_id[16] |
Template defining the membership of frames to temporal layers.
This array defines the membership of frames to temporal coding layers. For a 2-layer encoding that assigns even numbered frames to one temporal layer (0) and odd numbered frames to a second temporal layer (1) with ts_periodicity=8, then ts_layer_id = (0,1,0,1,0,1,0,1).