Real Time Encoder Pipeline Performance

Jean-Michel Hautbois jhautbois at gmail.com
Tue Oct 14 01:24:53 PDT 2014


Hi,

2014-10-13 18:36 GMT+02:00 KaPiL.rIcKy <kapil.ricky at gmail.com>:
>
> Hi
> I am working on applicaition for live video chat.
> Pipeline is fairly simple:
> appsrc->encoder->appsink
>
> -appsrc:from my application i take raw i420 frames and push to GST from my
> application thread
> using gst_app_src_push_buffer(). I also keep listening to need-data and
> enough-data callbacks.
> And stop pushing data when enough-data callback comes, and resume again on
> need-data.
> -encoder-is h264plugin. (custom plugin on our
> hardware,base-profile,byte-stream)
> -appsink-i pulled data when callback comes.
>
> all works fine with frames of 640*480.
> But when use HD video, initially for 1 minutes i can see appsrc and appsink
> running almost 30fps.
> but then stopfeed comes, so i have to dropped frames. which results in drop
> of fps.
>
> So my questions is:
> 1.Why this behaviour happens ? my assumption is encoder cannot cosumes raw
> frames at 30fps so appsrc queue gets fulled.
> so it sends enough-data callback. is my understanding correct?

Well, not knowing which HW neither the plugin used, it will be
difficult to answer. And the pipeline described is probably simpler
than the real one. Are you using queues for instance ?

> 2.When i push buffer from my app thread(and need-data callbacks happen in
> diff thread).
> Does internally memcpy happens to send data to apprc/encoder streaming
> thread?

Probably, oprofile can help if needed, but again, depends on HW and
the pipeline written.

> 3.How to optimize this use case ?
> i already tried many properties for reducing bit-rate, increasing appsrc max
> bytes, changing other values etc..
> (plugin developer says it supports HD encoding at real time 30fps)
> 4.how to debug performance blockers ?

oprofile or perf are good tools for this.
DMA and memory usage/copy are the main difficulties, but again, nowing
the HW used would be very helpful.

JM


More information about the gstreamer-devel mailing list