Explore low-latency video encoding with VideoToolbox

RSS for tag

Discuss the WWDC21 session Explore low-latency video encoding with VideoToolbox.

View Session

Posts under wwdc21-10158 tag

2 Posts
Sort by:
Post not yet marked as solved
0 Replies
200 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
0 Replies
433 Views
Hi, I am wondering whether I can set kVTVideoEncoderSpecification_EnableLowLatencyRateControl after VTCompressionSessionCreate()? I meant setting it by SetVTSessionProperty( compressionSession, kVTVideoEncoderSpecification_EnableLowLatencyRateControl, kCFBooleanTrue); And, compressionSession has been created by VTCompressionSessionCreate(). Is it necessary to set it before VTCompressionSessionCreate()?
Posted
by YCSun.
Last updated
.