Help me to change x264enc parameter dynamically

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

Help me to change x264enc parameter dynamically

safa
Dear All,

I am a PhD student and I am working on "multimedia QoE management". To look into the results of my proposed algorithm I have decided to implement it through gstreamer. 
I need to change the Quantization Parameter after the streaming starts. According to the NEWS in "GStreamer Ugly Plugins 0.10.18", this version "allows changing the bitrate and quantitizers dynamically".
I use "g_object_set(G_OBJECT(myencoder), "quantizer", newQP, NULL);" to reset the QP; but nothing happens. I am not expert in gstreamer programing.
As I have found you expert in this field, I really appreciate if you could help me in this regard.

Thank you and best regards.
Ahmad

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

Re: Help me to change x264enc parameter dynamically

Andrey Nechypurenko-2
Hi Ahmad,

> I am a PhD student and I am working on "multimedia QoE management". To look

Cool! BTW, what is QoE? I know what QoS is but never heard about QoE ;-) .

> I need to change the Quantization Parameter after the streaming starts.
> According to the NEWS in "GStreamer Ugly Plugins 0.10.18", this version
> "allows changing the bitrate and quantitizers dynamically".

I did not try to change these particular parameters myself yet, but as
I understand, in general, it is necessary to pause the element before
you change such parameters and then resume it again.

> I use "g_object_set(G_OBJECT(myencoder), "quantizer", newQP, NULL);" to
> reset the QP; but nothing happens.

You can take a look at the following code snippets from our vehicle
on-board "streaming" server:
https://github.com/veter-team/vehicle/blob/master/src/VideoSenderThread.cpp#L253
Here setFrameSize() function illustrates how to set element
properties. In this function we are searching for elements with
particular names ("qos-scaler" and "qos-caps") pause the playback by
calling gst_element_set_state(qos_scaler, GST_STATE_NULL); , set
"width" and "height" properties and then switch to the PLAYING state
again. I was told that PAUSE state itnstead of NULL should be enough
but did not try it yet myself.

Right below this function, there is a setBitrate() function which
supposed to set the target bitrate for the encoder dynamically. But,
for some reasons which I still do not understand, applied to the TI-s
DSP-based h264 encoder for OMAP processor it causes the application to
crash. That is why, it is not used in the code but might be also
useful for you as an example.

Hope this helps and good luck with your project!
Andrey.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel