{"id":32314133,"url":"https://github.com/leoru/bdcamera","last_synced_at":"2026-02-20T22:03:04.910Z","repository":{"id":20633982,"uuid":"23915733","full_name":"leoru/BDCamera","owner":"leoru","description":"BDCamera is a simple camera with AVFoundation","archived":false,"fork":false,"pushed_at":"2015-10-09T18:32:38.000Z","size":300,"stargazers_count":13,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-14T09:50:09.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leoru.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-11T11:35:43.000Z","updated_at":"2025-02-24T00:06:02.000Z","dependencies_parsed_at":"2022-08-21T01:50:40.471Z","dependency_job_id":null,"html_url":"https://github.com/leoru/BDCamera","commit_stats":null,"previous_names":["borodutch/bdcamera"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/leoru/BDCamera","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoru%2FBDCamera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoru%2FBDCamera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoru%2FBDCamera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoru%2FBDCamera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leoru","download_url":"https://codeload.github.com/leoru/BDCamera/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoru%2FBDCamera/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29666455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T19:49:36.704Z","status":"ssl_error","status_checked_at":"2026-02-20T19:44:05.372Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-23T10:22:03.495Z","updated_at":"2026-02-20T22:03:04.904Z","avatar_url":"https://github.com/leoru.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"BDCamera is a simple video and photo camera with AVFoundation.\n\n## Get Started\n\n### Installation with CocoaPods\n[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like AFNetworking in your projects.\n\n#### Podfile\n```ruby\nplatform :ios, '7.0'\npod \"BDCamera\", \"~\u003e 0.1\"\n```\n\n### Default installation\nDrag the BDCamera folder to your project. This library must be ARC enabled.\n\n## Usage\nAt first import class for photo\n```objc\n#import \"BDStillImageCamera.h\"\n```\nor video\n```objc\n#import \"BDCamera.h\"\n```\n\nMake property for your camera\n```objc\n@property (nonatomic, strong) BDStillImageCamera *camera;\n// or\n@property (nonatomic, strong) BDCamera *camera;\n```\n\nNext, all you need is a UIView container in your controller for camera preview layer.\n```objc\nUIView *cameraView = [[UIView alloc] initWithFrame:self.view.bounds];\nself.camera = [[BDStillImageCamera alloc] initWithPreviewView:self preset:AVCaptureSessionPresetPhoto];\n//or\nself.camera = [[BDCamera alloc] initWithPreviewView:self preset:AVCaptureSessionPreset1280x720];\n\n[self.camera startCameraCapture];\n\n[self.view addSubview:cameraView];\n```\n\n### Photo Camera\nMake a photo\n```objc\n[self.camera captureImageWithCompletion:^(UIImage *capturedImage, NSError *error) {\n        // your captured image\n}];\n```\n\n### Video Camera\nVideo Camera has a delegate that gives you url for your recorded video.\nYou need to set a videoDelegate for camera.\n```objc\n  self.camera.videoDelegate = self;\n```\nStart record video\n```objc\nNSURL *movieURL = //url for video output file\nself.camera startRecordingWithURL:movieURL];\n```\nStop recording\n```objc\n[self.camera stopRecording];\n```\nVideo output will we sended in videoDelegate\n```objc\n- (void)didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL error:(NSError *)error\n{\n    // here you can save your recorded video to Photos, for example.\n    ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init];\n    [assetLibrary writeVideoAtPathToSavedPhotosAlbum:outputFileURL completionBlock:^(NSURL *assetURL, NSError *error) {\n        [[NSFileManager defaultManager] removeItemAtURL:url error:nil];\n        [self showSuccessAlert];\n    }];\n}\n```\nExamples of using BDCamera included in example project.\n\n## Some useful things\n#### Change recording FPS\nYou can recording slow motion videos with switching output FPS.\nMax FPS for iPhone 5 - 60.\nMax FPS for iPhone 5S - 120.\niPhone 5S: BDCamera recording video with AVCaptureMovieFileOutput and you can control your slow-motion videos in Photos.\n```objc\n[self.camera switchFPS:120.f];\n```\n\n#### Live previews feed\nBDCamera has a functionality of live previews.\n```objc\n/*\n    Every item in this array should be BDLivePreview for render live preview\n */\n@property (nonatomic, strong) NSMutableArray *displayedPreviews;\n```\nBDLivePreview is a subclass of GLKView.\nYou can create BDLivePreview with videoCamera EAGLContext.\n```objc\n//You need to enable sample buffer capturing\n[self.camera captureSampleBuffer:YES];\n\n// then create preview views\nCGRect frame = //some frame\nBDLivePreview *preview = [[BDLivePreview alloc] initWithFrame:frame context:self.camera.eaglContext];\nself.camera.displayedPreviews addObject:preview];\n[self.view addSubview:preview];\n```\nThat's all. \nI have tested BDCamera on 9 live previews.\n\n### Maintainers\n\n- [Kirill Kunst](https://github.com/leoru) ([@kirill_kunst](https://twitter.com/kirill_kunst))\n\n## License\n\nBDCamera is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoru%2Fbdcamera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoru%2Fbdcamera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoru%2Fbdcamera/lists"}