dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
996 stars 581 forks source link

Mobile SDK LiveStream Sample Code - Only audio is streamed #1330

Open George2397 opened 2 weeks ago

George2397 commented 2 weeks ago

I'm having a hard time streaming the live drone camera feed into the RTMP server. I am using the sample code from DJI. Here is the Live Stream View class that I use: https://github.com/dji-sdk/Mobile-SDK-Android/blob/master/Sample%20Code/app/src/main/java/com/dji/sdk/sample/demo/camera/LiveStreamView.java

The code in my project is exactly the same (I cloned the sample code), except that I changed the switch statement into an if-else.

The problem I'm facing is that I can successfully send audio from the mobile app to my RTMP server, but the frames are not streamed. The root cause of this is because the video feed itself only shows the first frame of the drone's camera video feed and then it becomes stuck. If I move the drone, nothing is shown on the video feed in the android app, other than the initial frame

Is there something I'm missing on the sample code?

Information: Drone Model: DJI Mini 2 Device: Samsung Galaxy S24 Plus Android Version: 14 DJI SDK Version: 4.18 Gradle Configuration: implementation 'com.dji:dji-sdk:4.18' compileOnly 'com.dji:dji-sdk-provided:4.18' Kotlin Version: 1.6.20 Gradle Version: 8.4.0 Min SDK Version: 23 Target SDK Version: 34 Compile SDK Version: 33

Update: Seems like the code works as expected with my Xioami device. Therefore the issue has to do with Samsung Galaxy S24+.

dji-dev commented 2 weeks ago

Agent comment from yating.liao in Zendesk ticket #121027:

Have you attempted to use the sample code without any modifications to achieve streaming? Can the mainstream live streaming platforms receive the video feed?

°°°