jacob
jacob

Reputation: 1427

difference between mediacodec PARAMETER_KEY_VIDEO_BITRATE and KEY_BIT_RATE

I am trying to encode using MediaCodec in surface-input mode and to set the required bitrate, but I dont understand if I should use PARAMETER_KEY_VIDEO_BITRATE in mediacodec or KEY_BIT_RATE in the MediaFormat. What is the usage of each parameter ?

Upvotes: 2

Views: 1248

Answers (1)

Marlon
Marlon

Reputation: 1473

When you configure codec you have to use KEY_BIT_RATE to set encoding bitrate. In API 19 PARAMETER_KEY_VIDEO_BITRATE was added to change encoding bitrate after processing started - it could be used for streaming for example - if network conditions change you may want to adjust bitrate without other encoding parameters reconfigure

Upvotes: 4

Related Questions