Mobile-SDK-iOS icon indicating copy to clipboard operation
Mobile-SDK-iOS copied to clipboard

Can't see FPV camera video from M300 RTK with sample app

Open seungbeom-son opened this issue 4 years ago • 19 comments

I installed swift sample project with my own Bundle identifier & DJISDKAppKey.

It successfully launched and detected my aircraft, M300 RTK.

But, when I moved to FPV page, I could not get video from the M300 RTK.

What should I do to get video stream from FPV camera.

In addition, I also need to get video from the payload camera (H20) at the same time.

How can I do this.

IMG_0001

IMG_0002

seungbeom-son avatar Nov 24 '20 01:11 seungbeom-son

Agent comment from Luce Luo in Zendesk ticket #41390:

Dear Customer,

Thank you for contacting DJI. For the M300RTK, need to assignSource and setupFrameControlHandler. Please refer to the attachment to implement it.

Thanks,

Luce Luo DJI Developer Support
CameraFPVViewController.swift

dji-dev avatar Nov 24 '20 09:11 dji-dev

Hi, Can you try my solution? https://github.com/dji-sdk/Mobile-SDK-iOS/issues/413

Matheus193dn avatar Dec 22 '20 02:12 Matheus193dn

Agent comment from Luce Luo in Zendesk ticket #41390:

Dear Customer,

Thank you for contacting DJI. For the M300RTK, need to assignSource and setupFrameControlHandler. Please refer to the attachment to implement it.

Thanks,

Luce Luo DJI Developer Support CameraFPVViewController.swift

Hi..

I have tried your solution.. It is not working..

I am really in trouble.. I am not able to assign source for M300 - using OcusyncLink. when I try to assign it gives me error. Please see below.

I have tried various combinations: Primary - Secondary channel - error code

  1. FPV - LEFT - 1008
  2. FPV - TOP -1008
  3. FPV - RIGHT -1008
  4. FPV - FPV -1005
  5. TOP - FPV - 1008
  6. LEFT - FPV - 1008
  7. RIGHT - FPV - 1008
  8. MAIN - FPV - 1005
  9. FPV - MAIN - 1005

I believe because of that I am not getting feed from drone..

Please help me out..

Best Regards, Himanshu

HimanshuChowdharyIndia avatar Mar 12 '21 12:03 HimanshuChowdharyIndia

@HimanshuChowdharyIndia Hi, Can you show me your source code when you fetch m300 camera? Also, please update to the latest firmware of drone and propo.

Matheus193dn avatar Mar 12 '21 12:03 Matheus193dn

@HimanshuChowdharyIndia Hi, Can you show me your source code when you fetch m300 camera? Also, please update to the latest firmware of drone and propo.

Hi,

I have updated M300 latest firmware.. I am using 4.14 DJI sdk..

I believe nimble is not attached with M300.. That is why while fetching camera it gives me nil value.. It also give nil camera list.

please see fetch camera code below.. It is same as provided in sample app..

fileprivate func fetchCamera() -> DJICamera? { guard let product = DJISDKManager.product() else { return nil } if product is DJIAircraft || product is DJIHandheld { return product.camera } return nil }

Best Regards, Himanshu

HimanshuChowdharyIndia avatar Mar 12 '21 12:03 HimanshuChowdharyIndia

@HimanshuChowdharyIndia M300 can't work like normal camera, it uses ocusynclink to fetch data and decode it by using VideoAdapter(you can find it in FPV folder of DJISample). It also needs to set enable for hardware decode

Matheus193dn avatar Mar 12 '21 12:03 Matheus193dn

@HimanshuChowdharyIndia M300 can't work like normal camera, it uses ocusynclink to fetch data and decode it by using VideoAdapter(you can find it in FPV folder of DJISample). It also needs to set enable for hardware decode

@Matheus193dn I have gone through the documentation and I understands that initially we need to assign source as given in sample app (https://github.com/dji-sdk/Mobile-SDK-iOS.git).. I am following this sample code strictly... In fact I tried Sample code.. I am not getting any video..

HimanshuChowdharyIndia avatar Mar 12 '21 12:03 HimanshuChowdharyIndia

@Matheus193dn

I am following same as expected in below mentioned file CameraFPVViewController.txt

CameraFPVViewController.txt

Please help me out to figure out where I am wrong..

HimanshuChowdharyIndia avatar Mar 12 '21 12:03 HimanshuChowdharyIndia

@HimanshuChowdharyIndia M300 can't work like normal camera, it uses ocusynclink to fetch data and decode it by using VideoAdapter(you can find it in FPV folder of DJISample). It also needs to set enable for hardware decode

@Matheus193dn Please tell me when I need to enable hardware decode... Before starting DJIPreviewer Instance or after??

HimanshuChowdharyIndia avatar Mar 12 '21 13:03 HimanshuChowdharyIndia

@HimanshuChowdharyIndia You can try my worked sample code below, i cloned from dji sample so you can download whole project and then replace with your dji key https://github.com/Matheus193dn/Mobile-SDK-iOS/blob/master/Sample%20Code/SwiftSampleCode/DJISDKSwiftDemo/Camera/fpv/CameraFPVViewController.swift

Matheus193dn avatar Mar 12 '21 13:03 Matheus193dn

@HimanshuChowdharyIndia You can try my worked sample code below, i cloned from dji sample so you can download whole project and then replace with your dji key https://github.com/Matheus193dn/Mobile-SDK-iOS/blob/master/Sample%20Code/SwiftSampleCode/DJISDKSwiftDemo/Camera/fpv/CameraFPVViewController.swift

@Matheus193dn FPV video is not coming in sample code you have shared.. I have added my DJI app key.. Then moved to FPV after getting connected with M300... I am not able to see video.. I clicked HardwareDecode.. Still I am not getting video..

HimanshuChowdharyIndia avatar Mar 12 '21 14:03 HimanshuChowdharyIndia

@HimanshuChowdharyIndia do you have any android device, if you have one, plz get DJI Pilot App. Just confirm that your camera still working.

P/S:

  • My sample code worked on H20T camera, do you have the same as me?

  • I no longer work with DJI drone Project, but i will try my best to help you.

image

Matheus193dn avatar Mar 12 '21 14:03 Matheus193dn

@HimanshuChowdharyIndia do you have any android device, if you have one, plz get DJI Pilot App. Just confirm that your camera still working.

P/S: I no longer work with DJI drone Project, but i will try my best to help you. image

@Matheus193dn We have tested on Android device (Sample app and our app) and we are getting feed.. In Android the way is pretty different..

HimanshuChowdharyIndia avatar Mar 12 '21 14:03 HimanshuChowdharyIndia

@HimanshuChowdharyIndia So how i can help you directly now?

Matheus193dn avatar Mar 12 '21 14:03 Matheus193dn

@HimanshuChowdharyIndia do you have any android device, if you have one, plz get DJI Pilot App. Just confirm that your camera still working. P/S: I no longer work with DJI drone Project, but i will try my best to help you. image

@Matheus193dn We have tested on Android device (Sample app and our app) and we are getting feed.. In Android the way is pretty different..

@Matheus193dn DJI Pilot for iOS has also Video issues while using with M300..

HimanshuChowdharyIndia avatar Mar 12 '21 14:03 HimanshuChowdharyIndia

@HimanshuChowdharyIndia So how i can help you directly now?

@Matheus193dn As per my knowledge DJI Pilot and Sample App provided by DJI and You are not showing video.. If Possible please help me by providing Sample App which confirms that it will show Video Feed (FPV) from M300 RTK.. That will help me A lot..

Thanks a lot for your support.. Himanshu

HimanshuChowdharyIndia avatar Mar 12 '21 15:03 HimanshuChowdharyIndia

@HimanshuChowdharyIndia How i can contact directly with you, because i no longer work in drone project. Do you use teamviewer or zoom? I can help you debug it.

Matheus193dn avatar Mar 12 '21 15:03 Matheus193dn

@HimanshuChowdharyIndia How i can contact directly with you, because i no longer work in drone project. Do you use teamviewer or zoom? I can help you debug it.

Sorry for late reply.. Please contact me on my email id : [email protected] .. We can exchange meeting detail via email.. Thank you..

HimanshuChowdharyIndia avatar Mar 15 '21 05:03 HimanshuChowdharyIndia

I had the same issue and it seems when there is no payload camera attached it's just not possible to view the fpv video feed because assignSource requires two valid channels to be passed. Once I connected a payload camera as the leftCamera the code linked by @Matheus193dn worked just fine

brien-crean avatar Jul 07 '21 22:07 brien-crean