yp18792574062
不翻身的胖子
采纳率0%
2020-03-17 11:37

macos 使用VideoToolBox编码H265一直失败

在mac上使用VideoToolBox上使用H265编码,当调用VTCompressionSessionEncodeFrame就会报下面的错误,并且在此之前设置了kCVImageBufferTransferFunctionKey,设置方法如下:

CVBufferSetAttachment(pixeBuffer,kCVImageBufferTransferFunctionKey,
kCVImageBufferTransferFunction_ITU_R_709_2,
kCVAttachmentMode_ShouldPropagate);

求解应该怎么做?

convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.
convertAttachmentToIOSurfaceStruct Error: For kCVImageBufferTransferFunctionKey, attachmentValue is invalid.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • hazel_81 hazel_81 2月前

    修改CVBufferSetAttachment参数,或者不使用硬编码

    点赞 评论 复制链接分享

为你推荐