CamcorderProfile.QUALITY_HIGH分辨率产生绿光闪烁视频 [英] CamcorderProfile.QUALITY_HIGH resolution produces green flickering video

查看:1334
本文介绍了CamcorderProfile.QUALITY_HIGH分辨率产生绿光闪烁视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我还没有发现任何解释这个至今。基本上,我有工作出色时setVideoSize()设置为720×480对我的三星Galaxy S2的视频记录类。

I haven't found any explanation for this so far. Basically I have a video recording class which works splendidly when setVideoSize() is set to 720 x 480 on my Samsung Galaxy S2.

我希望它这样使用CamcorderProfile.QUALITY_HIGH我可以得到各种高品质的录音属性和我的类中设置它们在尽可能高的分辨率记录。这适用于文件格式,视频帧速率,连接codeRS和比特率,但是当我尝试设置视频大小由CamcorderProfile(1920×1080)返回的宽度和高度,录制的视频仅仅是一个绿色的闪烁。

I want it to record in the highest possible resolution so using CamcorderProfile.QUALITY_HIGH I can get the various highest quality recording properties and set them within my class. This works for file format, video frame rate, encoders and bit rate, however when I attempt to set the video size to the width and height returned by the CamcorderProfile (1920 x 1080), the video recorded is just a green flicker.

我发现,如果我改变了720×480 720×481它也做了同样的事情。因此,我只能假设发生这种情况时,不支持通过手机的分辨率。然而,摄像机的手机附带可在1920×1080的记录,并产生良好的记录。

I noticed if I changed 720 x 480 to 720 x 481 it did the same thing. Therefore I can only assume this happens when the resolution isn't supported by the phone. However, the camcorder the phone came with can record in 1920 x 1080 and it produces an excellent recording.

我只能这么高的分辨率,我需要不同的设置一些其他参数假设,但我只是不能找出他们可能。

I can only assume with such a high resolution I need to set some other parameters differently, but I just cant figure out what they might be.

任何人都有这个问题?

先谢谢您的任何答复。

推荐答案

我碰到这个问题,试图解决同样的问题。

I came across this question trying to solve the same problem.

有一个解决方案,给出了在XDA开发者<一href="http://forum.xda-developers.com/showthread.php?t=1104970&page=8">http://forum.xda-developers.com/showthread.php?t=1104970&page=8.看来你需要设置一个不起眼的参数cam_mode高清录音工作:

A solution is given over on xda developer http://forum.xda-developers.com/showthread.php?t=1104970&page=8. It seems that you need to set an obscure parameter "cam_mode" for high definition recording to work:

camera = Camera.open();
Camera.Parameters param = camera.getParameters();
param.set( "cam_mode", 1 );     
camera.setParameters( param );

在mediarecorder,你就可以使用

In mediarecorder, you can then use

mediarecorder.setVideoSize(1920, 1080);

虽然这现在也可以工作:

although this will now also work:

mediarecorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH));

(后者似乎有20MB / s的视频比特率,所以你可能要采取降一点!)我发现我没有设置preVIEW尺寸为1920×1080。

(The latter seems to have a video bitrate of 20Mb/s, so you might want to take that down a bit!) I found that I didn't have to set the preview size to 1920x1080.

(编辑),您还需要设置

(edit) You also need to set

parame.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);

param.setFocusMode(Camera.Parameters.FOCUS_MODE_INFINITY);

否则,你的相机开始前获得几秒钟的延迟!

otherwise you get a delay of a few seconds before the camera starts!

至于为什么三星已经实现了相机在这样,我也没办法。这当然不是开发商友好!

As to why Samsung has implemented the Camera in this way, I have no idea. It's certainly not developer friendly!

这篇关于CamcorderProfile.QUALITY_HIGH分辨率产生绿光闪烁视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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