首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AVAssetWriterInput视频未获取

AVAssetWriterInput视频未获取
EN

Stack Overflow用户
提问于 2012-12-10 13:56:22
回答 1查看 590关注 0票数 2

我使用AVAssetWriter生成图像到视频,这是我的编写器设置

代码语言:javascript
复制
NSDictionary* videoSettings = [NSDictionary dictionaryWithObjectsAndKeys:
                               AVVideoCodecH264, AVVideoCodecKey,
                               [NSNumber numberWithInt:self.frame.size.width], AVVideoWidthKey,
                               [NSNumber numberWithInt:self.frame.size.height], AVVideoHeightKey,
                               videoCompressionProps, AVVideoCompressionPropertiesKey,
                               nil];
videoWriterInput = [[AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:videoSettings] retain];

我的输入图像缓冲图像,

但生成的mov文件如下所示

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-12-11 17:05:01

我使用AVAssetWriter生成图像到视频,我的编写器设置刚刚修改。

代码语言:javascript
复制
NSDictionary* videoSettings = [NSDictionary dictionaryWithObjectsAndKeys:
                               AVVideoCodecH264, AVVideoCodecKey,
                               [NSNumber numberWithInt:imageView.size.width], AVVideoWidthKey,
                               [NSNumber numberWithInt:imageView.size.height], AVVideoHeightKey,
                               videoCompressionProps, AVVideoCompressionPropertiesKey,
                               nil];
videoWriterInput = [[AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:videoSettings] retain];
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13795759

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档