Hello, I want a 4 Mbs bitrate, before 15.4, this code used to work, now it doesn't :
status = VTSessionSetProperty( compressionSession, kVTCompressionPropertyKey_RealTime, kCFBooleanTrue );
status = VTSessionSetProperty( compressionSession, kVTCompressionPropertyKey_AllowFrameReordering, kCFBooleanFalse );
int compressionBitrate = 4 * 1024 * 1024;
float kLimitToAverageBitRateFactor = 1.5f;
status = VTSessionSetProperty( compressionSession, kVTCompressionPropertyKey_AverageBitRate, (__bridge CFTypeRef)@( compressionBitrate ) );
int64_t dataLimitBytesPerSecondValue = compressionBitrate * kLimitToAverageBitRateFactor / 8;
CFNumberRef bytesPerSecond = CFNumberCreate( kCFAllocatorDefault, kCFNumberSInt64Type, &dataLimitBytesPerSecondValue );
int64_t oneSecondValue = 1;
CFNumberRef oneSecond = CFNumberCreate( kCFAllocatorDefault, kCFNumberSInt64Type, &oneSecondValue );
const void *nums[2] = { bytesPerSecond, oneSecond };
CFArrayRef dataRateLimits = CFArrayCreate( nil, nums, 2, &kCFTypeArrayCallBacks );
status = VTSessionSetProperty( processObjC->compressionSession, kVTCompressionPropertyKey_DataRateLimits, dataRateLimits );
-
—
亦軒fromnew taipei city
-
—
sppl
-
—
K-oS
Add a CommentI have problem in VideoToolbox with 15.4 too. The problem is the bitrate of the streaming is much more higher than 15.3. Could you share your VTCompressionSessionRef with me? The low bitrate is what i want.
I have problem in VideoToolbox with macOS 12.3 too.
We are having a frame rate issue using Open WebRTC Toolkit, which might be related. Until 15.3.1 everything was fine. The issue is being discussed here (including some useful graphs): https://github.com/open-webrtc-toolkit/owt-client-native/issues/589