Simply getting actual frame of the running video stream in Swift iOS
712 1 2020-7-20
Uploading and Loding Picture ...(0/1)
o(^-^)o
djiuser_knBhdps66D1l
lvl.1
Germany
Offline

Mavic 2 Pro - iOS Swift - MSDK
Hey all, maybe someone can help me. I am working with a Mavic 2 Pro and want to get ongoing the video fames in order to manipulate the image data based on content. In order to do is it seems the only method to get a video frame is making use of the cv_pixelbuffer_fastupload. I am using as a starting point the sample application provided.
I have to be honest... up to now it is really using a lot of time and I am really having problem to get the image data of a video frame. Making a image is not what I am looking for ;-)

I did try to adopt the informations floating around for objective-c which still do not work. Looks like we have a lot of deprecated stuff in the SDK. Also I tried to directly render the OPENGL view directly, which was also not possible :-(


Is it possible for someone to give me a sample of how I can retrieve continuesly the video frames of the drone, as image data I can work with on iOS Swift? just altering the demo application would already be fine for me.   

I guess it would require to add the func[color=rgba(255, 255, 255, 0.85)] videoProcessFrame[color=rgba(255, 255, 255, 0.85)](_[color=rgba(255, 255, 255, 0.85)] frame: UnsafeMutablePointer[color=rgba(255, 255, 255, 0.85)]<VideoFrameYUV[color=rgba(255, 255, 255, 0.85)]>!) method to the CameraFPVViewController.swift with all the other requirements. I did finally stuck on this with a problem accesing the data behind the frame: UnsaveMutablePointer<VideoFrameYUV>

Your help is highly appreciated.

KR Kai
2020-7-20
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules