@bitmovin/api-sdk
Version:
Bitmovin JS/TS API SDK
307 lines (306 loc) • 11.3 kB
TypeScript
import AdaptiveQuantMode from './AdaptiveQuantMode';
import AutoLevelSetup from './AutoLevelSetup';
import BAdapt from './BAdapt';
import Cea608708SubtitleConfiguration from './Cea608708SubtitleConfiguration';
import CodecConfigType from './CodecConfigType';
import H264BPyramid from './H264BPyramid';
import H264DynamicRangeFormat from './H264DynamicRangeFormat';
import H264InterlaceMode from './H264InterlaceMode';
import H264MotionEstimationMethod from './H264MotionEstimationMethod';
import H264NalHrd from './H264NalHrd';
import H264Partition from './H264Partition';
import H264SubMe from './H264SubMe';
import H264Trellis from './H264Trellis';
import LevelH264 from './LevelH264';
import MvPredictionMode from './MvPredictionMode';
import PresetConfiguration from './PresetConfiguration';
import ProfileH264 from './ProfileH264';
import VideoConfiguration from './VideoConfiguration';
import WeightedPredictionPFrames from './WeightedPredictionPFrames';
/**
* @export
* @class H264VideoConfiguration
*/
export declare class H264VideoConfiguration extends VideoConfiguration {
/**
* Discriminator property for CodecConfiguration
* @type {string}
* @memberof H264VideoConfiguration
*/
readonly type: CodecConfigType;
/**
* Choose from a set of preset configurations tailored for common use cases. Check out [H264 Presets](https://bitmovin.com/docs/encoding/tutorials/h264-presets) to see which values get applied by each preset. Explicitly setting a property to a different value will override the preset's value for that property.
* @type {PresetConfiguration}
* @memberof H264VideoConfiguration
*/
presetConfiguration?: PresetConfiguration;
/**
* Automatically configures the H264 Video Codec to be compatible with the given SDR format. Bitmovin recommends to use the dynamic range format together with a preset configuration to achieve good results. Explicitly configured properties will take precedence over dynamic range format settings, which in turn will take precedence over preset configurations.
* @type {H264DynamicRangeFormat}
* @memberof H264VideoConfiguration
*/
dynamicRangeFormat?: H264DynamicRangeFormat;
/**
* Constant rate factor for quality-based variable bitrate. Either bitrate or crf is required.
* @type {number}
* @memberof H264VideoConfiguration
*/
crf?: number;
/**
* When setting a profile, all other settings must not exceed the limits which are defined in the profile. Otherwise, a higher profile may be automatically chosen. (required)
* @type {ProfileH264}
* @memberof H264VideoConfiguration
*/
profile?: ProfileH264;
/**
* Amount of b frames
* @type {number}
* @memberof H264VideoConfiguration
*/
bframes?: number;
/**
* Amount of reference frames.
* @type {number}
* @memberof H264VideoConfiguration
*/
refFrames?: number;
/**
* Minimum quantization factor
* @type {number}
* @memberof H264VideoConfiguration
*/
qpMin?: number;
/**
* Maximum quantization factor
* @type {number}
* @memberof H264VideoConfiguration
*/
qpMax?: number;
/**
* @type {MvPredictionMode}
* @memberof H264VideoConfiguration
*/
mvPredictionMode?: MvPredictionMode;
/**
* Maximum motion vector search range
* @type {number}
* @memberof H264VideoConfiguration
*/
mvSearchRangeMax?: number;
/**
* Enable or disable CABAC
* @type {boolean}
* @memberof H264VideoConfiguration
*/
cabac?: boolean;
/**
* Maximum Bitrate (bps)
* @type {number}
* @memberof H264VideoConfiguration
*/
maxBitrate?: number;
/**
* Minimum Bitrate (bps)
* @type {number}
* @memberof H264VideoConfiguration
*/
minBitrate?: number;
/**
* Playback device buffer size (bits)
* @type {number}
* @memberof H264VideoConfiguration
*/
bufsize?: number;
/**
* Minimum GOP length, the minimum distance between I-frames
* @type {number}
* @memberof H264VideoConfiguration
*/
minGop?: number;
/**
* Maximum GOP length, the maximum distance between I-frames
* @type {number}
* @memberof H264VideoConfiguration
*/
maxGop?: number;
/**
* Enable open-gop, allows referencing frames from a previous gop
* @type {boolean}
* @memberof H264VideoConfiguration
*/
openGop?: boolean;
/**
* Minimum interval in seconds between key frames
* @type {number}
* @memberof H264VideoConfiguration
*/
minKeyframeInterval?: number;
/**
* Maximum interval in seconds between key frames
* @type {number}
* @memberof H264VideoConfiguration
*/
maxKeyframeInterval?: number;
/**
* If three-pass encoding is used and a level is set for the encoder, the bitrate for some segments may exceed the bitrate limit which is defined by the level.
* @type {LevelH264}
* @memberof H264VideoConfiguration
*/
level?: LevelH264;
/**
* @type {BAdapt}
* @memberof H264VideoConfiguration
*/
bAdaptiveStrategy?: BAdapt;
/**
* @type {H264MotionEstimationMethod}
* @memberof H264VideoConfiguration
*/
motionEstimationMethod?: H264MotionEstimationMethod;
/**
* Number of frames for frame-type decision lookahead
* @type {number}
* @memberof H264VideoConfiguration
*/
rcLookahead?: number;
/**
* Subpixel motion estimation and mode decision
* @type {H264SubMe}
* @memberof H264VideoConfiguration
*/
subMe?: H264SubMe;
/**
* Enables or disables Trellis quantization. NOTE: This requires cabac
* @type {H264Trellis}
* @memberof H264VideoConfiguration
*/
trellis?: H264Trellis;
/**
* Partitions to consider. Analyzing more partition options improves quality at the cost of speed.
* @type {H264Partition[]}
* @memberof H264VideoConfiguration
*/
partitions?: H264Partition[];
/**
* Number of slices per frame.
* @type {number}
* @memberof H264VideoConfiguration
*/
slices?: number;
/**
* Using TOP_FIELD_FIRST or BOTTOM_FIELD_FIRST will output interlaced video
* @type {H264InterlaceMode}
* @memberof H264VideoConfiguration
*/
interlaceMode?: H264InterlaceMode;
/**
* Scene change sensitivity. The higher the value, the more likely an I-frame will be inserted. Set to 0 to disable it which is advised for scenarios where fixed GOP is required, e.g., adaptive streaming outputs like DASH, HLS and Smooth. Having this setting enabled can improve quality for progressive output with an increased internal chunk length (see `internalChunkLength` of muxings).
* @type {number}
* @memberof H264VideoConfiguration
*/
sceneCutThreshold?: number;
/**
* Signal hypothetical reference decoder (HRD) information (requires bufsize to be set)
* @type {H264NalHrd}
* @memberof H264VideoConfiguration
*/
nalHrd?: H264NalHrd;
/**
* Keep some B-frames as references
* @type {H264BPyramid}
* @memberof H264VideoConfiguration
*/
bPyramid?: H264BPyramid;
/**
* Defines whether CEA 608/708 subtitles are copied from the input video stream
* @type {Cea608708SubtitleConfiguration}
* @memberof H264VideoConfiguration
*/
cea608708SubtitleConfig?: Cea608708SubtitleConfiguration;
/**
* Strength of the in-loop deblocking filter. Higher values deblock more effectively but also soften the image
* @type {number}
* @memberof H264VideoConfiguration
*/
deblockAlpha?: number;
/**
* Threshold of the in-loop deblocking filter. Higher values apply deblocking stronger on non flat blocks, lower values on flat blocks
* @type {number}
* @memberof H264VideoConfiguration
*/
deblockBeta?: number;
/**
* Controls the adaptive quantization algorithm
* @type {AdaptiveQuantMode}
* @memberof H264VideoConfiguration
*/
adaptiveQuantizationMode?: AdaptiveQuantMode;
/**
* Values greater than 1 reduce blocking and blurring in flat and textured areas. Values less than 1 reduces ringing artifacts at the cost of more banding artifacts. Negative values are not allowed
* @type {number}
* @memberof H264VideoConfiguration
*/
adaptiveQuantizationStrength?: number;
/**
* Allow references on a per partition basis, rather than per-macroblock basis
* @type {boolean}
* @memberof H264VideoConfiguration
*/
mixedReferences?: boolean;
/**
* Enables adaptive spatial transform (high profile 8x8 transform)
* @type {boolean}
* @memberof H264VideoConfiguration
*/
adaptiveSpatialTransform?: boolean;
/**
* Enables fast skip detection on P-frames. Disabling this very slightly increases quality but at a large speed loss
* @type {boolean}
* @memberof H264VideoConfiguration
*/
fastSkipDetectionPFrames?: boolean;
/**
* Enable open-gop, allows referencing frames from a previous gop
* @type {boolean}
* @memberof H264VideoConfiguration
*/
weightedPredictionBFrames?: boolean;
/**
* Defines the mode for weighted prediction for P-frames
* @type {WeightedPredictionPFrames}
* @memberof H264VideoConfiguration
*/
weightedPredictionPFrames?: WeightedPredictionPFrames;
/**
* Enable macroblock tree ratecontrol. Macroblock tree rate control tracks how often blocks of the frame are used for prediciting future frames
* @type {boolean}
* @memberof H264VideoConfiguration
*/
macroblockTreeRatecontrol?: boolean;
/**
* Ratio between constant bitrate (0.0) and constant quantizer (1.0). Valid range 0.0 - 1.0
* @type {number}
* @memberof H264VideoConfiguration
*/
quantizerCurveCompression?: number;
/**
* Psychovisual Rate Distortion retains fine details like film grain at the expense of more blocking artifacts. Higher values make the video appear sharper and more detailed but with a higher risk of blocking artifacts. Needs to have subMe with RD_IP, RD_ALL, RD_REF_IP or RD_REF_ALL
* @type {number}
* @memberof H264VideoConfiguration
*/
psyRateDistortionOptimization?: number;
/**
* Higher values will improve sharpness and detail retention but might come at costs of artifacts. Needs to have trellis enabled
* @type {number}
* @memberof H264VideoConfiguration
*/
psyTrellis?: number;
/**
* Enable/disable automatic calculation of level, maxBitrate, and bufsize based on the least level that satisfies maximum property values for picture resolution, frame rate, and bit rate. In the case the target level is set explicitly, the maximum bitrate and buffer size are calculated based on the defined level. Explicitly setting maxBitrate, or bufsize properties will disable the automatic calculation.
* @type {AutoLevelSetup}
* @memberof H264VideoConfiguration
*/
autoLevelSetup?: AutoLevelSetup;
constructor(obj?: Partial<H264VideoConfiguration>);
}
export default H264VideoConfiguration;