Can I save recorded video in flv format using android?

897 views Asked by At

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

    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);
1

There are 1 answers

0
user370305 On

Basically Android doesn't support .flv files for videos. So you have to use some third party video convertor to convert .mp4 to .flv file. Or using ffmpeg you can able to do this.