# VideoEncoderHelper

open class VideoEncoderHelper

Created by pedro on 3/12/25.

## Constructors

VideoEncoderHelper
Link copied to clipboard
constructor()

## Functions

decodeSpsPpsFromBuffer
Link copied to clipboard
open fun decodeSpsPpsFromBuffer(outputBuffer: ByteBuffer, length: Int): Pair<ByteBuffer, ByteBuffer>
decode sps and pps if the encoder never call to MediaCodec.
extractObuSequence
Link copied to clipboard
open fun extractObuSequence(buffer: ByteBuffer, bufferInfo: MediaCodec.BufferInfo): ByteBuffer
extractVpsSpsPpsFromH265
Link copied to clipboard
open fun extractVpsSpsPpsFromH265(csd0byteBuffer: ByteBuffer): List<ByteBuffer>
You need find 0 0 0 1 byte sequence that is the initiation of vps, sps and pps buffers.