lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
245 stars 17 forks source link

51127979: Bitrates set by DataRateLimits are not respected #21280

Open openradar-mirror opened 5 years ago

openradar-mirror commented 5 years ago

Description

Summary:

When used in the form @[(targetBitrate / 8.f), @1], where targetBitrate is the desired average bitrate in bits per second, the kVTCompressionPropertyKey_DataRateLimits setting can produce anything from an average bitrate of 80% to 150% of the target, depending on content and target bitrate. According to these docs, an average is expected to be maintained: https://developer.apple.com/library/archive/qa/qa1958/_index.html

AVVideoAverageBitRateKey, in comparison, seems to do a much better job adhering, especially at higher bitrates.

Steps to Reproduce: See attached code.

Bitrates are derived by the following command: ffprobe -v error $FILE -select_streams v:0 -show_entries stream=bit_rate -of default=noprint_wrappers=1

Expected Results: Target bitrates are roughly respected

Actual Results: Target bitrates are often missed, in either direction.

Version/Build: iOS 12.3

Configuration: N/A