VideoKit
VideoKit copied to clipboard
Video composition must have a positive frameDuration
Not working, i get this error - Thread 1: "*** -[AVAssetExportSession setVideoComposition:] video composition must have a positive frameDuration"
please provide your code
you will have to do like following to resolve this issue.
if let limitFPS = config.limitFPS {
videoComposition.frameDuration = CMTime(value: 1, timescale: limitFPS)
} else {
let rate = try await videoTrack.load(.nominalFrameRate)
videoComposition.frameDuration = CMTimeMake(value: 1, timescale: Int32(rate))
}