Information about externally encoded video frames.

public class EncodedVideoFrameInfo {
    public int codecType;
    public int width;
    public int height;
    public int framesPerSecond;
    public int frameType;
    public int rotation;

    public int trackId;
    public long captureTimeMs;
    public int uid;
    public int streamType;

  public EncodedVideoFrameInfo() {
    codecType = Constants.VIDEO_CODEC_H264;
    width = 0;
    height = 0;
    framesPerSecond = 0;
    frameType = Constants.VIDEO_FRAME_TYPE_BLANK_FRAME;
    rotation = Constants.VIDEO_ORIENTATION_0;
    trackId = 0;
    captureTimeMs = 0;
    uid = 0;
    streamType = Constants.VIDEO_STREAM_HIGH;

  public EncodedVideoFrameInfo(int codecType, int width, int height, int framesPerSecond,
      int frameType, int rotation, int trackId, long captureTimeMs, int uid, int streamType) {
    this.codecType = codecType;
    this.width = width;
    this.height = height;
    this.framesPerSecond = framesPerSecond;
    this.frameType = frameType;
    this.rotation = rotation;
    this.trackId = trackId;
    this.captureTimeMs = captureTimeMs;
    this.uid = uid;
    this.streamType = streamType;

  public int getCodecType() {
    return codecType;

  public int getWidth() {
    return width;
  public int getHeight() {
    return height;
  public int getFramesPerSecond() {
    return framesPerSecond;
  public int getFrameType() {
    return frameType;
  public int getRotation() {
    return rotation;
  public int getTrackId() {
    return trackId;
  public long getCaptureTimeMs() {
    return captureTimeMs;
  public int getUid() {
    return uid;
  public int getStreamType() {
    return streamType;

  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(" width=").append(width);
    sb.append(" height=").append(height);
    sb.append(" framesPerSecond=").append(framesPerSecond);
    sb.append(" frameType=").append(frameType);
    sb.append(" rotation=").append(rotation);
    sb.append(" trackId=").append(trackId);
    sb.append(" captureTimeMs=").append(captureTimeMs);
    sb.append(" uid=").append(uid);
    sb.append(" streamType=").append(streamType);
    return sb.toString();


The codec type of the video:
  • VIDEO_CODEC_VP8(1): VP8.
  • VIDEO_CODEC_H264(2): H.264.
  • VIDEO_CODEC_H265(3): (Default) H.265.
Note: In certain scenarios, such as low resolution of the captured video stream or limited device performance, the SDK automatically adjusts to the H.264 encoding format.
Width (pixel) of the video frame.
Height (pixel) of the video frame.

The number of video frames per second.

When this parameter is not 0, you can use it to calculate the Unix timestamp of externally encoded video frames.

The video frame type.
  • 0: (Default) VIDEO_FRAME_TYPE_BLANK_FRAME, a blank frame.
  • 3: VIDEO_FRAME_TYPE_KEY_FRAME, a key frame.
  • 4:VIDEO_FRAME_TYPE_DELTA_FRAME, a Delta frame.
  • 5:VIDEO_FRAME_TYPE_B_FRAME, a B frame.
  • 6: VIDEO_FRAME_TYPE_UNKNOW, an unknown frame.
Rotation information of the video frame, as the following:
  • 0: (Default) 0 degree.
  • 90: 90 degrees.
  • 180: 180 degrees.
  • 270: 270 degrees.
Reserved for future use.
The track ID. Used in scenarios with multiple video tracks in the channel.
The Unix timestamp (ms) for capturing the external encoded video frames.
The user ID to push the externally encoded video frame.
The type of video streams.
  • VIDEO_STREAM_HIGH(0): High-quality stream, that is, a high-resolution and high-bitrate video stream.
  • VIDEO_STREAM_LOW(1): Low-quality stream, that is, a low-resolution and low-bitrate video stream.