avcapturesession

Turn on torch/flash on iPhone 4

I know that the only way to turn on the flash and keep it on on iPhone 4 is by turning the video camera on. I'm not too sure of the code though. Here is what I am trying: -(IBAction)turnTorchOn { AVCaptureSession *captureSession = [[AVCaptureSession alloc] init]; AVCaptureDevice *videoCaptureDevice = [AVCaptureDevice defaultDeviceWithMe...

Make a button start the app

So I have made a custom UIButton and added it to the code and made the connections in interfacebuiler. I want the button to work as a on and off switch, how do I do this correctly? I'm a beginner at iphone development and this is for a school project for this class I'm taking during the summer to get a head start for next semester. So ...

Show camera stream while AVCaptureSession's running

Hey guys, I was able to capture video frames from the camera using AVCaptureSession according to http://developer.apple.com/iphone/library/qa/qa2010/qa1702.html. However, it seems that AVCaptureScreen captures frames from the camera without showing the camera stream on the screen. I would like to also show camera stream just like in UII...

AVCaptureMovieFileOutput doesn't respond to minFreeDiskSpaceLimit

After setting the minFreeDiskSpaceLimit property of an AVCaptureMovieFileOutput the delegate should call the captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error: method if the disk space is less then the value specified in minFreeDiskSpaceLimit, but it doesn't. The delegate calls correctly the method only if I call th...

AVCaptureSession cancels background audio

Hello, Whenever I start an AVCaptureSession running with the microphone as an input it cancels whatever background music is currently running (iPod music for instance). If I comment out the line adding the audio input, the background audio continues. Does anyone know of a way to record video clips with the microphone while continuing ...

AVCaptureSession commitConfiguration stuck

Hi all, I'm working on an iPhone app that requires both live capture frames and the ability to take full resolution photos. This requires switching from AVCaptureVideoDataOutput to AVCaptureStillImageOutput and back. I do this by having 2 outputs, and changing the preset according to the needed state. This is the code that is called a...

Why AVCaptureSession output a wrong orientation?

Hey guys, So, I followed Apple's instructions to capture video session using AVCaptureSession: http://developer.apple.com/iphone/library/qa/qa2010/qa1702.html. One problem I'm facing is that even though the orientation of the camera / iphone device is vertical (and the AVCaptureVideoPreviewLayer shows a vertical camera stream), the outp...

AVCaptureSession only getting one frame for iPhone 3gs

I have a piece of code that sets up a capture session from the camera to process the frames using OpenCV and then set the image property of a UIImageView with a generated UIImage from the frame. When the app starts, the image view's image is nil and no frames show up until I push another view controller on the stack and then pop it off. ...

AVCaptureSession pause ?

Hi, I am using the AV Foundation for capturing images continuously after Apple released iOS 4.0 by following the codes given by, http://developer.apple.com/iphone/library/qa/qa2010/qa1702.html However, when I call "[session startRunning];" it takes around 1-2 seconds to start the camera preview. So, this is frustrating to the end user...

AVFoundation camera tutorial

Hi All, Is there a basic tutorial for the AVFoundation for use with the camera anywhere? UIImagePicker isn't the right tool for my app and it looks like this is but I'm not sure how to get it going. I can kind of see how to take a picture using AVCaptureStillImageOutput but I can't see how to display the camera view onto the screen. ...

getting UIImage out of captureStillImageAsynchronouslyFromConnection

Hi All, I am writing an iPhone app that uses AVFoundation for the camera stuff and I'm trying to save the UIImage from the camera into the Camera Roll. It currently does it this way... [imageCaptureOutput captureStillImageAsynchronouslyFromConnection:[imageCaptureOutput.connections objectAtIndex:0] completionHandler:^(CMS...

Need to modify image before displaying on AVCaptureVideoPreviewLayer

I'm using AVCaptureSession to capture video from my iPhone 3G and I need to capture the image and change it before displaying on my AVCaptureVideoPreviewLayer. In my current implementation, I am simply implementing the captureOutput: method and displaying the UIImage in a UIImageView, but that does not work for some reason. Any ideas? S...

AVCapture appendSampleBuffer

Hello all, 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 image that is overlayed on the video feed included in the recording. So far I ...

AVCapture Session

Hello All, I was wondering if anyone anywhere had an example of an AVCapture session using AVCaptureVideoDataOutput working -- I am using the default CMSampleBuffer from the AVFoundation data output callback method - but when I save it to camera roll it is all black except the last 5 frames which I have to manually scrub to :S any help...

AVCaptureSession returning blank image on iPhone 3G only

Hey guys, I'm using Apple's example code for AVCaptureSession, and the UIImage that gets created is completely blank. This only happens on the iPhone 3G, along with a unique error that shows up on console that says - Error: CGDataProviderCreateWithCopyOfData: vm_copy failed: status 2. I've researched the error online and found this St...

UIImagePicker and AVCaptureSession access camera simultaneously

Hi Everyone, I'm wondering if it's possible to have an instance of an AVCaptureSession and UIImagePicker both accessing the camera simultaneously? I want to create an app that shows an ambient light meter/indicator as an overlay view of a UIImagePicker when the camera is active. I previously implemented this using UIGetScreenImage() but...

AVCaptureSession captureOutput high quality image

Is there any possibility to get a high-resolution image (like images from UIImagePicker) out of the captureOutput- method of the AvCaptureSession? My application should work like this: Fist I am looking for the object in the captureOutput- methode (low resolution image 640x480). After it's detected, I would like to get a high-resolution...

AVAudioPlayer stops when audio input is added to AVCaptureSession

Hi I'm working on karaoke app. It should record video with sound of a user singing a song. Lyrics and melody are are provided by app. With video recording everything was fine until I've added audio input to AVCaptureSession. Problem is with AVAudioPlayer that plays melody - it just stops when AVCaptureSession starts. I did not find any r...