streaming video FROM an iPhone

前端 未结 1 1694
清歌不尽
清歌不尽 2020-11-27 10:55

I can get individual frames from the iPhone\'s cameras just fine. what I need is a way to package them up with sound for streaming to the server. Sending the files once I ha

相关标签:
1条回答
  • 2020-11-27 11:11

    You could divide your recording to separate files with a length of say, 10sec, then send them separately. If you use AVCaptureSession's beginConfiguration and commitConfiguration methods to batch your output change you shouldn't drop any frames between the files. This has many advantages over frame by frame upload:

    • The files can be directly used for HTTP live streaming without any server side processing.
    • The gap between data transfers allow the antennas to sleep in between if the connection is fast enough, saving battery life.
    • Conversely, if the connection is slow so upload is slower than recording, managing delayed upload of a set of files is much easier than a stream of bytes.
    0 讨论(0)
提交回复
热议问题