Camsoft
Camsoft

Reputation: 12005

Do the video capture APIs on iPhone running iOS4+ encode video on-the-fly?

I'm just researching at the moment the possibility of writing an app to record an hours worth of video/audio for a specific use case.

As the video will be an hour long I would want to encode on-the-fly and not after the recording has finished to keep disk usage to a minimum.

Do the video capture APIs write a large uncompressed file to disk that has to be encoded after or can they encode on-the-fly resulting in a optimised file written to disk?

It's important that the video is recorded at a lower resolution than the iPhone's advertised 720/1080p as I need to keep the file sizes down due to length of video (which will need to be uploaded).

Any information you have would be appreciated or even just a pointer in the right direction.

Upvotes: 1

Views: 972

Answers (1)

Steve McFarlin
Steve McFarlin

Reputation: 3596

No they do not record uncompressed to disk (unless this is what you want). You can specify to record to a MOV/MP4 and have the video encoded in H264. Additionally you can control the average bit rate of the encoding. You can also specify the capture size, and output encoding size along with scaling options if needed. For demo code check out AVCamDemo in the WWDC 2010 sample code. This demo code may now be available in the docs.

Upvotes: 3

Related Questions