So, I have implemented opencv to my android project, but when listing avaliable sizes for resolution I get the highest value of 1920x1080(im using Samsung Galaxy s6 Edge Plus). The highest resolution with default camera is 5312x2988, after that 3984x2988 and so on.
I have tried finding answer on the internet, but there is no explanation on how to do this and, if its not possible, why it isn't. Can someone help?
Im using OpenCV 3.2, Android Version 7.0
Your device does not deliver its full camera capabilities through the deprecated camera API, which is supported for backwards compatibility with legacy apps. You should use the new camera2 API to unlock higher video resolutions. While the native interface to camera2 has been introduced recently, it is still not accommodated in OpenCV. Luckily, there is a Java class that can help. An official tutorial shows how this new API can be used in your app.
Related
How to use Camera2 and CameraX libraries to open android phone cameras faster using java programing language?
I'm using this lib implementation 'androidx.camera:camera-core:1.2.1'
I'm trying to implement camera functionality to open my phone camera using a latest library of google on the latest devices and open faster.
I setup the video view with video. I have three testing devices. I used the first one can play the video normally. But I used another two devices that cannot play the video just show a black screen.
I tried to use another video that can be played on all devices. So is the video problem or other problem.
I just added the `OnInfoListener` and logged the what variable. The value is 10951 that is `MEDIA_INFO_UNSUPPORTED_VIDEO`. So anyone know. what is the meaning of the MEDIA_INFO_UNSUPPORTED_VIDEO.
Update:
I found the reason why cannot be played. Because the video codecs is not supported on all android device. My video is used H.264. But Samsung and Nokia cannot support it. So anyone know which codecs can support on all devices or any way can make me play the video normally.
More detail for the device:
cannot play video: Samsung Galaxy A20s os 10, Nokia C2 os 9
can play video: Redmi Note 4 os 6.0.1
MEDIA_INFO_UNSUPPORTED_VIDEO is shown when the video resolution exceeds the maximum resolution of the codec supported by the chipset.
For H.264,
Chipset in A20s is Qualcomm Snapdragon 450 which supports till 1080p.
Chipset in Redmi Note 4 is Qualcomm Snapdragon 625 which supports till 4k.
Chipset in Nokia C2 is Unisoc 28nm which supports till 1080p.
The problem mentioned occurs due to codec limitation and has nothing to do with OS version and player used.
I had a similar problem with VideoView, but after converting the video, it worked. Try this site and see if it works for you: https://video.online-convert.com/convert-to-mp4 (you don't need to apply any video settings, just upload and hit Start conversion)
Anyway I've switched on ExoPlayer
it took quite a few days to realize that something wrong is going on with old devices with API lower than 23 and I searched intensively but without an answer. So when I found my answer I thought that it's worth sharing with the community
I used multiple emulator versions but the weird thing is that some devices couldn't either load the video (sudden stop) or it loads it till showing the thumbnail and it freezes, so the answer is basically that nothing is wrong with ExoPlayer, it's just the emulator that cannot play the media with an emulator with lower API than 23 due to a decoder issue but mainly on a usual use ExoPlayer will function properly with android devices of 16+ API. you can check the DOCUMENTATION for more details.
is there a way or an API to code an IR booster in Java?
We want to develop an app (we are in grade 11, south africa) that is able to control the tv remote/channel using an android tablet.
so my question: is there already a built API for an IR Booster in Java?
Thanks in advance!
There is nothing in the Android SDK regarding IR. IR capabilities are provided by device manufacturers, and only on a few devices. Please contact your device manufacturer to inquire about device-specific SDKs related to IR.
As stated in a previous answer, there is no IR API in the Android SDK. So you have to look for the venders.
For HTC, the HTC OpenSens SDK provides an API.
For Samsung, as far as I know, they don't provide an API. However, there is this irDude application on GitHub that could be used as a starting point. It was developped for the Galaxy Note, but who knows, it may also work with other Samsung devices.
I want to use my laptop camera in the Android Emulator, but the app crashes when I try to do so. Moreover, the emulator itself can't use the camera. Is there any software or SDK version that supports webcams. Currently I am using the Android Froyo 2.2 SDK.
Thanks!
I haven't tried that yet, although it sounds rather useful. You might wann check this
How to use web camera in android emulator to capture a live image?
and
Using Camera in the Android emulator
One answer says, this is only supported in the emulator starting with android ICS (4.0), but no further information is provided, so you might want to invest a little more research on this version.