I have an AVComposition
with multiple segments and variable speed, I want to get the proper CMTime
of a position of the video.
If I do:
CMTime time = CMTimeMake(duration.value * position, duration.timescale);
The time is not proper as the composition varies in speed, I've been days trying and I cannot find how to do it.
I also tried using samplePresentationTimeForTrackTime
but what it does is mapping the TARGET ( Composition ) time to the SOURCE ( Asset ) time, I need the opposite, map a position which I know on the SOURCE ( Asset ) to the mapped position on the TARGET ( Composition ).
Any ideas?