Questions tagged [avcaptureoutput]
51 questions
14
votes
2 answers
How to Record video using AVCaptureVideoDataOutput
Am using AVCaptureSession to get the camera output and have added successfully the audio and video inputs and outputs.
{
var captureDevice = AVCaptureDevice.defaultDeviceWithMediaType(AVMediaTypeVideo) as AVCaptureDevice
var error:…

Rajjjjjj
- 424
- 3
- 16
11
votes
3 answers
Pass data from ViewController to Representable SwiftUI
I am doing an object detection and used UIViewControllerRepresentable to add my view controller. The thing is that I can't pass data from my ViewController to my SwiftUI view. I can print it tho.
Can someone help me? This is my code:
//
import…

Yonus
- 233
- 2
- 12
9
votes
1 answer
Type 'OSType' does not conform to protocol 'AnyObject' in Swift 2.0
I just updated to Xcode 7 beta with Swift 2.0.
And when I updated my project to Swift 2.0, I got this error: "Type 'OSType' does not conform to protocol 'AnyObject' in Swift 2.0". My project works perfectly in Swift 1.2. And here is the code got…

hiennv92
- 810
- 1
- 8
- 12
9
votes
1 answer
iOS: error in __connection_block_invoke_2: Connection interrupted
Xcode/iOS 8/AVFoundation related error in console:
error in __connection_block_invoke_2: Connection interrupted
I am just adding AVCaptureVideoDataOutput to Apple's sample app 'AVCamManualUsingtheManualCaptureAPI'
What I added was:
// CoreImage…

Gizmodo
- 3,151
- 7
- 45
- 92
8
votes
1 answer
How to avoid AVCaptureVideoPreviewLayer from blinking when changing AVCaptureOutput
I have a running session and a preview layer that is presented inside my view.
I need to change the output several times in my application among AVCaptureStillImageOutput, AVCaptureMetadataOutput and AVCaptureVideoDataOutput, while my preview…

EdiZ
- 441
- 4
- 13
7
votes
3 answers
How to convert CVImageBuffer to UIImage?
I have temporary variable tmpPixelBuffer with pixel buffer data, which is not nil, and when metadata objects are detected I want to create image from that buffer, so I could crop metadata images from that image.
Image is always nil, what do I do…

Shmidt
- 16,436
- 18
- 88
- 136
5
votes
0 answers
AVFoundation captureOutput didOutputSampleBuffer Delay
I am using AVFoundation captureOutput didOutputSampleBuffer to extract an image then to be used for a filter.
self.bufferFrameQueue = DispatchQueue(label: "bufferFrame queue", qos: DispatchQoS.background, attributes: [], autoreleaseFrequency:…

Gizmodo
- 3,151
- 7
- 45
- 92
4
votes
0 answers
AVCaptureVideoDataOutput and AVCaptureVideoStabilizationModeCinematic preview lag
I have scratched my head for years but no outcome on this. When I have AVCaptureVideoDataOutput set and OpenGLES rendering of frames using AVCaptureVideoStabilizationModeCinematic, there is considerable delay in the preview. The delay is much much…

Deepak Sharma
- 5,577
- 7
- 55
- 131
3
votes
1 answer
AVCaptureSession Audio preview
I apologise in advance for the "dumb" question, but I feel I have exhausted all resources. I have little to no experience with Swift and coding in general but I understand much based on past experience and use of object based programming such as MAX…

Iwan Lane
- 31
- 4
3
votes
2 answers
AVCaptureSession resolution doesn't change with AVCaptureSessionPreset
I want to change the resolution of pictures I take with the camera on OS X with AV Foundation.
But even if I change the resolution of my AVCaptureSession, the output picture size doesn't change. I always have a 1280x720 picture.
I want a lower…

Namhto94
- 106
- 8
2
votes
1 answer
Why are my AVCapturePhotoOutput file outputs so large?
I'm creating a camera app and everything is working well but the file-size of the photos that is being uploaded to Firebase are too big. They are in the 3MB category and I would like them to be in the ±600KB category.
I have set the…

Brewski
- 654
- 3
- 14
- 29
2
votes
1 answer
Capturing video and saving it via AVAssetWriter
I want to save AVAssetWriter output to the camera roll, I'm currently saving it to the documents directory.
I have tried to use the UISaveVideoAtPathToSavedPhotosAlbum(_:_:_:_:) . I am currently using AVAssetWriter to write to the…

Brody Higby
- 137
- 1
- 8
2
votes
1 answer
iOS: captureOutput function isn't called using AVCaptureMovieFileOutput and AVCaptureVideoDataOutput
I'm trying to implement a View which can show the preview video of the rear camera and process the captured frames.
I would like to use two outputs: one to save the video and one to process each frame.
let movieOutput =…

Ricardo
- 2,086
- 25
- 35
2
votes
0 answers
PIP Effect on custom camera in ios
I am trying to create pip effect camera in ios using swift 4,for that I have taken the following controls:
View
FrontCameraView(ImageView)
BackCameraView(ImageView)
MaskedCameraView(ImageView)
FrontCameraView takes the blur image,Frame Image takes…

Pratz_iOS
- 67
- 1
- 8
2
votes
0 answers
Multiple AVCaptureVideoDataOutput per a single AVCaptureDevice at the same time
Scenario
I am working on an application that does video processing and streaming. I already have video capture from the back camera streaming perfectly. The problem is I have to do my processing to the video data also, but only locally. As it turns…

Brandon A
- 8,153
- 3
- 42
- 77