What Techniques Are Best To Live Stream iPhone Video Camera Data To a Computer?

前端 未结 2 947
不知归路
不知归路 2021-01-29 19:53

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 vid

2条回答
  •  后悔当初
    2021-01-29 20:55

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

    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.

    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.

提交回复
热议问题