Android Webrtc Record Video From The Stream Coming From The Other Peer


Answer :

VideoFileRenderer class just demonstrates how you can access to decoded raw video frames for remote/local peer. This is not recording valid video file.
You should implement manually the logic of encoding and muxing raw video frames into container, like mp4.

The main flow looks like that:

  • Switch to the latest webrtc version (v.1.0.25331 for now)
  • Create video container. For example see MediaMuxer class from Android SDK
  • Implement interface VideoSink for obtaining raw frames from certain video source. For example see apprtc/CallActivity.java class ProxyVideoSink
  • Encode every frame using MediaCodec and write to video container
  • Finalize muxer

Comments

Popular posts from this blog

Chemistry - Bond Angles In NH3 And NCl3

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Change The Font Size Of Visual Studio Solution Explorer