Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/186.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android MediaRecorder CaptureCreate和VideoFrameRate没有效果_Android_Mediarecorder - Fatal编程技术网

Android MediaRecorder CaptureCreate和VideoFrameRate没有效果

Android MediaRecorder CaptureCreate和VideoFrameRate没有效果,android,mediarecorder,Android,Mediarecorder,我正在使用MediaRecorder录制设备的屏幕。我希望能够控制捕获的视频的帧速率 我尝试设置MediaRecorder的捕获速率和视频帧速率属性,但它们似乎没有效果: this.mRecorder.setCaptureRate(this.fps); this.mRecorder.setVideoFrameRate(this.fps); 根据文档(,),在设置格式和视频源后,在调用prepare之前,我正在调用setCaptureRate和setVideoFrameRate: this.mR

我正在使用MediaRecorder录制设备的屏幕。我希望能够控制捕获的视频的帧速率

我尝试设置MediaRecorder的捕获速率和视频帧速率属性,但它们似乎没有效果:

this.mRecorder.setCaptureRate(this.fps);
this.mRecorder.setVideoFrameRate(this.fps);
根据文档(,),在设置格式和视频源后,在调用
prepare
之前,我正在调用
setCaptureRate
setVideoFrameRate

this.mRecorder = new MediaRecorder();
this.mRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
this.mRecorder.setVideoSource(2);
this.mRecorder.setOutputFormat(2);
this.mRecorder.setOutputFile(this.mFilePath);
this.mRecorder.setVideoSize(screenWidth, screenHeight);
this.mRecorder.setVideoEncoder(2);
this.mRecorder.setAudioEncoder(2);
this.mRecorder.setVideoEncodingBitRate(this.mBitRate);
this.mRecorder.setCaptureRate(this.fps);
this.mRecorder.setVideoFrameRate(this.fps);
this.mRecorder.prepare();
我已经检查过了,
this.fps
被设置为5,所以它不像其他不正确的值。。。报告说:

fps可以根据需要降到最低


有人知道如何设置FPS吗?

您有没有找到解决方案?我遇到了同样的问题。我似乎无法更改录制设备屏幕时捕获的视频的帧速率。我试过捕获速率和视频帧速率,但两者都没有效果。@Nate没有。对不起,你有没有想出解决办法?我遇到了同样的问题。我似乎无法更改录制设备屏幕时捕获的视频的帧速率。我试过捕获速率和视频帧速率,但两者都没有效果。@Nate没有。很抱歉