Cropping on high fps?

52 views
Skip to first unread message

Patrick Liao

unread,
Mar 26, 2021, 4:49:11 AMMar 26
to Android CameraX Discussion Group
Hi,

I am currently recording 50fps videos with CameraX and my devices XIAOMI MI 9 and XIAOMI MI 10 Pro with only the preview usecase and VideoCapture usecase bound.

When I do setVideoFrameRate(int) for the VideoCapture instance and make the fps 50/60, an arbitrary crop will be applied AFTER I do startRecording()...

Is it possible to disable it? If not, is there a way for me to tell what exactly the crop factor is? I noticed that such crop will be added regardless of the zoom values set by camera.getCameraControl.setZoomRatio() and crop on top of it...

This is crucial to one of the features I have in my app...

Thank you.

Best,
Patrick Liao

AL(XiangCheng) Ho

unread,
Mar 29, 2021, 4:51:17 AMMar 29
to Android CameraX Discussion Group, lbypa...@gmail.com
Hi Patrick,

Thanks for your feedback. These are precious information.

I have no mi 9 and mi 10 pro in hand now. Before digging into the cropping issue. Could you please help to provide your recording result information?

Question 1:
About arbitrary crop problem, do you mean that the recording result's resolutions are different every time even you use same configuration?
If possible, could you attach these video files?

Question 2:
Do you set resolution (using setTargetResolution() ) for video capture? If not, the resolution (1920 x 1080) should be applied.

Currently VideoCapture's default setting are: Framerate: 30fps and Resolution: 1920 (width) x 1080 (height).

Question 3:
Have you ever try to remove setVideoFrameRate()? What's that result?

And I am thinking your case should be the high speed video recording which is currently not taken into account by VideoCapture.

I am skeptical that the output result is adjusted/cropped by codec because of the frame rate.


Patrick Liao

unread,
Mar 31, 2021, 7:38:51 AMMar 31
to Android CameraX Discussion Group, AL(XiangCheng) Ho, Patrick Liao
Hi XiangCheng,

Unfortunately, I cannot share any screenshot of my app (yet) with you for security reasons :( but here is what I observed:

Question 1: No, the resulting resolution stays the same, always 1080p as set by my VideoCapture instance.
Question 2: See Q1.
Question 3: I had setVideoFrameRate(50), BUT this is actually NOT the reason why it is cropping in.

In fact, when I try to set CONTROL_AE_TARGET_FPS_RANGE to be {50,50}, the cropping issue occurs (With Camera2Control, and I remember I encountered the same issue when I was using Camera2Extender, so maybe Camera2's problem?!). 

I don't think the codec is doing the crop since the codec is always saying 1080p/raw @50 in its log, but something else is...

Regards,
Patrick Liao

Patrick Liao

unread,
Mar 31, 2021, 7:44:51 AMMar 31
to Android CameraX Discussion Group, AL(XiangCheng) Ho, Patrick Liao
And in case you are wondering, MI 10 Pro's main CMOS is Samsung GN1 and MI 9's is Sony IMX 586, which are widely used by phone manufacturers.

Please try to grab a non-MIUI device with the same CMOS (i.e. GN1: Vivo X60 Pro+, IMX 586: Galaxy S10 Lite, OnePlus 7 Pro, Realme X, Blackshark 2) and see if you can reproduce such issue. If not, then it would be a MIUI-specific issue.

Best,
Patrick Liao
On Monday, March 29, 2021 at 4:51:17 PM UTC+8 AL(XiangCheng) Ho wrote:
Reply all
Reply to author
Forward
0 new messages