Open brien-crean opened 9 months ago
Agent comment from yating.liao in Zendesk ticket #91288:
This should be a known issue on MSDK V4. We have identified the same problem on Samsung A53, Pixel 6a, Samsung SM-M115F, and Samsung Galaxy SM-X800. The issue is still being addressed.
°°°
Agent comment from yating.liao in Zendesk ticket #91288:
I'm sorry for the long wait. The issue with MSDK 4.X not being able to render videos on some models has been reported and the fix code has been submitted. It will be released with the official version 4.17.
°°°
version 4.17 has been released, just update the sdk in the app to solve the problem? I ask because it is not mentioned in the change log, rather I see that it has been added: "Added setCodecName function for DJICodecManager to solve the compatibility issue of video stream decoding on Android phones." How does it work?
You need to set the codec name after initializing the codec manager. I used this to set the codec to the Google h264 software decoder for my Pixel 7a and it fixed my issues.
val codecManager = DJICodecManager(context, surfaceTexture, width, height, DJICodecManager.VideoSource.CAMERA)
codecManager?.setCodecName("OMX.google.h264.decoder")
You can also get a list of all supported codecs for your device that are decoders and support video/avc
. It should list OMX.google.h264.decoder
but you can also try the others it supports to see if they work.
val codecList = MediaCodecList(MediaCodecList.ALL_CODECS)
val codecInfos = codecList.codecInfos
val targetType = "video/avc"
for (codecInfo in codecInfos) {
if (!codecInfo.isEncoder) {
val supportedTypes = codecInfo.supportedTypes
if (supportedTypes.contains(targetType)) {
println(codecInfo.name)
}
}
}
The c2.exynos.h264.decoder
hardware decoder on some newer Android devices seems to be causing a lot of the issues
Using a DJI Mini 2 with the Pixel 7a the camera feed only updates once or twice a minute. Often it is just a black screen.
If I run the same code on a Samsung A52 it works really well.
I see other users have the same issue with other Pixel devices and newer Samsung devices. I also tried sdk 4.17-alpha but the issue is the same. Will there be a fix for this issue?