How to Send OPUS Pre-Encoded data using WebRtc?

276 views
Skip to first unread message

Muhammad Zaid Ali

unread,
Jun 30, 2022, 9:25:41 AM6/30/22
to discuss-webrtc
I have an opus encoded audio file (Ogg file) and want to send it via webRTC. and don't want webRTC to encode it again just send it to another peer.

I have worked on sending pre-encoded video (h264) through a video channel and got a hurdle in the video encoder factory so, I managed to build a custom encoder factory using an open H264 encoder. For reference, I used an unreal engine (opensource) project to build this custom factory.

Now, I am planning to send pre-encoded audio (opus) through WebRTC audio channel but there seems to be no relevant posts/blogs or research available online to assist in building a custom audio encoder factory. Not even an unreal engine supports documenting anything related to this matter.

has anyone done this before or knows how to do it?

Karllen Zheng

unread,
Jun 30, 2022, 10:01:39 PM6/30/22
to discuss-webrtc
You can use an insertable interface and modify the encoder audio data by WebRTC with your encoded opus data.
I think it is an easy way, you only need to change the encoder data when WebRTC sends RTP data. You needn't modify native WebRTC code.
Reply all
Reply to author
Forward
0 new messages