Skip to content

No color conversion for H265 #129

@Schteve-Earl

Description

@Schteve-Earl

I've run into a bug when launching a Femto Mega camera on the main branch with the following parameters:

color_width: 3840
color_height: 2160
color_fps: 5
color_format: H265
color_exposure: 200
color_gain: 5
color_white_balance: 8000
color_sharpness: 12
color_saturation: 50
color_contrast: 35
enable_color_auto_white_balance: false
enable_color_auto_exposure: false

Here is the repeating error:

[component_container-2] [ERROR] [1753113929.801724673] [camera_1.camera_1]: Unsupported color format: 7
[component_container-2] [ERROR] [1753113929.801815014] [camera_1.camera_1]: Failed to convert frame to video frame
[component_container-2] [ERROR] [1753113929.801958521] [camera_1.camera_1]: color frame is not decoded

The bug occurs here:

bool OBCameraNode::setupFormatConvertType(OBFormat format) {
  switch (format) {
    case OB_FORMAT_RGB888:
      return true;
    case OB_FORMAT_I420:
      format_convert_filter_.setFormatConvertType(FORMAT_I420_TO_RGB888);
      break;
    case OB_FORMAT_MJPG:
      format_convert_filter_.setFormatConvertType(FORMAT_MJPEG_TO_RGB888);
      break;
    case OB_FORMAT_YUYV:
      format_convert_filter_.setFormatConvertType(FORMAT_YUYV_TO_RGB888);
      break;
    case OB_FORMAT_NV21:
      format_convert_filter_.setFormatConvertType(FORMAT_NV21_TO_RGB888);
      break;
    case OB_FORMAT_NV12:
      format_convert_filter_.setFormatConvertType(FORMAT_NV12_TO_RGB888);
      break;
    case OB_FORMAT_UYVY:
      format_convert_filter_.setFormatConvertType(FORMAT_UYVY_TO_RGB888);
      break;
    default:
      return false;
  }
  return true;
}

As there is no conversion from the H265 format to RGB. At the highest resolution that I'm running, H265 is the only format I'm able to stream from the camera. Are there any plans to add this filter?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions