how to record audio encoded frame?

308 views
Skip to first unread message

zidan zhang

unread,
Jan 18, 2024, 11:47:03 AMJan 18
to discuss-webrtc
Hi all, 
  Just as the title, Is there any way to obtain the EncodedAudioFrame of the audio track? I just want to record an audio stream and do not need(and want) to decode or resampling. 

We can add EncodedVideoSink to the video track, why not the audio track don't have one?

In addition, I found that the sample_rate of the AudioSink::OnData param is not fixed. Can anyone explain to me why?

Thanks! 

Jason Gu

unread,
Jan 31, 2024, 5:58:40 PMJan 31
to discuss-webrtc
You can use insertable stream interface (FrameTransformerInterface) or insertable  AudioDecoderFactory in CreatePeerConnectionFactory .
Reply all
Reply to author
Forward
0 new messages