I encountered the same problem, and finnaly I found the reason behind the problem after varied tries, maybe useful for you.
In my case, if the VideoToolbox encoder receives continuous two frames at least with the same pts, the encoder will decline output bitrate very quickly..
it's ok:
pts: 0, 0.2, 0.4, 0.6, 0.8 ....
it's bad (two frame with the same pts 0.4)
pts: 0, 0.2, 0.4, 0.4, 0.6, 0.8 ....
You may check pts of the frames passed to the encoder whether or not the same, if so, discard the later one or update the pts of the later.
Topic:
Media Technologies
SubTopic:
Video
Tags: