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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

peter12
I am new with gstreamer, so I'm not very familiar with the environment.

Can anyone show me a simple Gstreamer example of the code where the bideo
bitrate of a sample video is changed dinamically.

thanks



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

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

gotsring
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/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

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

evaluat0r
In reply to this post by peter12
peter12 wrote

> I am new with gstreamer, so I'm not very familiar with the environment.
>
> Can anyone show me a simple Gstreamer example of the code where the bideo
> bitrate of a sample video is changed dinamically.
>
> thanks
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list

> gstreamer-devel@.freedesktop

> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

I think what you really want is webrtcbin

webrtc supports adjusting video and audio bitrate in response to feedback
using rtcp

sender reports stats, receive reports stats and the sender uses those stats
to adjust bitrate

this is also why you can't hook up rtsp directly to webrtc without also
video and audio transcoding



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel