1

谁能解释为什么这不会将我的视频减慢到 5 秒?secondAsset.duration 等于 15 秒。导出后,它只播放视频 5 秒,然后在剩余的 10 秒内显示最后一帧。

AVMutableCompositionTrack *secondTrack = [mixComposition addMutableTrackWithMediaType:AVMediaTypeVideo preferredTrackID:kCMPersistentTrackID_Invalid];
    [secondTrack insertTimeRange:CMTimeRangeMake(kCMTimeZero, secondAsset.duration) ofTrack:[[secondAsset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0] atTime:firstAsset.duration error:nil];

    [secondTrack scaleTimeRange:CMTimeRangeMake(kCMTimeZero, secondAsset.duration) toDuration:CMTimeMake(5,1)];
4

0 回答 0