harmony 鸿蒙OH_AVRecorder_Profile

2025-06-12 浏览 (1)

OH_AVRecorder_Profile

Overview

The OH_AVRecorder_Profile struct describes the parameters used for audio and video recording.

You can choose to record only audio or only video by setting the parameters. When audioBitrate or audioChannels is set to 0, audio recording is disabled. When videoFrameWidth or videoFrameHeight is set to 0, video recording is disabled.

For details about the value range of each parameter, see AVRecorderProfile.

System capability: SystemCapability.Multimedia.Media.AVRecorder

Since: 18

Related module: AVRecorder

Header file: avrecorder_base.h

Summary

Member Variables

NameDescription
int32_t audioBitrateAudio bit rate.
int32_t audioChannelsNumber of channels.
OH_AVRecorder_CodecMimeType audioCodecAudio encoding format.
int32_t audioSampleRateAudio sampling rate.
OH_AVRecorder_ContainerFormatType fileFormatOutput file format.
int32_t videoBitrateVideo bit rate.
OH_AVRecorder_CodecMimeType videoCodecVideo encoding format.
int32_t videoFrameWidthVideo width.
int32_t videoFrameHeightVideo height.
int32_t videoFrameRateVideo frame rate.
bool isHdrWhether to record HDR videos.
bool enableTemporalScaleWhether to enable temporal scaling encoding mode.

Member Variable Description

audioBitrate

int32_t audioBitrate

Description

Audio bit rate.

audioChannels

int32_t audioChannels

Description

Number of channels.

audioCodec

OH_AVRecorder_CodecMimeType audioCodec

Description

Audio encoding format.

audioSampleRate

int32_t audioSampleRate

Description

Audio sampling rate.

fileFormat

OH_AVRecorder_ContainerFormatType fileFormat

Description

Output file format.

videoBitrate

int32_t videoBitrate

Description

Video bit rate.

videoCodec

OH_AVRecorder_CodecMimeType videoCodec

Description

Video encoding format.

videoFrameWidth

int32_t videoFrameWidth

Description

Video width.

videoFrameHeight

int32_t videoFrameHeight

Description

Video height.

videoFrameRate

int32_t videoFrameRate

Description

Video frame rate.

isHdr

bool isHdr

Description

Whether to record HDR videos.

enableTemporalScale

bool enableTemporalScale

Description

Whether to enable temporal scaling encoding mode.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Media Kit

harmony 鸿蒙AVImageGenerator

harmony 鸿蒙AVMetadataExtractor

harmony 鸿蒙AVPlayer

harmony 鸿蒙AVPlayerCallback

harmony 鸿蒙AVRecorder

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙OH_AVRecorder_Config

harmony 鸿蒙OH_AVRecorder_EncoderInfo

harmony 鸿蒙OH_AVRecorder_Location

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/doniGt