I have been recently looking into how you could watermark a video using the library while maintaining the original frame rate. What worked for me just fine was to retrieve the frame rate from the MediaItem like so:
let fps = Int32(item.sourceAsset.tracks(withMediaType: .video).first!.nominalFrameRate)
Then I only changed this line in the MediaVideoProcessor.swift file to contain the desired frame rate.
I would suggest you include this, if possible, as an optional argument of the function so that the user could control that behaviour more easily.
I have been recently looking into how you could watermark a video using the library while maintaining the original frame rate. What worked for me just fine was to retrieve the frame rate from the
MediaItem
like so:let fps = Int32(item.sourceAsset.tracks(withMediaType: .video).first!.nominalFrameRate)
Then I only changed this line in the
MediaVideoProcessor.swift
file to contain the desired frame rate.I would suggest you include this, if possible, as an optional argument of the function so that the user could control that behaviour more easily.