Questions tagged [avcapturemoviefileoutput]

70 questions
5
votes
2 answers

Stop Camera recording and save file when entering background

I've been looking for the answer for 2 days, but I can't seem to get it right... I have an example app that records audio and video from the device using a AVCaptureSession and a AVCaptureMovieFileOutput. When I start recording I…
4
votes
2 answers

AVCaptureSession - add multiple outputs in parallel

I'm trying to record captured frames as video while performing image processing tasks on the frames at the same time in parallel. I have a single AVCaptureSession which I have added two separate outputs to…
4
votes
1 answer

Getting image from AVCaptureMovieFileOutput without switching

I would like to prevent lags when the app switches between video-recording and photo-taking: by using only AVCaptureMovieFileOutput and getting a snapshot from it when captured an image. Just like how SnapChat does. Is it possible somehow? I haven't…
Kárpáti András
  • 1,221
  • 1
  • 16
  • 35
4
votes
1 answer

How do I record a video on iOS without using a preset?

The simpler way to record a video on iOS is by setting a AVCaptureSession.sessionPreset. But that doesn't work for me since I want to control parameters like binning, stabilization (cinematic, standard, or none) and ISO. I find the format I want and…
4
votes
1 answer

how to change orientation for AVCaptureMovieFileOutput in swift

I tried several different methods but they didn't help me. I want to change video orientation in AVFoundation. How can I make it? override func viewDidLoad() { super.viewDidLoad() self.definesPresentationContext = true // device…
4
votes
4 answers

AVCaptureSession addInput issues with ios8

I have an application with AVCaptureSession which work correctly with previous iOS versions, but then I tried run it on device with ios8, application crashed sporadic. but the problem wasn't solved. Exception getting in "[session addInput:input];"…
2vision2
  • 4,933
  • 16
  • 83
  • 164
4
votes
0 answers

AVCaptureMovieFileOutput record audio only for the first video

I'm developing an application using swift that record video for a precise duration. That's 7 sec in this example. All work's great for the first record, but the successive record doesn't contain audio but only video. I read something about…
Marco
  • 1,057
  • 1
  • 19
  • 36
4
votes
1 answer

Create MPEG-2 Transfer Stream with AVFoundation

I'm attempting to create a properly formatted video file for use in Apple's HTTP Live Streaming. Here is the code that creates the file: // Init the device inputs AVCaptureDeviceInput *newVideoInput = [[AVCaptureDeviceInput alloc]…
kubi
  • 48,104
  • 19
  • 94
  • 118
3
votes
0 answers

iOS Swift how to convert AVCaptureSynchronizedSampleBufferData/AVCaptureVideoDataOutput to Data format or URL format

In my app i am using AVCaptureDataOutputSynchronizerDelegate for video output of recording through camera. The data i got is AVCaptureSynchronizedSampleBufferData and i have to convert it into Data or Url format so that i am able to play the video…
3
votes
3 answers

How do you add an overlay while recording a video in Swift?

I am trying to record, and then save, a video in Swift using AVFoundation. This works. I am also trying to add an overlay, such as a text label containing the date, to the video. For example: the video saved is not only what the camera sees, but…
3
votes
0 answers

Is there a quality difference between output of AVCaptureMovieFileOutput and AVCaptureVideoDataOutput?

In the process of capturing a light trail photo, I noticed that for fast moving objects, there is slightly more discontinuity between successive frames if I use the sample buffers from AVCaptureVideoDataOutput compared to if I record a movie and…
3
votes
1 answer

iOS - Swift - Some audio when recording reached the maximum allowable length

I implemented a video recorder in Swift as part of an iOS app, where I set the maxRecordedDuration for the video output to 4 seconds (30 frames per second): self.videoOutput?.maxRecordedDuration = CMTimeMakeWithSeconds( 4, 30 ) When the user starts…
Andi
  • 8,154
  • 3
  • 30
  • 34
3
votes
1 answer

How to record the exact time of the first and last movie frame captured with AVCaptureSession?

I'm using AVCaptureSession to capture a video into a movie file. I want to get the exact timestamp of the first and last frame of the movie. How do I do this? In AVCaptureFileOutputRecordingDelegate, the method…
algal
  • 27,584
  • 13
  • 78
  • 80
3
votes
0 answers

Pause/resume video recording using AVCaptureMovieFileOutput

I am recording file using AVCaptureMovieFileOutput by using this method: startRecordingToOutputFileURL: recordingDelegate: Now i want to incorporate pause/resume functionality while recording video. Please guide me how is this achievable ?
Malik Boy
  • 132
  • 10
3
votes
2 answers

How can I reduce the file size of a .mov video created with AVCaptureSession?

I am able to record a video using AVCaptureSession.But i want to reduce it size.How can i do this ? I am getting final URL in Delegate "captureOutput" method. VideoDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; …