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
8
votes
1 answer

How do I pause video at the exact moment I capture a photo?

I am using AVFoundation to display a Video in my UIView via an AVCaptureVideoPreviewOverlay. I then use AVStillImageOutput's -captureStillImageAsynchronouslyFromConnection: to capture a still Image from the Video with the …
user1130254
  • 155
  • 2
  • 9
7
votes
2 answers

How do I implement a volume shutter in iOS 11?

I want to implement a volume shutter in my camera app. When the user presses the volume button, I should get an event to take a photo. I'm looking for an implementation that meets the following requirements: It should work even if the volume is…
Kartick Vaddadi
  • 4,818
  • 6
  • 39
  • 55
7
votes
2 answers

AVCapture preview freezes/stuck when unlocking the phone

My iOS camera app written in Objective C freezes its preview layer when coming back from the lock screen/when unlocking the phone. All the camera configurations settings are being called in the viewWillAppear. I have been successful so far, except…
sreejesh
  • 718
  • 5
  • 15
7
votes
2 answers

AVCapture appendSampleBuffer

I am going insane with this one - have looked everywhere and tried anything and everything I can thinks of. Am making an iPhone app that uses AVFoundation - specifically AVCapture to capture video using the iPhone camera. I need to have a custom…
6
votes
0 answers

How to manually control exposure duration with AVFoundation in OSX?

I'm using AVFoundation to capture images from a connected camera. I need to be able to control the exposure manually, instead of it being automatic. I've found AVCaptureDevice.exposureMode…
6
votes
0 answers

Why isn't my face detection code using CIDetector working properly?

I'm trying to detect faces in my iOS camera app, but it doesn't work properly, while it works properly in Camera.app. Notice that: The first face isns't detected in my app, only in Camera.app. For the third face — the east asian woman — Camera.app…
Kartick Vaddadi
  • 4,818
  • 6
  • 39
  • 55
6
votes
3 answers

iOS: captureOutput:didOutputSampleBuffer:fromConnection is NOT called

I want to pull frames from the live-feed of AVCaptureSession and I am using Apple's AVCam as a test case. Here is the link to AVCam: https://developer.apple.com/library/ios/samplecode/AVCam/Introduction/Intro.html I found that that…
Paul A.
  • 577
  • 2
  • 11
  • 24
6
votes
0 answers

How to use a video as an avcapture input

Trying to test a variety of camera inputs against an application, but since it would be prohibitive to get the webcam to do the exact same thing every time, and to change lenses, would like to just shoot videos and use it as an input. I can see how…
Mike Manh
  • 333
  • 2
  • 11
6
votes
2 answers

how to write video and audio simultaneously using AVCaptureVideoDataOutput and AVCaptureAudioDataOutput?

I've tried to make a video app like a vine by using "AVFoundation". Now I can save video through AVCaptureVideoDataOutput and can play.But somehow audio doesn't work and I don't know why. I'm beginner of the iOS app so it may be not clear to…
6
votes
2 answers

AVCaptureStillImageOutput Image returning upside down

I am capturing images from the camera using captureStillImageAsynchronouslyFromConnection The images are being saved upside down. I tried saving the image using UIImage *flippedImage = [UIImage imageWithCGImage:image.CGImage scale:image.scale…
some_id
  • 29,466
  • 62
  • 182
  • 304
6
votes
1 answer

How to change AVCaptureVideoPreviewLayer frame height and width

Please help me how to change the AVCaptureVideoPreviewLayer frame size and I am passing Height =100px ; and width = 300px. if i pass the height size 100 than width not change to 300px Here is code : AVCaptureVideoPreviewLayer *previewLayer =…
Sandeep Sachan
  • 373
  • 3
  • 15
6
votes
4 answers

Can't add a nil AVCaptureInput

I have a beta tester getting this error when trying to start a video session on our iPad app using the OpenTok iOS WebRTC SDK. The app crashes every time. User is on an iPad 2 with iOS 6.1.3. Does anyone have a clue what could be causing such an…
nickd717
  • 181
  • 2
  • 12
5
votes
0 answers

No depthData with iPhone X, iPhone XS is fine

I am not getting depthData when I take a photo on an iPhone X the first time I take a picture. Camera permissions are valid If I run the code on the iPhone X, take a picture, no depth data, if I tap again, I get depth data. If I add a delay before I…
Chris
  • 2,739
  • 4
  • 29
  • 57
5
votes
0 answers

How to save 'Array of images as burst-shot images in photo library' in Swift

"I'm trying to create burst-shot feature in my camera app, and want to save burst-shot images to photo library. Until now I'm having array of images by long pressing the capture button?"
shahrukh21
  • 200
  • 5
5
votes
2 answers

Objective-C AVCaptureDevice Front Camera

I have followed a tutorial that guided through a way to make a custom but simple camera app, almost exactly to the needs of the use I would like it. I actually have two issues that I need changing but I will focus on this first one for now. The…
Noodleme
  • 55
  • 1
  • 3
1
2
3
14 15