且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

AVVideoComposition应用过滤器处理程序不调用

更新时间:2023-11-26 20:04:34

您不应该将直通预设与CI过滤一起使用.尝试使用另一个定义视频格式的预设.

You shouldn't use passthrough preset with CI filtering. Try using another preset that defines a video format instead.

此文档没有特别提到CI过滤但它指出使用直通预设会导致层指令被忽略.我希望CI过滤也是一样.

This docs doesn't mention CI filtering specifically but it states that using passthrough preset would lead to layer instructions being ignored. I would expect it is the same for CI filtering.

重要提示:如果使用AVAssetExportSession对象导出视频合成并指定AVAssetExportPresetPassthrough导出预设以允许所有轨道通过,则将不应用视频合成指令(AVMutableVideoCompositionLayerInstruction)中定义的转换.您必须将导出预设更改为定义要应用转换的视频格式(例如,AVAssetExportPresetMediumQuality)的格式.

Important: If you export a video composition with an AVAssetExportSession object and specify the AVAssetExportPresetPassthrough export preset to let all tracks pass through, the transform defined in the video composition instruction (AVMutableVideoCompositionLayerInstruction) will not be applied. You must change the export preset to one that defines a video format (AVAssetExportPresetMediumQuality, for example) for the transform to be applied.