Updated: October 28, 2024 |
Configure video encoder parameters
#include <camera/camera_encoder.h>
#define camera_set_videoencoder_parameter(handle, args...)
Use this function to configure the video encoder before you start to encode or record video. The parameters that you can configure depend on the codec you selected using camera_set_video_property().
Parameters and values are delimited using commas, and so are multiple parameter-value pairs.
camera_set_videoencoder_parameter( camera_handle, CAMERA_H264AVC_BITRATE, 1000000, CAMERA_H264AVC_KEYFRAMEINTERVAL, 60, CAMERA_H264AVC_RATECONTROL, CAMERA_H264AVC_RATECONTROL_CBR, CAMERA_H264AVC_PROFILE, CAMERA_H264AVC_PROFILE_HIGH, CAMERA_H264AVC_LEVEL, CAMERA_H264AVC_LEVEL_4 );Then, to encode or record video, call the camera_start_video() or the camera_start_encode() function.
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.