PBJVision alternatives and similar libraries
Based on the "Camera" category.
Alternatively, view PBJVision alternatives based on common mentions on social networks and blogs.
-
SCRecorder
iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing -
Fusuma
Instagram-like photo browser and a camera feature with a few line of code in Swift. -
ALCameraViewController
A camera view controller with custom image picker and image cropping. -
SwiftyCam
A Snapchat Inspired iOS Camera Framework written in Swift -
BarcodeScanner
:mag_right: A simple and beautiful barcode scanner. -
FastttCamera
Fasttt and easy camera framework for iOS with customizable filters -
TGCameraViewController
Custom camera with AVFoundation. Beautiful, light and easy to integrate with iOS projects. -
CameraManager
Simple Swift class to provide all the configurations you need to create custom camera view in your app -
LLSimpleCamera
A simple, customizable camera control - video recorder for iOS. -
Cool-iOS-Camera
A fully customisable and modern camera implementation for iOS made with AVFoundation. -
Lumina
A camera designed in Swift for easily integrating CoreML models - as well as image streaming, QR/Barcode detection, and many other features -
RSBarcodes_Swift
1D and 2D barcodes reader and generators for iOS 8 with delightful controls. Now Swift. -
CameraEngine
๐๐ท Camera engine for iOS, written in Swift, above AVFoundation. ๐ -
CameraKit-iOS
Library for iOS Camera API. Massively increase performance and ease of use within your next iOS Project. -
ExyteMediaPicker
Customizable media picker written with SwiftUI -
JVTImageFilePicker
Easy and beautiful way for a user to pick content, files or images. Written in Objective C -
CameraBackground
Show camera layer as a background to any UIView -
TakeASelfie
An iOS framework that uses the front camera, detects your face and takes a selfie. -
RAImagePicker
๐ธ iMessage-like, Image Picker Controller Provides custom features. -
MockImagePicker
Mock UIImagePickerController for testing camera based UI in simulator -
#<Sawyer::Resource:0x00007f091a669cf0>
From camera to album, in just 2 lines
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of PBJVision or a related project?
README
PBJVision
PBJVision
is a camera library for iOS that enables easy integration of special capture features and camera interface customizations in your iOS app. Next Level is the Swift counterpart.
- Looking for a Swift version? Check out Next Level.
- Looking for a video player? Check out Player (Swift) and PBJVideoPlayer (obj-c).
Features
- [x] touch-to-record video capture
- [x] slow motion capture (120 fps on supported hardware)
- [x] photo capture
- [x] customizable user interface and gestural interactions
- [x] ghosting (onion skinning) of last recorded segment
- [x] flash/torch support
- [x] white balance, focus, and exposure adjustment support
- [x] mirroring support
Capture is also possible without having to use the touch-to-record gesture interaction as the sample project provides.
About
This library was originally created at DIY as a fun means for kids to author video and share their skills. The touch-to-record interaction was pioneered by Vine and Instagram.
Thanks to everyone who has contributed and helped make this a fun project and community.
Quick Start
PBJVision
is available and recommended for installation using the dependency manager CocoaPods.
To integrate, just add the following line to your Podfile
:
pod 'PBJVision'
Usage
Import the header.
#import "PBJVision.h"
Setup the camera preview using [[PBJVision sharedInstance] previewLayer]
.
// preview and AV layer
_previewView = [[UIView alloc] initWithFrame:CGRectZero];
_previewView.backgroundColor = [UIColor blackColor];
CGRect previewFrame = CGRectMake(0, 60.0f, CGRectGetWidth(self.view.frame), CGRectGetWidth(self.view.frame));
_previewView.frame = previewFrame;
_previewLayer = [[PBJVision sharedInstance] previewLayer];
_previewLayer.frame = _previewView.bounds;
_previewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
[_previewView.layer addSublayer:_previewLayer];
If your view controller is managed by a Storyboard, keep the previewLayer updated for device sizes
- (void)viewDidLayoutSubviews
{
_previewLayer.frame = _previewView.bounds;
}
Setup and configure the PBJVision
controller, then start the camera preview.
- (void)_setup
{
_longPressGestureRecognizer.enabled = YES;
PBJVision *vision = [PBJVision sharedInstance];
vision.delegate = self;
vision.cameraMode = PBJCameraModeVideo;
vision.cameraOrientation = PBJCameraOrientationPortrait;
vision.focusMode = PBJFocusModeContinuousAutoFocus;
vision.outputFormat = PBJOutputFormatSquare;
[vision startPreview];
}
Start/pause/resume recording.
- (void)_handleLongPressGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
{
switch (gestureRecognizer.state) {
case UIGestureRecognizerStateBegan:
{
if (!_recording)
[[PBJVision sharedInstance] startVideoCapture];
else
[[PBJVision sharedInstance] resumeVideoCapture];
break;
}
case UIGestureRecognizerStateEnded:
case UIGestureRecognizerStateCancelled:
case UIGestureRecognizerStateFailed:
{
[[PBJVision sharedInstance] pauseVideoCapture];
break;
}
default:
break;
}
}
End recording.
[[PBJVision sharedInstance] endVideoCapture];
Handle the final video output or error accordingly.
- (void)vision:(PBJVision *)vision capturedVideo:(NSDictionary *)videoDict error:(NSError *)error
{
if (error && [error.domain isEqual:PBJVisionErrorDomain] && error.code == PBJVisionErrorCancelled) {
NSLog(@"recording session cancelled");
return;
} else if (error) {
NSLog(@"encounted an error in video capture (%@)", error);
return;
}
_currentVideo = videoDict;
NSString *videoPath = [_currentVideo objectForKey:PBJVisionVideoPathKey];
[_assetLibrary writeVideoAtPathToSavedPhotosAlbum:[NSURL URLWithString:videoPath] completionBlock:^(NSURL *assetURL, NSError *error1) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"Video Saved!" message: @"Saved to the camera roll."
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"OK", nil];
[alert show];
}];
}
To specify an automatic end capture maximum duration, set the following property on the 'PBJVision' controller.
[[PBJVision sharedInstance] setMaximumCaptureDuration:CMTimeMakeWithSeconds(5, 600)]; // ~ 5 seconds
To adjust the video quality and compression bit rate, modify the following properties on the PBJVision
controller.
@property (nonatomic, copy) NSString *captureSessionPreset;
@property (nonatomic) CGFloat videoBitRate;
@property (nonatomic) NSInteger audioBitRate;
@property (nonatomic) NSDictionary *additionalCompressionProperties;
Community
Contributions and discussions are welcome!
Project
- Need help? Use Stack Overflow with the tag 'pbjvision'.
- Questions? Use Stack Overflow with the tag 'pbjvision'.
- Found a bug? Open an issue.
- Feature idea? Open an issue.
- Want to contribute? Submit a pull request.
Related Projects
- Next Level, rad media capture in Swift
- Player, a simple iOS video player in Swift
- PBJVideoPlayer, a simple iOS video player in Objective-C
Resources
- iOS Device Camera Summary
- AV Foundation Programming Guide
- AV Foundation Framework Reference
- objc.io Camera and Photos
- objc.io Video
- Cameras, ecommerce and machine learning
License
PBJVision is available under the MIT license, see the LICENSE file for more information.
*Note that all licence references and agreements mentioned in the PBJVision README section above
are relevant to that project's source code only.