您的位置:首页 > 其它

AVAssetWriter写h264数据

2017-05-12 20:48 92 查看
AVAssetWriterInput按如下初始化:

CMFormatDescriptionRef videoFormat = NULL;

CMVideoFormatDescriptionCreate(kCFAllocatorDefault, kCMVideoCodecType_H264,
480, 480, NULL, &videoFormat);

AVAssetWriterInput videoWriterInput =
[[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeVideo outputSettings:nil sourceFormatHint:videoFormat];

注意outputSettings参数要为nil
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  AVAssetWriter h264