如何翻转使用前置摄像头拍摄的视频android [英] how to flip the video taken using front camera android

查看:2072
本文介绍了如何翻转使用前置摄像头拍摄的视频android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用前置摄像头拍摄时,我有一个镜像翻转的视频。

I have a video that mirror flips when I take it using the front camera.

用于捕获视频的表面视图在录制时显示镜面效果,但在播放时被翻转。

The surface view that is used to capture the video shows the mirror effect when recording but then it is flipped while playing the same.

请帮助我。

推荐答案

这是一个预期的行为。您无法运行镜像的视频录像机。你可以自己翻转帧(在onPreviewFrame回调中接收帧),并使用MediaCodec和她的亲自自己生成一个视频文件。或者,您可以对视频进行后处理,例如 ffmpeg

This is an expected behavior. You cannot run the video recorder mirrored. You can flip the frames yourself (receiving the frames in onPreviewFrame callback) and use MediaCodec and her kin to produce a video file on your own. Or you can post-process your video, e.g. with ffmpeg.

这篇关于如何翻转使用前置摄像头拍摄的视频android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆