Posts

Post not yet marked as solved
0 Replies
993 Views
Hi there, When I enable LTR by setting "kVTCompressionPropertyKey_EnableLTR" to be true, and get LTR refresh frame by setting ForceLTRRefresh to be true in VTCompressionSessionEncodeFrame() call. Everything goes well, but I found I cannot know which encoded frame is LTR Refresh frame, I try to find out, so dumpped the attachments of the CMSampleBuffer frame, I found the normal P frame's attachment like this: { DependsOnOthers = 1; EarlierDisplayTimesAllowed = 0; EncodedFrameAvgQP = 35; IsDependedOnByOthers = 1; NotSync = 1; RequireLTRAcknowledgementToken = 9177; TemporalID = 0; } And LTR refresh frame may look like this: { DependsOnOthers = 1; EarlierDisplayTimesAllowed = 0; EncodedFrameAvgQP = 38; FECGroupID = 0; FECLastFrameInGroup = 1; FECLevelOfProtection = 1; IsDependedOnByOthers = 1; NotSync = 1; ReferenceWasRefreshed = 1; RequireLTRAcknowledgementToken = 9180; TemporalID = 0; } The laster has 4 more key-value pairs than the former: FECGroupID = 0; FECLastFrameInGroup = 1; FECLevelOfProtection = 1; ReferenceWasRefreshed = 1; The key "ReferenceWasRefreshed" is very noticeable, So question 1: May this key signify current frame is a LTR Refresh frame? (But It's weird I didn't find any documents about this key.) Question 2: If this frame is LTR refresh frame, How can I know which frame this LTR frame refers to? More specifily, the corresponding 'AcknowledgementToken'. Question 3: This question is independent. I found that if I didn't set 'kVTEncodeFrameOptionKey_AcknowledgedLTRTokens' for a while (keep the tokens be empty), I cannot get the 'AcknowledgementToken' from encoded CMSampleBuffer for a while too, that's to say this key is not contained in the attachments of CMSampleBuffer. What should I do to make the encoded frame always contains the AcknowledgementToken? Thanks very much!
Posted
by JoeyBlue.
Last updated
.
Post not yet marked as solved
2 Replies
890 Views
Hi there, I used AVAssetWriter to export mp4 file, input audio and video samples are encoded data (aac and h264 samples), sometimes it works well, but sometime it will failed randomly with error code -11800 and underlying code -17771 after calling finishWritingWithCompletionHandler, log looks like this: AVAssetWriter status: Failed, status:err:Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-17771), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x60400008e1d0 {Error Domain=NSOSStatusErrorDomain Code=-17771 "(null)"}}, status=3 And I notice these logs on Console.app just before the error message: default 17:35:08.380220+0800 MyAPP <<<< FigExportCommmon >>>> remakerFamily_formatWriterErrorOccurred: (0x6140001ba240) default 17:35:08.380561+0800 MyAPP <<<< FigExportCommmon >>>> remakerFamily_PostFailureNotificationIfError: (0x6140001ba240) state finish writing called default 17:35:08.381010+0800 MyAPP <<<< FigExportCommmon >>>> remakerfamily_setFailureStatusIfError: (0x6140001ba240) err -17771 state finish writing called I don't know why this will happen, any replies are appreciate. thx.
Posted
by JoeyBlue.
Last updated
.