pristineio / webrtc-android

A mirror of the Android AppRTC demo with sources for the libjingle_peerconnection library.
Other
191 stars 96 forks source link

Why is WebRTC video file so big? #19

Closed antogian closed 5 years ago

antogian commented 5 years ago

I'm trying to save video of WebRTC call. It's working but the video file is ridiculously big.

val recording = VideoFileRenderer(mPath, mWidth, mHeight,  
rootEglBase.eglBaseContext)
localVideoTrack.addSink(recording)

I think it's obvious that WebRTC doesn't apply any kind of compression to the video. Even though. I'm setting DefaultVideoEncoderFactory costructor's VP8 encoder to true.

val defaultVideoEncoderFactory = DefaultVideoEncoderFactory(rootEglBase.eglBaseContext, true, true)
ArikYa commented 5 years ago

WebRTC is applying compression to the transmitted video, it is the file renderer that doesn't

antogian commented 5 years ago

hmm, so how can I save the transmitted video locally?

ArikYa commented 5 years ago

You can get some idea at https://stackoverflow.com/questions/53031340/android-webrtc-record-video-from-the-stream-coming-from-the-other-peer/53260639#53260639