本地录制时,如何指定音频和视频裸数据格式,


#1

也就是说,如何指定AUDIO_FRAME_RAW_PCM或AUDIO_FRAME_AAC
如果指定 VIDEO_FRAME_RAW_YUV或VIDEO_FRAME_JPG或VIDEO_FRAME_H264


#2

可以通过 getAudioFrame、getVideoFrame来指定。例如:
uint32_t getAudioFrame = agora::linuxsdk::AUDIO_FORMAT_DEFAULT_TYPE;
//uint32_t getAudioFrame = agora::linuxsdk::AUDIO_FORMAT_PCM_FRAME_TYPE;
//uint32_t getVideoFrame = agora::linuxsdk::VIDEO_FORMAT_H264_FRAME_TYPE;
//uint32_t getVideoFrame = agora::linuxsdk::VIDEO_FORMAT_YUV_FRAME_TYPE;
//uint32_t getVideoFrame = agora::linuxsdk::VIDEO_FORMAT_JPG_FRAME_TYPE;
//uint32_t getVideoFrame = agora::linuxsdk::VIDEO_FORMAT_JPG_FILE_TYPE;
//uint32_t getVideoFrame = agora::linuxsdk::VIDEO_FORMAT_JPG_VIDEO_FILE_TYPE;
uint32_t getVideoFrame = agora::linuxsdk::VIDEO_FORMAT_DEFAULT_TYPE;


#3

上述内容是用于指decodeAudio和decodeVideo配置项,不会影响裸数据的格式,


#4

官方demo当前吐出音频裸数据是PCM格式,如何设置才能吐出AAC格式?
视频吐出的是H264格式,如何设置才能吐出YUV格式?


#5

yuv 用视频裸数据, 这个参数。
https://docs.agora.io/cn/Recording/API%20Reference/recording_java/enumio_1_1agora_1_1recording_1_1common_1_1_common_1_1_v_i_d_e_o___f_o_r_m_a_t___t_y_p_e.html

音频裸数据 aac frame:
https://docs.agora.io/cn/Recording/API%20Reference/recording_java/enumio_1_1agora_1_1recording_1_1common_1_1_common_1_1_a_u_d_i_o___f_o_r_m_a_t___t_y_p_e.html