开发者

MediaRecorder video framerate

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();
    }



    r开发者_StackOverflowecorder.start();


It appears that it is the ROM I am using. I didn't realise I get the same crappy frame rate using the standard Camera app when recording video.

Nevermind :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜