Questions tagged [avcapture]

iOS video capture API for both Swift and Objective-C

Some common high-level objects used with this API:

  • AVCaptureDevice
  • AVCaptureSession
  • AVCaptureVideoPreviewLayer

related tags:

223 questions
0
votes
1 answer

iOS Uploading AVCapture Recorded Video to Server via AFNetworking 3.0 Multipart

I record video thorough using AVCapture and pass that video url to next controller where i have AVPlayer, which play video fine and using this code to upload video on server, when i call this form viewDidAppear it is working fine but when i call…
Nauman Malik
  • 1,326
  • 9
  • 27
0
votes
1 answer

Capturing a picture in Landscape mode with AVCapture

Currently I have my ios app set up to be in landscape mode when it is run. The camera preview in the view is also in landscape, however when I take a photo it is taking them in portrait mode. I am wondering how I can capture the image in landscape…
tnaught
  • 301
  • 4
  • 13
0
votes
1 answer

iOS - AVCaptureDevice - Autofocus & Exposure with camera capture

I have been implementing Custom Camera using AVCaptureDevice, which require AutoFocus & Exposure to work nicely. I am using the following code to do the camera initialisation - (void) initializeCamera { AVAuthorizationStatus status =…
iphonic
  • 12,615
  • 7
  • 60
  • 107
0
votes
0 answers

Camera takes dark image with iPhone

I am working on a media app and for capturing images. I am using AVcapture. Everything is working fine but I am facing an issue : when I am taking 5 images in a row using the camera, the first picture usually comes darker than the others. My code…
sulphuric Acid
  • 585
  • 6
  • 23
0
votes
0 answers

Can't flash with the right timing

I am having trouble firing the flash in an iOS app using the camera to take pictures. Here is the function I call when I want to make the flash work: func litFlash() { if !captureDevice.hasFlash || !captureDevice.isFlashModeSupported(.On)…
Michel
  • 10,303
  • 17
  • 82
  • 179
0
votes
2 answers

AVCaptureStillImageOutput & UIImagePNGRepresentation

I am having a hard time for something I think shouldn’t be so difficult, so I presume I must be looking at the problem from the wrong angle. In order to understand how AVCaptureStillImageOutput and the camera work I made a tiny app. This app is able…
Michel
  • 10,303
  • 17
  • 82
  • 179
0
votes
1 answer

AvCapture / AVCaptureVideoPreviewLayer troubles getting the correct visible image

I am currently having some huge troubles getting what I want from AVCapture and AVCaptureVideoPreviewLayer etc. I am currently creating an app (available for Iphone devices but would be better if it would also works on ipad) where I want to put a…
Clad Clad
  • 2,653
  • 1
  • 20
  • 32
0
votes
1 answer

AVCaptureVideoDataOutput and Image display size on the screen

I use AVCaptureVideoDataOutput to retrieve images from the camera and display on the iPhone display. I run the code on iPhone 6 plus with iOS8.4 and it is fine. Images are shown on the full screen. But when I use iPhone4 with iOS 7.1 and iPad mini…
batuman
  • 7,066
  • 26
  • 107
  • 229
0
votes
1 answer

How to convert AVCaptureStillImageOutput to UIImage and save as NSData?

I am trying to send a photo with the app I am working on, I have made the app to take a photo and then when you tap on send it would send the photo you just took to send it through mail. But I don't know how to convert the photo that is of type…
Pixele9
  • 422
  • 8
  • 25
0
votes
0 answers

Orientation of UIImage in captureStillImageAsynchronouslyFromConnection:connection of AVCaptureConnection

I'm using the following method to capture a frame from a AVCaptureStillImageOutput - (void)captureImage:(void(^)(NSError*, UIImage*))completionHandler { AVCaptureConnection *connection = [_photoOutput connectionWithMediaType:AVMediaTypeVideo]; …
loretoparisi
  • 15,724
  • 11
  • 102
  • 146
0
votes
1 answer

AVAssetWriter Recording Audio 2 times slower?

I am trying to record the Audio using AVAssetWriter. But when in plays the File it plays 2 times slower than the origninal audio. What i have done is creating a AVAssetWriter in Following way.. _writer = [AVAssetWriter assetWriterWithURL:url…
0
votes
0 answers

"AVFoundationErrorDomain" - code: 1844

i'm trying to write a simple code to capture video using Swift =====Code========= override init() { var err:NSErrorPointer = NSErrorPointer(); camDev = AVCaptureDevice.defaultDeviceWithMediaType(AVMediaTypeVideo); camSession = …
msalam
  • 21
  • 2
0
votes
0 answers

Custom camera works, live preview does not

I'm attempting to build a custom camera app. Tasks: Shows an live image preview. Allows you to tap anywhere on the screen to capture an image. Displays the resulting image above the live image preview. Currently everything works except for task…
0
votes
1 answer

Capturing image that exists within video preview layer

I'd like to capture only the image within the video preview layer. Currently, I set it like this: [self setCaptureManager:[[[CaptureSessionManager alloc] init] autorelease]]; [[self captureManager] addVideoInputFrontCamera:YES]; // set to YES for…
cph2117
  • 2,651
  • 1
  • 28
  • 41
0
votes
1 answer

ios7 AVFoundation performance issues (memory leak)

I am using AVFoundation to capture QR codes in my app. In ios 7.0 I am seeing some major issues with regards to the video capture. The capture takes longer and longer each time i do it, leading the app to crash due to memory leak issues. It works…
Atul Bhatia
  • 1,633
  • 5
  • 25
  • 50
1 2 3
14
15