Android camera uses ISO values to record video

Source: Internet
Author: User

Android camera uses ISO values to record video

My application is to use a custom camera to record a video on an LED light box, the frequency of the LED is 1000HZ, and I use a high ISO value recording, the final desired effect, such as the screen will appear in the visible black stripes .

To achieve this effect, set the following settings for the camera's parameters: "Code 1"

P. Setscenemode(Camera. Parameters. SCENE_mode_auto);P. setantibanding(Camera. Parameters. Antibanding_auto);P. Setfocusmode(Camera. Parameters. FOCUS_mode_continuous_picture);P. Set("Camera-mode",1);P. Set("Qc-camera-features",1);P. Set("ISO","ISO3200");Camera. Setparameters(p);Camera. Setpreviewdisplay(holder);Camera. Startpreview();

Then I initialize the Mediarecorder and record the video. The code is as follows: "Code 2"

Camera. Unlock();Mrecorder. Setoninfolistener(this);Mrecorder. Setonerrorlistener(this);Mrecorder. Setcamera(camera);Mrecorder. Setaudiosource(Mediarecorder. Audiosource. Camcorder);Mrecorder. Setvideosource(Mediarecorder. VideoSource. CAMERA);Mrecorder. Setprofile(Camcorderprofile. Get(Camcorderprofile. Quality_high));Mrecorder. Setoutputfile(path);Mrecorder. Setpreviewdisplay(Msurfaceholder. Getsurface());Mrecorder. Prepare();Mrecorder. Start();

The result is that the video begins to record, the black stripes disappear, and the appearance becomes:

After calling the Mediarecorder.stop () method to stop recording, the black stripe appears again. This time I use the lock AE method: "Code 3"

p = camera.getParameters();p.setAutoExposureLock(true);camera.setParameters(p);

Re-execute the code 2 above and start the second recording again, and the entire recording process screen will have black stripes to achieve the effect I want.

Why don't you lock the exposure when the first preview is effective? I tested, initially locked exposure, when the first recording of black stripes will still disappear, and the first recording after the end of the black stripes no longer appear, you need to stop the preview, and then reopen the preview to restore the black stripes!

I think I can record black stripes when I record it for the first time. This black stripe appears, it should be related to the sensitivity of the light, I always do not know why the first record of the stripe will disappear, before recording will automatically gather once? Cause lock AE to fail? Or what other reason? Have black stripes restored after the first recording? Why?

Android camera uses ISO values to record video

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.