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