VideoCapture how can support 4K

293 views
Skip to first unread message

Raphael Lee

unread,
Nov 10, 2020, 10:28:31 PM11/10/20
to Android CameraX Discussion Group
when i use it,720p and 1080p can supported but 4k some devices not supported

Raphael Lee

unread,
Nov 10, 2020, 10:29:09 PM11/10/20
to Android CameraX Discussion Group, Raphael Lee
my qa devices local camera support 4k

Eric Ng

unread,
Nov 11, 2020, 12:57:05 PM11/11/20
to Raphael Lee, Android CameraX Discussion Group
Hi Raphael,

Thanks for writing in - Video Capture is under active development at the moment and additionally not all devices can support 4k.

Can you share with us which devices are you trying to get 4k working on?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/1cbd50f6-91cc-4ca3-a6d6-8cb8fce122c4n%40android.com.


--
-Eric Ng

Raphael Lee

unread,
Nov 13, 2020, 1:06:29 AM11/13/20
to Android CameraX Discussion Group, Eric Ng, Android CameraX Discussion Group, Raphael Lee
When I tested Task only XIAOMI9, One Plus5T supports 4k. Like Honor 10, Mi 6 is not supported. I have no more equipment to test it.But their system cameras all support 4k

Patrick Liao

unread,
Mar 14, 2021, 9:34:44 AM3/14/21
to Android CameraX Discussion Group, raphael...@gmail.com, Eric Ng, Android CameraX Discussion Group
Hi,

I also have a XIAOMI MI 9 but never got 4k to work...Here's what I tried for shooting in 4K but the output is always in 1080p for some reason:


屏幕截图 2021-03-14 213358.png

Any ideas?

Best,
Patrick Liao

Charcoal Chen

unread,
Mar 14, 2021, 10:27:25 PM3/14/21
to Android CameraX Discussion Group, lbypa...@gmail.com, raphael...@gmail.com, Eric Ng, Android CameraX Discussion Group
Hi,

Although VideoCapture exists in the current CameraX library, the related APIs are not public and it can only be used by camera-view's CameraController with @ExperimentalVideo. The existing VideoCapture's max resolution is limited to be under 1080p. Therefore, 1080p will still be selected for VideoCapture even if you have specified its target resolution as 3840x2160. We're still working on the new VideoCapture design now and the max resolution restriction might be removed. Please wait for the new public VideoCapture. Thanks.

Patrick Liao

unread,
Mar 15, 2021, 2:41:50 AM3/15/21
to Android CameraX Discussion Group, charco...@google.com, Patrick Liao, raphael...@gmail.com, Eric Ng, Android CameraX Discussion Group
Hi Charcoal,

Thanks for the reply. I would definitely wait for the new VideoCapture to come out.

While we are at it, is it possible to have something like VideoAnalysis (The video version of ImageAnalysis) and make it work with VideoCapture simotaneously? I remember that I used to bind both an ImageAnalysis and a VideoCapture instance but experienced serious performance issues even if I did nothing in my analyzer code, and at some point Google blocked me from doing so altogether by prompting me "unsupported combination -- may be binding too many use cases". 

Such feature will allow us to utilize OpenCV for eye-AF or other real-time AF features for video, which is something that only new mirrorless cameras and Sony Xperia 1 could deliver. Since other android phone have equally good, if not better, CMOS and CPU (+Xperia 1 does not have additional hardware for camera), implementing such features with CameraX should also be possible.

Best,
Patrick Liao

Charcoal Chen

unread,
Mar 15, 2021, 3:58:43 AM3/15/21
to Android CameraX Discussion Group, lbypa...@gmail.com, Charcoal Chen, raphael...@gmail.com, Eric Ng, Android CameraX Discussion Group
Hi Patrick,

For the VideoAnalysis feature request, I have created an issue http://issuetracker.google.com/issues/182727920 for it.

About the "unsupported combination -- may be binding too many use cases", it is because whether the use case combination can be supported depends on the camera device's hardware level and is restricted by the guaranteed configuration tables listed in CameraDevice's Regular capture section. I suppose that you need to bind a Preview with VideoCapture and ImageAnalysis at the same time. Then, PRIV (for Preview) + PRIV (for VideoCapture) + YUV (for ImageAnalysis) streams will be needed. By checking the table, I can only find that the following configuration of Level-3 device can support it. But the Preview or VideoCapture will be very small (640x480). If the device is not hardware level Level-3, then, you will encounter the "unsupported combination" problem. If this is not your case, please provide more information about your use case combination and the camera device hardware level for us to clarify it. Thanks.

PRIV/PREVIEW   PRIV/640x480   YUV/MAXIMUM.  RAW/MAXIMUM.         In-app viewfinder analysis with dynamic selection of output format.

Patrick Liao

unread,
Mar 15, 2021, 4:09:57 AM3/15/21
to Android CameraX Discussion Group, charco...@google.com, Patrick Liao, raphael...@gmail.com, Eric Ng, Android CameraX Discussion Group
Yes, both devices I tested (XIAOMI MI 9 and XIAOMI MI 10 Pro) (mainland China models of course) are level-3 devices as indicated by log. And yes I used to bind Preview + ImageAnalysis + VideoCapture. Such configuration cannot be directly achieved for some reason (resulting in "unsupported combination"). According to my old logic, I first have Preview + ImageAnalysis + ImageCapture, then at the time when user hits "record", I unbind ImageCapture and bind VideoCapture, and it worked but is very laggy...

And about RAW...Is CameraX capable of outputing DNG with ImageCapture? I don't really need it but it is a nice-to-have.

Best,
Patrick Liao

Charcoal Chen

unread,
Mar 15, 2021, 6:02:50 AM3/15/21
to Android CameraX Discussion Group, lbypa...@gmail.com, Charcoal Chen, raphael...@gmail.com, Eric Ng, Android CameraX Discussion Group
Could you describe more about the laggy issue? Does it look frame-dropped in Preview? laggy in ImageAnalysis or in the capture video file? If possible, a video to show the laggy symptom will be great.

About the RAW question, CameraX doesn't support DNG output for ImageCapture. The configuration mentioned previously was copied from the developer website and I didn't remove the RAW item to make it the same as the website.

Reply all
Reply to author
Forward
0 new messages