【问题标题】:AVFoundation - LayerInstruction + setCropRectangleRamp - how to export properly?AVFoundation - LayerInstruction + setCropRectangleRamp - 如何正确导出?
【发布时间】:2018-08-19 01:48:28
【问题描述】:

我正在使用AVMutableCompositionLayerInstructionsetCropRectangleRamp 函数来创建移动裁剪效果。

使用AVAssetExportSession 导出时,我设置输出和renderSize 以匹配裁剪尺寸。

但是输出的视频似乎没有跟随移动的裁剪,而只是输出了原始视频的中心。

如何让编码器对移动裁剪中的像素进行编码?

【问题讨论】:

    标签: objective-c swift avfoundation


    【解决方案1】:

    想通了。你需要使用setTransformRamp(fromStart:toEnd:timeRange:)和相应的参数!

    【讨论】:

      猜你喜欢
      • 2015-11-19
      • 2011-04-20
      • 2018-10-27
      • 2023-03-11
      • 2017-03-29
      • 1970-01-01
      • 2021-01-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多