我在android中使用MediaRecorder录制.mp4。我使用android4ffmpeg lib减慢速度,然后将视频(.mp4)旋转90度。我该如何解决?
如果使用.mp4(在Android中通过手机摄像头录制),请不要旋转!但是使用MediaRecorder它总是旋转90度。
命令是
String[] complexCommand = { "ffmpeg", "-y", "-i", "", "-strict",
"experimental", "-filter_complex",
"[0:v]setpts=4.0*PTS[v];[0:a]atempo=2.0[a]", "-map", "[v]",
"-map", "[a]", "-b", "2097k", "-r", "60", "-vcodec", "mpeg4",
"" };
mediarecorder
recorder.setCamera(mCamera);
recorder.setPreviewDisplay(sufaceHolder.getSurface());
recorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
recorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH));
recorder.setOutputFile(inFileName);
// recorder.setOrientationHint(90);
recorder.prepare();
recorder.start();