什么技术最适合将iPhone视频摄像机数据直播到计算机? [英] What Techniques Are Best To Live Stream iPhone Video Camera Data To a Computer?

查看:107
本文介绍了什么技术最适合将iPhone视频摄像机数据直播到计算机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将视频从iPhone相机流式传输到Mac上运行的应用。想想视频聊天,但只有一种方式,从设备到接收器应用程序(而不是视频聊天)。

I would like to stream video from an iPhone camera to an app running on a Mac. Think sorta like video chat but only one way, from the device to a receiver app (and it's not video chat).

到目前为止我的基本理解:

My basic understanding so far:


  1. 你可以使用AVFoundation来获得'直播'视频摄像机数据而不保存到文件,但它是未压缩的数据,因此我必须自己处理压缩。

  2. 没有内置的AVCaptureOutput支持发送到网络地点,我必须独自完成这项工作。

我对上述情况是否正确,或者我已经离开了 - 跟踪?

Am I right about the above or am I already off-track?

Apple Tech Q& 1702 提供了一些关于将单个帧保存为图像的信息 - 这是最好的方法吗?只需保存30fps,然后再像ffmpeg那样压缩它们?

Apple Tech Q&A 1702 provides some info on saving off individual frames as images - is this the best way to go about this? Just saving off 30fps and then something like ffmpeg to compress 'em?

有很多关于iPhone直播的讨论,但关于发送直播的人的信息要少得多影像输出。我希望有一些广泛的笔触让我指向正确的方向。

There's a lot of discussion of live streaming to the iPhone but far less info on people that are sending live video out. I'm hoping for some broad strokes to get me pointed in the right direction.

推荐答案

这在很大程度上取决于你的目标分辨率以及您要定位的帧速率性能类型。

This depends a lot on your target resolution and what type of frame rate performance you are targeting.

从抽象的角度来看,我可能有一个捕获线程直接从AVCaptureOutput填充缓冲区,以及一个通信线程来发送和重新填充缓冲区(填充如果需要))每隔 x 毫秒到以前指定的主机。

From an abstract point of view, I would probably have a capture thread to fill a buffer directly from AVCaptureOutput, and a communications thread to send and rezero the buffer (padded if need be) to a previously specified host every x milliseconds.

完成初始数据传输后,我会努力在最低时达到15fps分辨率,并一直工作,直到缓冲区溢出,然后通信线程可以传输,这将需要平衡图像分辨率,缓冲区大小(可能依赖于GSM,很快将成为CDMA帧大小),最后是你可以的最大速率传输缓冲区。

After you accomplish initial data transfer, I would work on achieving 15fps at the lowest resolution, and work my way up until the buffer overflows before the communication thread can transmit which would require balancing image resolution, buffer size (probably dependent on GSM, and soon to be CDMA frame sizes), and finally the maximum rate at which you can transmit that buffer.

这篇关于什么技术最适合将iPhone视频摄像机数据直播到计算机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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