Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK

selecting channel while mp3 encoding



I have two RTP data streams ( PCM 8kHz mono ) and I want to record them into one stereo mp3 file using MP3Encoder. I want one stream to be a left channel and another stream to be a right channel. Now my settings for mp3 encoder are

m_mp3_params.stereo_mode = UMC_MPA_LR_STEREO;
m_mp3_params.mode = UMC_MPAENC_CBR;
m_mp3_params.m_info.audioInfo.m_iSampleFrequency = 8000;
m_mp3_params.m_info.audioInfo.m_iChannels = 2;
m_mp3_params.m_info.iBitrate = 16000;

and then I use GetFrame function to get regular mp3 encoded frame

status = m_mp3_encoder.GetFrame(&m_packet_data, &m_mp3_data_block)

but I don't understand how to specify channel? 

Now I have the same sound in both channels of recorded mp3 file.

0 Kudos
0 Replies