I am creating an application that can record video, but the output is mirrored, which annoys me. The preview is perfect, but when I play a video from a video review, it is mirrored (also saved as a mirror image).
This is my code for setting up Mediarecorder, which I use.
mediaRecorder = new MediaRecorder();
mediaRecorder.setPreviewDisplay(holder.getSurface());
mediaRecorder.setCamera(camera);
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mediaRecorder.setVideoSize(640, 480);
mediaRecorder.setOrientationHint(270);
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT);
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC_ELD);
mediaRecorder.setMaxDuration(50000);
Thanks in advance.
source
share