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.

H264 Encoder Plugin on DM365

Hello All,

I am observing crash in the pipeline when multiple instances of H264 encoder plugin are created.

The pipeline is as follows
gst-launch videotestsrc num-buffers=2000 ! 'video/x-raw-yuv,format=(fourcc)NV12,width=320,
height=176' ! TIVidenc1 codecName=h264enc engineName=encode resolution=320x176 !
rtph264pay ! udpsink host=10.60.6.57 port=5004

The above pipeline runs successfully when a single pipeline is running.

However, when four such pipelines are created in four different terminals the 2nd, 3rd and 4th
pipeline crashes with the following error every time they are created.
[please note that the host ip and ports are changed in every pipeline].


Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
CMEM Error: getPool: Failed to get a pool fitting a size 624
gst-launch-0.10: linux/Rendezvous.c:105: Rendezvous_meet: Assertion `hRv' failed.
Aborted

or

GThread-ERROR **: file gthread-posix.c: line 367 (g_thread_create_posix_impl):
error 'Cannot allocate memory' during 'pthread_create'
aborting...
Trace/breakpoint trap


The multiple instances of a plugin can be created usually.

Is there any exception to be handled in this platform ?

Please suggest if I am doing any mistake .


Thanks and regards,

  • I think it depends on the configuration of the CMEM module. It preallocates contiguous memory blocks in several "pools" of different sizes. Point is that if you instance too many encoders, some of the pools can be filled while others still have free memory blocks.

    This is one of the worst thing to configure on the current DaVinci systems, because CMEM is not flexible and you have to preconfigure it for the worst case. Problem is that there is no tool you can run in advance to help you configure CMEM for different scenarios. If you make it wrong, simply the encoders will not instantiate.

    There is a page providing some advices on how to deal with CMEM, but basically it is a "try and retry" setting.

    Since I lack the time to do this, I've left the same configuration as in the demo board, but I know that probably I am wasting memory. While this config is generic enough to allow me to run several encoder configurations, it is not perfect for every situation.

    I think that TI should improve this point. Their video encoding pipeline is great, very flexible, but CMEM configuration is a big issue. Finding the perfect configuration requires a lot of time and you have to do it at run time.

     

  •  Thanks.

     

    But I want to know, is it possible to run the multiple instances of H.264 encoder, after configuring the CMEM module?

     

    I have encoded one H.264 stream using H.264 encoder (Gstreamer) plugin provided by TI.

    I found that it is encoding Main profile @ 3.1 level.

     

    But my requirement is to encode at base profile. When I saw the plugin properties there

    was no parameters to configure encoder profile.

     

    How can encode H264 base line profile stream using encoder plugin provided by TI?

     

    Thanks


  • Yes, it is possible to create multiple instances of H.264 encoder.