cisco / openh264

Open Source H.264 Codec
BSD 2-Clause "Simplified" License
5.53k stars 1.79k forks source link

Find an Example of using Rate Control in OpenH264 Encoder #3226

Open jodyngo opened 4 years ago

jodyngo commented 4 years ago

I am studying about FFmpeg + OpenH264 for Android Application. I found that there is Rate-Control feature in Encoder part of OpenH264 ("Rate control with adaptive quantization, or constant quantization") so I would like to understand how to use it.

If anyone has experiments of using this function in Android application please give me an example code with many thanks.

huili2 commented 4 years ago

Openh264 is mainly for real-time encoding, so for now there's only one way to set the RC method, i.e., by so-called rc_mode. The difference among these RC methods are quite minor. Adaptive quantization is another option. All of them can be controlled by passing the encoding parameter when doing Initialize() or SetOption().