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

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

问题描述

我一直在使用相机插件,我知道可以通过 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天全站免登陆