0

Here is my record function. The function working fine. recorded video save on sdcard but I want to straming video using socket instead of saving sdcard.

 private void initRecorder() {
    if (mMediaRecorder == null) {
        mMediaRecorder = new MediaRecorder();
        mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);
        mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
        mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
        mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
        mMediaRecorder.setVideoEncodingBitRate(512 * 1000);
        mMediaRecorder.setVideoFrameRate(30);
        mMediaRecorder.setVideoSize(DISPLAY_WIDTH, DISPLAY_HEIGHT);
        mMediaRecorder.setOutputFile(getFilePath());
    }
}    

Thanks for help me

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Osman Gani
  • 21
  • 1
  • 6

0 Answers0