AnsweredAssumed Answered

Warning message when setting "bitrate" property of "vpuenc" element on i.MX6/Linux

Question asked by Robbie Jiang on May 21, 2015



I'm working on i.MX6Q/Linux platform.

The vpuenc element is built from



In my application program, I tried to set the "bitrate" property of "vpuenc" element to 300kbps( 300000bps) but  got the following warning msg:


GLib-GObject-WARNING **: IA__g_object_set_valist: object class `GstVpuEnc' has no property named ` \xc6\u00'




The code snippet is as follows:


static GstElement * create_mfw_vpu_encoder (avsvr_params_t * params)


  GstElement * encoder = NULL;

  uint32_t bitrate = 0, gopsize = 5;


  encoder = gst_element_factory_make("vpuenc", "video_encoder");

  if (encoder) {

    // set encoding quality

    if (params->av_params.venc_bitrate > 0)

      bitrate = params->av_params.venc_bitrate;


    if (params->av_params.venc_gopsize > 0)

      gopsize = params->av_params.venc_gopsize;


    g_object_set(G_OBJECT(encoder), "bitrate", bitrate, NULL);

    g_object_set(G_OBJECT(encoder), "codec", params->av_params.venc_std, NULL);


    if(bitrate > 0) { //for CBR encoding, set max_qp and gamma if needed

      g_print("CBR encoding!\n");

      g_object_set(G_OBJECT(encoder), "bitrate", bitrate, NULL);



    //gopsize is always set

    if(gopsize > 0)

      g_object_set(G_OBJECT(encoder), "gopsize", gopsize, NULL);


     return encoder;



Following is my debug procedure and output message:


Breakpoint 1, create_mfw_vpu_encoder (params=0x35f68) at pipeline.c:265

265       GstElement * encoder = NULL;

(gdb) n

266       uint32_t bitrate = 300000, gopsize = 5;

(gdb) n

268       encoder = gst_element_factory_make("vpuenc", "video_encoder");

(gdb) n

269       if (encoder) {

(gdb) n

279         if (params->av_params.venc_bitrate > 0)

(gdb) n

280           bitrate = params->av_params.venc_bitrate;

(gdb) n

282         if (params->av_params.venc_gopsize > 0)

(gdb) p bitrate

$1 = 300

(gdb) n

283           gopsize = params->av_params.venc_gopsize;

(gdb) p gopsize

$2 = 5

(gdb) n

285         g_object_set(G_OBJECT(encoder), "bitrate", bitrate, NULL);

(gdb) n


(gst_svr:2698): GLib-GObject-WARNING **: IA__g_object_set_valist: object class `GstVpuEnc' has no property named ` \xc6\u00'



I'm setting "bitrate" property, why did I get such strange warning message?

And I'm not sure if the "bitrate" property has been correctly set to my desired value or not.


How to check and fix this issue?


BTW,  the following command line works well without any problem:


gst-launch -v tvsrc device=/dev/video0 capture-mode=0 ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=720,height=576,framerate=15/1' ! mfw_ipucsc ! 'video/x-raw-yuv,format=(fourcc)I420, width=640,height=480,framerate=15/1' ! vpuenc codec=avc bitrate=300000 gopsize=4 ! video/x-h264,width=640,height=480 ! rtph264pay mtu=1024 ! udpsink host= port=5004 sync=false async=false


I can correctly receive and decode the streamed H.264 data on PC receiver.



Any idea?