Last week I mentioned an excellent library for easier disk I/O from Andrew Sliwinski and earlier today I mentioned a helpful tutorial for anyone looking to do video capture and video editing with AVFoundation.
Since finding that tutorial I’ve come across another open source library by Andrew for that makes video recording using AVFoundation dead simple.
This library allows you to quickly set up a camera, start/stop recordings, check if the camera is in use, preview the recording and more with just a few lines of code.
To set up the camera you could do something like this taken from the example:
cam = [[DIYCam alloc] init];
[[self cam] setDelegate:self];
[[self cam] setup];
cam.preview.frame = display.frame;
CGRect bounds = display.layer.bounds;
cam.preview.bounds = bounds;
cam.preview.position = CGPointMake(CGRectGetMidX(bounds), CGRectGetMidY(bounds));
and start the capture with:
You can find the library on Github here with further documentation.
Definitely a library to keep handy in case you ever want to drop video recording into an app and don’t want to go through the pain of learning to use AVFoundation yourself.
Submit A Resource
Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?
You can submit the url here.
The resources we feel will appeal to our readers the most will be posted on the front page.