This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GStreamer hogs my CPU when using hardware video encoders (DM365, Arago)

I'm using a DM365 board and the DVSDK 4.02.00.06.

The goal is to capture video from a camera and encode it as motion JPEG or H.624, with a GStreamer pipeline.

The issue I see is that even though I use hardware encoder elements (TIImgenc1 and TIVidenc1) I get 100% CPU load and the pipeline is throttled to ~14fps.

For testing, I'm using gst-lauch, reducing to the most primitive pipeline, writing to the "fakesink" null element. When I omit the encoder and have the pipeline write the raw captured frames to fakesink, the CPU load is about 10% and the framerate is 50 fps.

These are the pipelines I'm trying, first for JPEG, second for H.264:

gst-launch v4l2src input-src=component always-copy=false num-buffers=500 ! \
queue ! \
'video/x-raw-yuv,width=640,height=480' ! \
TIImgenc1 iColorSpace=UYVY oColorSpace=YUV420P engineName=codecServer codecName=jpegenc numOutputBufs=3 ! \
fakesink

gst-launch v4l2src input-src=component always-copy=false num-buffers=500 ! \
queue ! \
video/x-raw-yuv, format=\(fourcc\)NV12,width=640,height=480 ! \
TIVidenc1 codecName=h264enc engineName=codecServer encodingPreset=3 ! \
fakesink

At first I thought that perhaps some unintended (and hopefully avoidable) video format conversion is done in software. But the experiment of just removing the encoder line and getting full performance leaves me puzzled.

 

Thanks for any help,

Jörg

 

  • Jorg,

    Have you tried Software developer guide recommended pipeline for encoding ?

    Thanks

    Brijesh

  • Brijesh, thank you for your quick answer.

    You mean like in "RTFM"? I'm not used to useful documentation...  ;-)

    Well, almost. By looking in there I found out that the property "contiguousInputFrame=TRUE" helps me for H.264.

    For the JPEG case, I'm still experimenting, that issue remains. The "TIImgenc1" element has no "contiguousInputFrame" property. Also, I see no example pipeline for its continuous use.

     

    Jörg

     

  • I have the same problem.  Any news ?

    My pipeline is

    gst-launch v4l2src always-copy=FALSE ! 'video/x-raw-yuv, width=(int)720,height=(int)480, framerate=(fraction)25/1' ! TIImgenc1 iColorSpace=UYVY oColorSpace=YUV422P qValue=50 codecName=jpegenc engineName=codecServer  !  dmaiperf  !  rtpjpegpay ! udpsink port=5050 host=10.39.10.182

    framerate is about 12 FPS

    linux distro = arago

    kernel version 2.6.32