The CodecParameters API provides functionality to access codec parameters from streams.
const params = stream.codecParameters // Get from streamGeneral type of the encoded data.
Returns: number
Specific type of the encoded data (the codec used).
Returns: number
Additional information about the codec (corresponds to the AVI FOURCC).
Returns: number
Gets the bit rate.
Returns: number
Gets the bits per coded sample.
Returns: number
Gets the bits per raw sample.
Returns: number
Gets the sample rate for audio codecs.
Returns: number
Gets the frame rate for video codecs.
Returns: Rational
Out-of-band global headers that may be used by some codecs.
Returns: Buffer
Codec-specific bitstream restrictions that the stream conforms to.
Returns: number
Codec-specific bitstream restrictions that the stream conforms to.
Returns: number
Video: the pixel format, the value corresponds to AVPixelFormat. Audio: the sample format, the value corresponds to AVSampleFormat.
Returns: number
Number of channels in the layout.
Returns: number
Gets or sets the channel layout, see ffmpeg.constants.channelLayouts
Returns: ChannelLayout
Audio only. The number of bytes per coded audio frame, required by some formats.
Corresponds to nBlockAlign in WAVEFORMATEX.
Returns: number
Audio only. The amount of padding (in samples) inserted by the encoder at the beginning of the audio. I.e. this number of leading decoded samples must be discarded by the caller to get the original audio without leading padding.
Returns: number
Audio only. The amount of padding (in samples) appended by the encoder to the end of the audio. I.e. this number of decoded samples must be discarded by the caller from the end of the stream to get the original audio without any trailing padding.
Returns: number
Audio only. Number of samples to skip after a discontinuity.
Returns: number
Video only. The aspect ratio (width / height) which a single pixel should have when displayed.
When the aspect ratio is unknown / undefined, the numerator should be set to 0 (the denominator may have any value).
Returns: number
Video only. Number of delayed frames.
Returns: number
Video only.
Returns: number
Video only.
Returns: number
Video only.
Returns: number
Copies parameters from a codec context.
Parameters:
context(CodecContext): The codec context
Returns: void
Copies parameters to a codec context.
Parameters:
context(CodecContext): The codec context
Returns: void