android 到 android 直播视频流通过 Wifi 直连 (P2P)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20729388/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
android to android live video stream via Wifi direct (P2P)
提问by ashan8k
I have two android devices(phones).Let's call P1 and P2. I'm writing two apps, one for live-stream P1's camera video and other for view that video (from P2).
I want to connect these two devices via wifi Direct (No router). I have searched the internet for days now on how to implement a video streaming feature from an android phone to another android phone over a WiFi connection but not using Wifi direct (p2p).
Here I specifically want to do this via wifi direct. Can someone help me ?
Thank you :)
我有两个安卓设备(手机)。让我们打电话给 P1 和 P2。我正在编写两个应用程序,一个用于直播 P1 的相机视频,另一个用于查看该视频(来自 P2)。
我想通过 wifi Direct(无路由器)连接这两个设备。我已经在互联网上搜索了几天,了解如何通过 WiFi 连接实现从一部安卓手机到另一部安卓手机的视频流功能,但不使用 Wifi 直连 (p2p)。
在这里,我特别想通过 wifi direct 来做到这一点。有人能帮我吗 ?
谢谢 :)
回答by Dylan Watson
A few thoughts:
一些想法:
- To manage the WiFi direct/p2p connection you could use something like:
- To stream the video from a device, checkout these open-source examples
- To handle displaying the video, (depending on the video stream) you could use:
- 要管理 WiFi 直连/p2p 连接,您可以使用以下方法:
- 要从设备流式传输视频,请查看这些开源示例
- 要处理显示视频,(取决于视频流)您可以使用:
- 一个更新的ImageView
- 视频视图
- 请参阅:视频流和 Android
- 一个网页视图
回答by Hussain Nasif
Use ES Explorer APP from Google play
使用 Google play 的 ES Explorer APP
In App setting there is remote setting and check it and an ftp ip address like
在应用程序设置中有远程设置并检查它和一个 ftp ip 地址,如
"ftp://***********
will appear.
"ftp:// *** *** *****
会出现。
On the other device ES Explorer APP file menu select Ftp and add server and enter the ip address from other device.
在其他设备ES Explorer APP文件菜单中选择Ftp并添加服务器并输入其他设备的IP地址。
the first device will appear on second device now
第一个设备现在将出现在第二个设备上
Go it file system play videos
Go it 文件系统播放视频
enjoy...........................
请享用...........................