All Projects → piemonte → Pbjvision

piemonte / Pbjvision

Licence: mit
📸 iOS Media Capture – features touch-to-record video, slow motion, and photography

Programming Languages

objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to Pbjvision

Nextlevel
NextLevel was initally a weekend project that has now grown into a open community of camera platform enthusists. The software provides foundational components for managing media recording, camera interface customization, gestural interaction customization, and image streaming on iOS. The same capabilities can also be found in apps such as Snapchat, Instagram, and Vine.
Stars: ✭ 1,940 (+0%)
Mutual labels:  snapchat, camera, media, capture, photography, avfoundation
Hybridcamera
Video and photo camera for iOS
Stars: ✭ 145 (-92.53%)
Mutual labels:  snapchat, camera, avfoundation
Swiftycam
A Snapchat Inspired iOS Camera Framework written in Swift
Stars: ✭ 1,879 (-3.14%)
Mutual labels:  snapchat, camera, avfoundation
Agimagecontrols
cool tools for image edition
Stars: ✭ 217 (-88.81%)
Mutual labels:  camera, capture, avfoundation
Kontax Cam
Instant camera hybrid with multiple effects and filters written in Swift.
Stars: ✭ 69 (-96.44%)
Mutual labels:  camera, photography
Mmalsharp
C# wrapper to Broadcom's MMAL with an API to the Raspberry Pi camera.
Stars: ✭ 152 (-92.16%)
Mutual labels:  camera, photography
Recordbutton
A record button in Swift
Stars: ✭ 101 (-94.79%)
Mutual labels:  recording, camera
Cameracontrollerapi
The CameraControlerApi is an attempt to control a DSLR via REST functionality.
Stars: ✭ 110 (-94.33%)
Mutual labels:  camera, photography
Ios tips
iOS的一些示例,持续更新中:1、AVFoundation 高仿微信相机拍摄和编辑 2、AVFoundation 人脸检测、实时滤镜、音视频编解码、GPUImage框架的使用等音视频相关内容 3、OpenGLES 4、LeetCode算法练习 5、iOS Crash防护和APM监控 6、WKWebView相关的内容 等........
Stars: ✭ 896 (-53.81%)
Mutual labels:  camera, avfoundation
Albumcamerarecorder
一个高效的多媒体支持操作库,可多方面的简单配置操作相册、拍照、录制、录音等功能。也支持配套使用的展示图片、视频、音频的九宫格功能。 (An efficient multimedia support operation library, can be a variety of simple configuration operation album, photo, recording, recording and other functions.Also support supporting the use of the display of pictures, video, audio of the nine grid function.)
Stars: ✭ 106 (-94.54%)
Mutual labels:  camera, capture
Miniaudio
Single file audio playback and capture library written in C.
Stars: ✭ 1,889 (-2.63%)
Mutual labels:  recording, capture
Aperture
Record the screen on macOS
Stars: ✭ 1,051 (-45.82%)
Mutual labels:  capture, avfoundation
Gncam
📷 A Swift 3 library for interacting with the camera on iOS using AVFoundation
Stars: ✭ 42 (-97.84%)
Mutual labels:  camera, avfoundation
Portfolio Photo
Jekyll based portfolio using Flickr API.
Stars: ✭ 15 (-99.23%)
Mutual labels:  camera, photography
C Is For Camera
A 35mm camera, based on the Canonet G-III QL17 rangefinder, simulated in Python.
Stars: ✭ 138 (-92.89%)
Mutual labels:  camera, photography
Fullscreencamera
A Full Screen Camera App written in Swift
Stars: ✭ 131 (-93.25%)
Mutual labels:  camera, avfoundation
Androidcamera
🔥🔥🔥自定义Android相机(仿抖音 TikTok),其中功能包括视频人脸识别贴纸,美颜,分段录制,视频裁剪,视频帧处理,获取视频关键帧,视频旋转,添加滤镜,添加水印,合成Gif到视频,文字转视频,图片转视频,音视频合成,音频变声处理,SoundTouch,Fmod音频处理。 Android camera(imitation Tik Tok), which includes video editor,audio editor,video face recognition stickers, segment recording,video cropping, video frame processing, get the first video frame, key frame, v…
Stars: ✭ 2,112 (+8.87%)
Mutual labels:  camera, media
Cameraengine
🐒📷 Camera engine for iOS, written in Swift, above AVFoundation. 🐒
Stars: ✭ 554 (-71.44%)
Mutual labels:  camera, capture
Snapchat Clone
👻 A SnapChat clone built with React, Redux and Typescript. Styled with SASS. Tested with Cypress, Jest and Enzyme. Linted with Eslint and formatted with Prettier!
Stars: ✭ 770 (-60.31%)
Mutual labels:  snapchat, camera
Camera
📸 Custom Camera for iDevices in swift
Stars: ✭ 114 (-94.12%)
Mutual labels:  camera, avfoundation

PBJVision

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.

Build Status Pod Version GitHub license

Features

  • touch-to-record video capture
  • slow motion capture (120 fps on supported hardware)
  • photo capture
  • customizable user interface and gestural interactions
  • ghosting (onion skinning) of last recorded segment
  • flash/torch support
  • white balance, focus, and exposure adjustment support
  • 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

Related Projects

Resources

License

PBJVision is available under the MIT license, see the LICENSE file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].