DJI-Mobile-SDK-Tutorials / Android-VideoStreamDecodingSample

This sample project demonstrates how to use FFmpeg for video frame parsing and to use MediaCodec for hardware decoding on DJI Products.
MIT License
170 stars 81 forks source link

Image Broken Problem HIGH #23

Open lillogoal opened 6 years ago

lillogoal commented 6 years ago

Hello, i tryed to implement your decoding sample. I think I have implemented it correctly.

MY DEVICE IS: NEXUS 5X and OSMO CAMERA.

NEXUS 5x android version 8.0 and also Samsung galaxy s7 with android 7.0

I USED THE LAST SDK 4.3.2

After decoding in FFMPEG image results is broken or not OK.(you can see attached).

Thanks in advance screenshot_1510831096300

kapejod commented 6 years ago

I can confirm this on Android 6 and 7 with different DJI products (Mavic, Osmo+).

kapejod commented 6 years ago

If i set useSurface in MainActivity.java to false the live stream is fine.

derouck commented 6 years ago

Problem exists on Android 8 as well, Nexus 5X, Phantom 3 Pro

amplogik commented 6 years ago

Similar problem on Android 7.0, tried with SDK 4.4.1, and earlier version 3.3.0.

Sending the data TextureView instead of SurfaceView works fine, no issues. Drawing to SurfaceView which invokes the DJIVideoStreamDecoder, scrambles the image, so you only get partial images, color artifacts banding across the screen and slow updates.

Samsung Galaxy Note 5

Issue seems to be present on older versions of the project as well.

Is this device dependent? Is there an issue with ffmpeg on Samsung devices?

Michael-DJI commented 6 years ago

we will update this demo to MSDK 4.5.1 in nearly days, pls try with new version.