Android ipcameraX,kotlin中的camera2
我对 Android 视频录制和分享还很陌生。
假设我有两个 Android 设备 D1 和 D2
在 D1 中我将屏幕分成几个部分,在顶部部分我显示来自 D1(cameraX) 的相机视图,在屏幕底部我需要获取相机视图来自D2。设备连接到同一 wifi 网络。 如何使用相同的 wifi 网络将视频从 D2 流式传输到 D1? 可以使用cameraX吗?
最低的应用 API 是 23
I quite new to android video recording and sharing.
Let say I've got two Android devices D1 and D2
In D1 I split screen in to do parts, in the top part I display camera view from D1(cameraX), and in the bottom part of the screen I need to get camera view from D2. Devices are connected to the same wifi network.
How to stream video from D2 to D1 using same wifi network?
It is possible using cameraX?
The lowest app API is 23
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有内置的Android API可轻松将视频数据从一台设备传输到另一台设备。您可以查看是否可以使用 webrtc 或类似于使您的生活更容易。
当然,您可以使用Camerax从D1和D2的摄像机中获取相机框架 - 例如,在D2上,ImageAnalysis用例将为您提供YUV框架,您应该能够进入WebRTC并转到D1。
There's no built-in Android APIs for easily streaming video data from one device to another. You could see if you can use WebRTC or similar to make your life easier.
You can certainly use CameraX to get the camera frames from D1 and D2's cameras - for example, on D2, the ImageAnalysis use case will give you YUV frames you should be able to pass into WebRTC and over to D1.