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
Related
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.
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.
I've the problem that some users with an Oneplus3 and the most recent Oxygen 4 version (Android Nougat) don't see any camera preview image anymore (it stays blank/black). The UI elements are still visible.
They also said in previous versions of oxygen OS the app was working correctly. I found out, that other apps got the same behaviour and fixed it, recently (i.e. Google's Cardboard Camera). But I don't know how to fix it and don't have a test device like the OP3.
I'm using the min SDK version 14 and the Camera API v1 with a SurfaceView to show the camera preview. On my phone (LG G4 with Marshmallow) the app works as expected.
Is somebody of you familiar with that issue and know how to fix it? What else can I try to solve that problem? Can you reproduce that issue on others phones with Android N, too?
You can find the source here: https://github.com/kloener/visor-android
For testing you can directly download it from Google Play (https://play.google.com/store/apps/details?id=de.visorapp.visor) or on github-releases (https://github.com/kloener/visor-android/releases)
kind regards and thanks
They need to give camera permission from application settings. I know they accept it while setting up app. But for Nougat user need to give an extra permission.
I download an MP4 file from the internet and play it on the blackberry device. I get the following error: "the video portion of the media being played uses an unsupported format". The audio starts playing, but the video doesn't play, while showing this error.
It should be noted that this only happens on Device OS 5 & 6. The same video plays properly or OS 7 and OS 7.1. I am guessing this is because RIM included some updates to MMAPI. What could i do to allow devices prior to OS 7 play the videos? OS 5 & 6 devices play MP4 files, just not all of them.
I have been looking into custom decoding the bytes of the MP4 file, but that will take a lot of time, looking into existing decoder implementation before adapting to J2ME, not an easy task.
Any help would be great here.
Edit:
The video content owners have control of the videos on the server side, but arent willing to re encode, mainly due to size concerns on the server, even though i recommended they do as well.
The resolution of the video is about 720w x 400h. This is quite high for a BB, but Bold 9790 and Torch 9810 both play it without a problem. So why cant Bold 9780 play the same file?
Update:
Regarding the problem with the video playing on a 9790 and not a 9780, those are different devices. The 9790 came out about a year after the 9780, and apparently RIM added more capability.
From 9780 specs:
Video player DivX/WMV/XviD/3gp
From 9790 specs:
DivX/XviD/MP4/H.264/H.263/WMV player
So, that explains why you can't get that video to play on the 9780. If playing this video is fundamental to your app, you might change the settings in BlackBerry App World to list it as incompatible with 9780s. If this is only one of many features of your app, you might at least catch the media exception and inform the user gracefully that their device can't play the video requested, so they don't think it's your app's fault.
Original Answer:
MP4 actually contains a family of related formats.
The actual support for your video probably depends both on your BlackBerry OS version (e.g. 5/6/7) and also the device itself.
Here is a BlackBerry reference document that describes video format capabilities of various BlackBerry devices.
See also this reference document.
Of course, different devices also have different sizes of screens.
It might be useful for you to produce the videos in a variety of formats and resolutions, and have your BlackBerry app download different versions of the video depending on the device. Since video downloads are slow, doing it this way will also ensure that the user sees the fastest possible download on their device. There's no use downloading a higher resolution than the device can display.
You didn't specify whether you have control of the videos on the server side or not, so this may not be an option for you.
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.