I see the same error getSubtractiveDecodeDuration signalled err=-16364 (kMediaSampleTimingGeneratorError_InvalidTimeStamp) (Decode timestamp is earlier than previous sample's decode timestamp.) occasionally. Most of the time using AVAssetWriter seems to work fine. @LiYanan04818 did you ever figure out a solution