简体   繁体   English

AVAssetWriter startWriting问题

[英]AVAssetWriter startWriting Problem

我在2G设备上写电影时,AVASsetWriter startWriting返回BOOL False值,但对于其他所有设备,它都返回TRUE值且工作正常。任何人都遇到了这个问题,或者您不清楚为什么会发生这种情况,请帮帮我

The most likely cause is that the specific iOS device you are running on does not include the hardware H264 encoder. 最可能的原因是您正在运行的特定iOS设备不包括硬件H264编码器。 I think that versions of iPhone earlier than 3GS have no hardware, but I am not sure if the iPad 1 has H264 encoding hardware. 我认为3GS之前的iPhone版本没有硬件,但是我不确定iPad 1是否具有H264编码硬件。 I know iPad 2 does have this hardware. 我知道iPad 2确实有此硬件。

I am receiving false on startWriting on an iPad, when it works on both my iPhone3 and 4 (all have iOS 4.2). 当iPad在我的iPhone3和4(均具有iOS 4.2)上均可使用时,在iPad上使用startWriting时收到错误消息。 The status of the writer is failed, with the NSError as: "The operation couldn't be completed. (AVFoundationErrorDomain error -11800)." 编写器的状态失败,且NSError为:“操作无法完成。(AVFoundationErrorDomain错误-11800)。”

Creation of the writer yielded no error when creating with file type: AVFileTypeQuickTimeMovie, and the file did NOT already exist. 使用文件类型AVFileTypeQuickTimeMovie进行创建时,创建writer不会产生任何错误,并且该文件尚不存在。 I've also tried using different pixel buffer pixel formats to no avail. 我也尝试使用不同的像素缓冲区像素格式无济于事。 Lastly, I've tried changing the video type to MPEG4 and M4V...again, to no avail. 最后,我尝试将视频类型再次更改为MPEG4和M4V,但无济于事。

I'm posting this here instead of creating a new problem, as they both are the same result and is not addressed. 我将其发布在这里,而不是创建新的问题,因为它们都是相同的结果,并且未得到解决。 I need to have this resolved w/in a few days, so if I learn anything, I'll post what I find. 我需要在几天内解决此问题,因此,如果我学到任何东西,我都会发表发现的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM