是否可以使用颤振相机插件流式传输视频? [英] Is it possible to stream a video with flutter camera plugin?

查看:35
本文介绍了是否可以使用颤振相机插件流式传输视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在玩相机插件,我知道有可能通过 CameraController 使用功能 start/stopVideoRecording 来捕捉视频,这些功能将将文件的路径作为输入.

I've been playing around with the camera plugin, I know there's the possibility to capture a video via the CameraController with the functions start/stopVideoRecording, the functions will take a path for a file as an input.

我希望能够在录制该视频时将其流式传输到服务器,是否可以通过相机插件的当前功能以某种方式实现?

I'd like to be able to stream this video to a server while it's being recorded, is it possible somehow with the current capabilities of the camera plugin?

推荐答案

看起来这是可能的,因为它是在 Flutter Live 上通过其中一个开发演示完成的.在这里查看 YouTube 视频.24:17.CameraController 上有一个名为 getByteStream 的方法.该方法的要点如下所示.

Looks like it is possible as it was done at Flutter Live with one of the development demos. Check out the YouTube video here . at 24:17. There is a method on the CameraController called getByteStream. The gist of the method shown below.

void cameraBytesToDetector({@required CameraController camera}){
  camera.startByteStream( (image) {
    // do something with the image stream here
  });
}

但是我在任何地方都找不到参考,因为我也在寻找一种读取视频流的方法.

But I can find no reference anywhere as I am also looking for a way to read the video stream.

这篇关于是否可以使用颤振相机插件流式传输视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆