dji-sdk / Mobile-SDK-Android-V5

MSDK V5 Sample
Other
293 stars 148 forks source link

Live Streaming is buggy (lagged) #340

Closed antonymarion closed 5 months ago

antonymarion commented 6 months ago

Hi,

We bumped to last release and use the startStream

but we get this log (it was not the case before)

image

Regards

antonymarion commented 6 months ago

For your information we tested both on our app using the SDK from DJI and on the DJI sample app (this repo) without changing anything to the repo... and we get the same issue: red logs and laggy stream

If we use ffmpeg over linux (to check if it comes from our side) there is no issue and the stream is not lagged.

The device we use is a Mavic 300 RTK.

antonymarion commented 6 months ago

I checked my firmware's versions and it is ok (up to date), so opened instead a ticket here: https://sdk-forum.dji.net

It looks like 0x19100002 is MRTC_ERROR_TIMEOUT ERROR code and code = 420478978 is https://sdk-forum.dji.net/hc/zh-cn/articles/12585337259033-%E4%B8%BA%E4%BB%80%E4%B9%88%E7%9B%B4%E6%92%AD%E6%8E%A8%E6%B5%81%E6%97%B6%E7%A0%81%E7%8E%87%E4%BC%9A%E7%AA%81%E7%84%B6%E9%99%8D%E5%88%B00

dji-dev commented 6 months ago

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

I have tested the sample code based on your description and did not encounter a similar issue. Could you please inform us about the type of live streaming you are using?

°°°

antonymarion commented 6 months ago

I am using liveStream.setRTMPConfig with the same RTMP server as previously and the same channel (and the same 300 RTK :D )

antonymarion commented 6 months ago

In case the information is usefull for your debugging purpose, here is the log I get from OvenMediaStream

image

SRS does not show human readable logs, so I prefer OvenMediaEngine

antonymarion commented 6 months ago

Reverting to 5.8.0 fixed my issue

dji-lyt commented 6 months ago

“If we use ffmpeg over linux (to check if it comes from our side) there is no issue and the stream is not lagged.” How should I interpret this sentence? Will there be no latency issues if you switch to using ffmpeg to get the live stream?

antonymarion commented 6 months ago

Exactly, no issue if I use ffmpeg instead to send a live stream to RTMP server

dji-dev commented 6 months ago

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

Could you please provide us with two versions of sample code for starting a live stream for comparison? Here is the upload link:https://pan-sec.djicorp.com/s/aKr4oE2T59nBREY password:dji123

°°°

dji-lyt commented 6 months ago

The issue has been identified with a reproducible method and will be escalated to the engineers for resolution.

antonymarion commented 6 months ago

Just to have an ETA, when can we expect to have the hoftix for this?

dji-dev commented 6 months ago

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

We are currently analyzing this issue. I will notify you here once I have the estimated time.

°°°

antonymarion commented 5 months ago

Just to let you know I reproduced the same issue on the mini 3 Pro too.

So I believe it is general (at least it exists for mini 3 Pro and 300 RTK)

antonymarion commented 5 months ago

I saw you released v5.9.1 for this ticket.

I am going to integrate it, thks

antonymarion commented 5 months ago

Tested. Fixed.

dji-dev commented 5 months ago

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

I'm glad that your issue has been resolved. If you encounter any exceptions while using the Mobile SDK, feel free to reach out to us.

°°°

antonymarion commented 5 months ago

Yes I did it already here:

the new release has breaking change regarding the API. It makes the code not maintenable when switching to last published version.

dji-lyt commented 5 months ago

image The CameraStreamListVM has not been modified in versions 5.9.0 and 5.9.1. You can view its modification history on GitHub. In fact, we cannot guarantee that the ViewModel of the sample code will remain unchanged, but we will ensure that the SDK interface will not change casually. Could you please provide us with a more detailed description if I have misunderstood your question?

antonymarion commented 5 months ago

One of our developpers has changed your source code that's why ...

Sorry for the disturbance!