How do I use AVAssetWriter?

╄→尐↘猪︶ㄣ 提交于 2019-12-05 10:52:27

问题


I’d like to take some video frames and encode them into a video. It looks like that’s exactly what AVAssetWriter was meant for, but no matter how I eyeball the docs and Google I can’t find any way to actually use it. From the docs it looks like I need an input (AVAssetWriterInput) to feed the writer from. Fine. But the AVAssetWriterInput class is abstract and the only subclass that I know of in 4.1 is AVAssetWriterInputPixelBufferAdaptor that requires a AVAssetWriterInput in its initializer…? Am I missing something obvious here?


回答1:


Ah yes, I have to acquire an instance using +[AVAssetWriterInput assetWriterInputWithMediaType:outputSettings:], see my post under a different question for a detailed code sample.



来源:https://stackoverflow.com/questions/3728311/how-do-i-use-avassetwriter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!