0 Replies
      Latest reply on Jun 13, 2019 4:50 PM by larry_mac
      larry_mac Level 1 Level 1 (0 points)

        I am working on a macOS project that uses hardware acceleration for video encoding, using ************. I have tried controlling the bitrate using these properties.

        kVTCompressionPropertyKey_AverageBitRate 
        kVTCompressionPropertyKey_DataRateLimits
        

        But after many attempts it still frequently overshoots the target bitrate.

         

        Is kVTCompressionPropertyKey_DataRateLimits respected on macOS?

         

        When I use VTSessionCopySupportedPropertyDictionary to get the supported properties on my compression session, DataRateLimits shows up in the dictionary, and I have set it on the compression session without error. But then if I try to actually get the value of it using

        CFTypeRef value = nullptr;
        result = VTSessionCopyProperty(m_compressionSessionRef, (__bridge CFStringRef)key, kCFAllocatorDefault, &val
        

        where key is DataRateLimits, as taken from the dictionary, it returns an error that the property is unsupported.

        But on iOS, it returns successfully.

         

        This seems pretty serious, and does not appear limited to my machine. If it's truly not supported, that would help explain the volatility of my encoding bitrate. However, in months of working on this project and researching ************, I have not seen anything about this not being supported by the hardware encoder on macOS. I would think such a defect would be a big issue. Does anyone have any insight here? Thank you!