How to get current length of AVCaptureMovieFileOutput while recording to display on screen?
<p>As title says, I am looking to display the current length of the recording while a user is recording video with AVFoundation. I have done something similar with AVAudioRecorder where I create a timer that sets a label's text as follows:  </p>

<p><code>recordDurationLabel.text =  timeString((audioRecorder?.currentTime)!)</code></p>

<p>I was wondering if there is a "currentTime" feature for recording video? My only other thought would be to start a repeated 1 second timer in the captureOutput:didStartRecordingToOutputFileAtURL function but I want to ensure accuracy.</p>

<p>Thanks in advance!</p>

<p>Edit:
For now this is the function I've implemented in the captureOutput:didStartRecordingToOutputFileAtURL delegate method, but again, would be cleaner to have something directly related to the video.  </p>

<pre><code>func startRecordingUpdateTimer() {

    recordingUpdateTimer = NSTimer(timeInterval: 1.0/45.0, target: self, selector: #selector(recordedVideo), userInfo: nil, repeats: true)
    NSRunLoop.mainRunLoop().addTimer(recordingUpdateTimer!, forMode: NSRunLoopCommonModes)
}

func recordedVideo() {
    durationTime = durationTime + 1.0/45.0
    let durationString = timeString(durationTime)
    recordDurationLabel.text =  durationString
}
</code></pre>