设置AVMutableComposition的frameDuration [英] Setting AVMutableComposition's frameDuration
问题描述
我正在玩Apple的 WWDC 2010
示例包中的 AVEditDemo
项目,我正在尝试更改导出视频的帧速率。该视频使用 AVMutableComposition
导出,其中frameDuration设置如下:
I'm playing with the AVEditDemo
project, from Apple's WWDC 2010
sample pack, and I'm trying to change the frame rate of the exported video. The video is exported using an AVMutableComposition
on which the frameDuration is set like that:
videoComposition.frameDuration = CMTimeMake(1, 30); // 30 fps
出于某种原因,将30更改为25不会更改使用
。有没有人知道为什么? AVAssetExportSession
导出的视频的帧速率
For some reason, changing the 30 to 25 does not change the framerate
of the video exported with the AVAssetExportSession
. Does anyone have an idea why?
推荐答案
似乎 AVAssetExportSession
预设优先于 AVVideoComposition
frameDuration
。我已经打开了一个错误报告:
It seems that the AVAssetExportSession
preset takes precedence over the AVVideoComposition
frameDuration
. I've opened a bug report:
http:// openradar.appspot.com/11127156
这篇关于设置AVMutableComposition的frameDuration的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!