How can I change the bitrate dinamically in a gstreamer example?

gotsring gotsring at live.com
Wed Jul 29 20:12:59 UTC 2020


Can you be more specific? Audio or video? Is there a target format/codec? 

I don't know much about audio, but if you use a video codec like H.264,
there's generally an built-in option to use variable bitrates that try to
keep a constant quality level. So for scenes with low movement, the bitrate
will lower itself because there's nothing changing between frames, but for
scenes with high movement, the bitrate will increase to try to maintain the
picture quality.

Look at the properties of openh264enc, specifically rate-control and
max-bitrate. Also note that the bitrate property can be changed while the
pipeline is playing, so it might be just as easy as something like:
g_object_set(h264_encoder, "bitrate", newbitrate_kbps, NULL);


I guess it depends on the GstElement you are using. Let me know and I'll try
to come up with an example.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list