Question

I'm recording videos with MediaRecorder, but it appears that whatever setting I use, the framerate is appalling (~ 1fps)

This is my code:

    recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
    recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
    CamcorderProfile cp = CamcorderProfile.get(HIGH_QUALITY ? CamcorderProfile.QUALITY_HIGH : CamcorderProfile.QUALITY_LOW);
    System.out.println("RECORDING AT " + cp.videoFrameRate); // Says 30fps
    recorder.setProfile(cp);


    recordingFilename = tempFileName();
    recorder.setOutputFile(recordingFilename);
    recorder.setPreviewDisplay(holder.getSurface());

    try {
        recorder.prepare();
    } catch (IllegalStateException e) {
        e.printStackTrace();
        finish();
    } catch (IOException e) {
        e.printStackTrace();
        finish();
    }



    recorder.start();

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top