[英]Live-stream video from one android phone to another android phone over WiFi
I want to write 2 apps: 我想编写2个应用程序:
1: Master app to control the robot(from the handheld phone) which want to control the slave app and receive the stream. 1:主应用程序控制机器人(从手持电话),该机器人要控制从属应用程序并接收流。
2: Slave app which will run on the robot-strapped phone, controlling the motors/actuators/streaming to master app. 2:从属应用程序,它将在机器人绑定的电话上运行,控制电机/执行器/流到主应用程序。
Unfortunately I can not use third party apps. 不幸的是,我不能使用第三方应用程序。 I need to integrate the video stream code into my 2 apps.
我需要将视频流代码集成到我的2个应用中。
What options are there for achieving this? 有哪些选择可以实现这一目标? Also is it very hard to do because I never worked with video streaming, tough I am doing pretty good in both Java and Android development.
这也是很难做到的,因为我从未使用过视频流,很难在Java和Android开发中都做得很好。
How should I encode/decode the stream, how do I initiate the connection, will I need to work with UDP instead of TCP/IP? 我应该如何编码/解码流,如何启动连接,是否需要使用UDP而不是TCP / IP? I really don't know where to start, with no sample code anywhere.
我真的不知道从哪里开始,哪里都没有示例代码。 I am pretty sure this can be achieved.
我很确定这可以实现。 I just can't find anything useful to get me started in the right direction.
我只是找不到任何有用的方法来帮助我朝正确的方向入手。
I stumbled across spydroid but it is using VLC on a desktop so its no good for me. 我偶然发现了spydroid,但它在桌面上使用VLC,因此对我不利。
I do something like you want and can help you, Let me know some issue about your request Hadi: 我会做您想要的事情并且可以为您提供帮助,让我知道有关您的请求的一些问题哈迪:
1-You indeed want to control a robot with native application on your smart phone? 1-您确实要在智能手机上使用本机应用程序控制机器人吗?
2-You have a phone on a robot the phone receive your command from master application and control motors/actuators/streaming ..yes? 2-您在机器人上有电话,电话会从主应用程序接收命令并控制电动机/执行器/流。
3-Whats streaming in this application? 3-此应用程序中有什么流? do you have Camera on your robot and want to receive Camera view on your master application?
您的机器人上是否有相机,并且想在主应用程序上接收相机视图?
4-Why you dont use some board like Raspberyy Pi for control your robot? 4-为什么不使用Raspberyy Pi这样的板子来控制机器人? you can send command to RasPi over Wifi and Control Please answer some question: 1-you indeed want to control motors/actuators/streaming by the 16 pins exist on that, and can use a camera on RasPi, and stream receive frame to your master application
您可以通过Wifi和Control向RasPi发送命令请回答一些问题:1-您确实想通过存在的16个针脚来控制电机/执行器/流,并且可以在RasPi上使用摄像头并将流帧接收到主机应用
About: 关于:
Slave app which will run on the robot-strapped phone, controlling the motors/actuators/streaming to master app.
从属应用程序,它将在机器人绑定的电话上运行,控制电机/执行器/流到主应用程序。 How do you want access motor with a smartphone?!!!
您想如何使用智能手机访问电机?!! motor or actuators want get data from standard output that a smartphone dont have that!!!
电机或执行器要从智能手机没有的标准输出中获取数据!!!
About: 关于:
Unfortunately i can not use third party apps.
不幸的是我不能使用第三方应用程序。 I need to integrate the video stream code into my 2 apps.
我需要将视频流代码集成到我的2个应用中。
I think you dont need third application!!! 我认为您不需要第三次申请!!! Its done with 2 application completely.
它完全用2个应用程序完成。
About: 关于:
How should I encode/decode the stream, how do I initiate the connection, will I need to work with UDP instead of TCP/IP?
我应该如何编码/解码流,如何启动连接,是否需要使用UDP而不是TCP / IP? I really don't know where to start, with no sample code anywhere.
我真的不知道从哪里开始,哪里都没有示例代码。 I am pretty sure this can be achieved.
我很确定这可以实现。 I just can't find anything useful to get me started in the right direction.
我只是找不到任何有用的方法来帮助我朝正确的方向入手。
I say that you dont need to write full streaming server for a streaming application, some application like ffmpeg could stream video very simple and stable,it run in Linux and Windows . 我说您不需要为流应用程序编写完整的流服务器,像ffmpeg这样的应用程序可以非常简单且稳定地流式传输视频,它可以在Linux和Windows上运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.