Can I save recorded video in flv format using Android?

I am writing a program to record video from an Android camera. I was able to record it and save it as mp4. But I want to record and save it as flv. Here is my media recorder configuration. Can you tell me how can I change it to record in FLV format?

    mMediaRecorder.setPreviewDisplay(surface);
    mMediaRecorder.setCamera(mCamera);
    mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
    // mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
    mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
    mMediaRecorder.setOutputFile(this.initFile().getAbsolutePath());
    mMediaRecorder.setMaxDuration(50000);
    mMediaRecorder.setVideoFrameRate(15);
    mMediaRecorder.setVideoSize(320, 240);
    mMediaRecorder.setVideoEncodingBitRate(100000);
    // mMediaRecorder.setAudioEncodingBitRate(8000);
    mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263);
    // mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
+4
source share
1 answer

Basically, Android does not support .flvvideo files . Therefore, you need to use a third-party video converter to convert the file .mp4to .flv. Or using ffmpeg , you can do it.

+2
source

All Articles