I used CMSampleBufferCreateForImageBuffer to create CMSampleBufferRef from CVPixelBufferRef. Then use VTCompressionSessionEncodeFrame to encode CMSampleBufferRef. This may cause the LOW bitrate on iOS17.
So I changed the way, directly encode the CVPixelBufferRef instead of CMSampleBufferRef.
OSStatus status = VTCompressionSessionEncodeFrame(compressionSession, **pixelBuffer,** kCMTimeInvalid, kCMTimeInvalid, (__bridge CFDictionaryRef)properties, (__bridge_retained void *)timeNumber, NULL);
then the encoded file has the desired bitrate.
Post
Replies
Boosts
Views
Activity
already solved. no related to the api. event thing works fine!