Reputation:
I'm doing a project which consists in controlling a drone (Tello) with a mobile phone. I choosed react native as hybrid app to develop this project, I had to insert a node.js inside the application (Node.js for Mobile Apps React Native) because the drone has only udp communication and also need a package to decode the stream video.
the drone has three udp ports, one of them is to receive instructions, another one is to send the drone status and the last one for sending the video.
This video I get from the stream it is in raw so I need a package to encode it or transform it.
I was testing things because there isn't documentation about this topic. I downloaded ffmpeg and after that I tried to decode the data in H.264 and finally I could see the video.
After this introduction I would like to ask you:
Is there any way I can use the same technique on the mobile without needing ffmpeg?
Is there any way to import ffmpeg into android and communicate with nodejs?
Upvotes: 1
Views: 645
Reputation: 31110
Is there any way I can use the same technique on the mobile without needing ffmpeg?
Yes, you can us the native video decoder. MediaCodec on android and VideoToolbox on iOS
Is there any way to import ffmpeg into android and communicate with nodejs?'
Yes, node js has bindings for C, and I'm am sure there are open source bindings. You could also use something like child_process
Is there any other solution where I can use another node that doesn't have to be on the phone?
Sure, tons.
Upvotes: 1