设置AVMutableComposition的frameDuration [英] Setting AVMutableComposition's frameDuration

查看:521
本文介绍了设置AVMutableComposition的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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆