Questions tagged [cmtime]

CMTime structs are non-opaque mutable structs representing times (either timestamps or durations). A CMTime is represented as a rational number, with a numerator (an int64_t value), and a denominator (an int32_t timescale). A flags field allows various non-numeric values to be stored (+infinity, -infinity, indefinite, invalid). There is also a flag to mark whether or not the time is completely precise, or had to be rounded at some point in its past.

CMTime structs are non-opaque mutable structs representing times (either timestamps or durations).

A CMTime is represented as a rational number, with a numerator (an int64_t value), and a denominator (an int32_t timescale). A flags field allows various non-numeric values to be stored (+infinity, -infinity, indefinite, invalid). There is also a flag to mark whether or not the time is completely precise, or had to be rounded at some point in its past.

CMTimes contain an epoch number, which is usually set to 0, but can be used to distinguish unrelated timelines: for example, it could be incremented each time through a presentation loop, to differentiate between time N in loop 0 from time N in loop 1.

Click here for Apple Documentaion of CMTime class.

98 questions
0
votes
1 answer

Need assistance regarding CMTimeMakeWithSeconds

I am trying to fetch all frames of video and converting and storing them as individual images. I am using this code in AV Foundation Programming Guide. the code for getting multiple images is CMTime firstThird =…
S.J
  • 3,063
  • 3
  • 33
  • 66
0
votes
1 answer

Trying to make a 15 seconds video CMTimeMake

I am trying to do a 15 seconds video out of a UIImage's array which the array content numbers will change. NSUInteger fps = 30; int frameCount = 0; float numberOfSecondsPerFrame = 15/[imageArray count]; float frameDuration = fps *…
Youstanzr
  • 605
  • 1
  • 8
  • 16
0
votes
1 answer

How to addd user value to CMTimeMakeWithSecondValue

Stop motion app Trying to get frame duration (/.5)set by users value received from a stepper: self.stepperValue; Original settings hard coded value of five frames a second // 5 fps - taking 5 pictures will equal 1 second of video frameDuration =…
JSA986
  • 5,870
  • 9
  • 45
  • 91
0
votes
0 answers

Video creation using Array of images in iOS

I am trying to create a video from an array of images. I created a video but I have a problem in presentation time i.e CMTime. I am using following code to create a video int frameCount = 1; // Adding images here to buffer for( int i =…
subhash Amale
  • 325
  • 3
  • 4
  • 14
0
votes
1 answer

Difference in time recorded using AVCaptureMovieFileOutput

I have recorded a movie file using AVCaptureMovieFileOutput by setting maximum duration limit. For e.g.: If I want to record 10 seconds video, I had set the max duration and other properties for the movie file like below... Float64…
Newbee
  • 3,231
  • 7
  • 42
  • 74
0
votes
1 answer

AVPlayer not reaching the end of playback

I'm creating a movie with AVFoundation. For that I create a playerItem with an AVMutableComposition and a AVPlayer with that playerItem. My problem is that the AVPlayer does not play exactly until the end. It ends half a second before or so. The…
Bruno Morgado
  • 507
  • 1
  • 8
  • 26
-1
votes
1 answer

How can I store CMTime in UserDefaults and then parse it?

Well, I try to remember currentTime() from AVPlayer in the device memory, for continue playing video after app restart. I'm making app for watching films from my Raspberry PI. Any ideas?
-1
votes
1 answer

how to make a CMTime reference with a NSTimeInterval

I need help making a CMTime variable in swift 2 so I can create a AVMutableCompostion. Current code: let videoAsset: AnyObject! = AVAsset(URL: outputFileURL) let videoDuration:CMTime = CMTimeMake(Int64(videoAsset.duration), 1) but the…
Garret Kaye
  • 2,412
  • 4
  • 21
  • 45
1 2 3 4 5 6
7