dji-sdk/Payload-SDK

About DJI-H264 encoding for streaming

OpusK opened this issue · 8 comments

OpusK commented

Hi, all.

I'm using the PSDK to develop Camera Streaming.
Existing streaming with H/W capture card encoder was working well.
And now I want to use CUDA encoder with other capture card because of the discontinuation issue.

The newly encoded image has passed DJIPSDKVideoStreamCheckTool's test, but nothing is output from DJI App like below.
It comes out transparent. (Main screen is FPV Camera)
20220110_182947

The test environment is as follows.

  • PSDK : V3.0.0-beta.0-build.1440
  • Aircraft : 03.00.0101
  • Remote Controller : 03.01.0000

And below is additional information.

I have confirmed that there is no problem with encoding with the following documents and tools, but if I have a part I missed, please let me know.

Agent comment from DJI SDK in Zendesk ticket #59031:

尊敬的开发者,感谢您联系DJI 大疆创新
由于github不是我们主要的咨询渠道,您的问题可能跟进不及时。我们建议您通过填写表单( https://djisdksupport.zendesk.com/hc/zh-cn/requests/new )向我们反馈问题。或者您也可以在论坛发帖,与其它开发者交流。论坛链接:https://djisdksupport.zendesk.com/hc/zh-cn/community/topics

Dear developer, thank you for contacting DJI.
Since github is not our main consultation channel, your questions may not be followed up in time. We recommend that you fill in the form (https://djisdksupport.zendesk.com/hc/en-us/requests/new) to report problems to us. Or you can post in the forum to communicate with other developers. Forum link: https://djisdksupport.zendesk.com/hc/zh-cn/community/topics

°°°

Agent comment from cheney.zeng in Zendesk ticket #59031:

I used your video and the original sample for testing, the video works well here, it`s recommended that you could use the original sample to have a try.
https://github.com/dji-sdk/Payload-SDK


inline592030315.png
inline488072011.png

°°°

OpusK commented

Hi, @dji-dev

Thanks for testing and responding.
But, my question is for real time camera streaming, not media file streaming.

However, my approach is using the method of transmitting the frame immediately when encoding (25fps) is complete.
Therefore, depending on the encoding time, there may be a difference in the interval time of the frame transmission.
Can this be a problem?

For reference, I confirmed that the files I uploaded and the transcoded files in your samples were completely the same as the binary.

Agent comment from cheney.zeng in Zendesk ticket #59031:

The sample could work with your video, it means the SDK part and your video part are working well.
Now when you use the real time camera streaming, theres no streaming out, I think its your code issue, and it needs to debug it by yourself.

It`s recommended to refer to the documentation and the PSDK sample to debug your code.
https://developer.dji.com/document/414e4790-84ea-4c44-aa08-75ce8b616d97

inline1762255683.png

°°°

OpusK commented

Hi, @dji-dev

I was using it as your explanation.
As I said earlier, I was doing real-time video streaming through other hardware encoders.
However, since the transmission interval and encoding contents are somewhat different from the existing HW encoding while using the CUDA Encoder, I asked if these parts can affect streaming.

Anyway, thank you for confirming that there is no problem with the encoding part.

Agent comment from cheney.zeng in Zendesk ticket #59031:

You are welcome, if the provided encoded media archive file is from CUDA Encoder, it could work with the sample, which means there is no problem with it.

°°°

OpusK commented

Oh, it was just my fault..
Because of compiler optimization, data length was not updated for AUD... so it not sent AUD data.. :(
Anyway, it is solved!
Thanks for support :)

Agent comment from cheney.zeng in Zendesk ticket #59031:

You are welcome, happy to hear that the issue has been fixed, have a nice day.

°°°