How can record video & audio in new wersion of webrtc?

118 views
Skip to first unread message

shabake danesh

unread,
Apr 2, 2023, 8:25:04 AM4/2/23
to discuss-webrtc
HI
 

I am developing a webrtc based video chat app, currently the video call is working, but I want to record call in client side;



These app work correctly. But I don't know how I can save the voice of the conversation on the client side, which is an Android app. Does anyone have any advice? 

I'm using  webrtc:1.0.32006 
Thanks

guest271314

unread,
Apr 2, 2023, 1:33:35 PM4/2/23
to discuss-webrtc
The client can use MediaRecorder; or pipe the MediaStreamTrack through MediaStreamTrackProcessor, extract the PCM and encode to WAV, MP3, or other codec in a media  container.

tales born

unread,
Sep 30, 2025, 9:37:23 AM (11 days ago) Sep 30
to discuss-webrtc
On the Web, you can record a WebRTC stream with MediaRecorder or use MediaStreamTrackProcessor to pull PCM and encode (WAV/MP3/AAC).

On Android native (including React Native), those are Web APIs and are not available. The org.webrtc Android SDK doesn’t expose a playout PCM callback, and react-native-webrtc doesn’t implement MediaRecorder/MediaStreamTrackProcessor.

Viable approaches on Android:
  • Fork/patch org.webrtc to add a playout PCM callback (e.g., in JavaAudioDeviceModule/WebRtcAudioTrack). This lets you tap the remote audio frames (similar to a custom RTCAudioDevice on iOS) and feed your encoder/muxer.
  • Use Android 10+ AudioPlaybackCapture via MediaProjection to capture the app’s playback and encode it. This requires a user permission prompt and captures device/app audio rather than just a specific WebRTC track.
If you need parity with an iOS custom RTCAudioDevice intercept, the forked org.webrtc approach is the closest match.
Reply all
Reply to author
Forward
0 new messages