TI E2E Community
Multimedia Software Codecs
Multimedia Software Codecs forum
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 624gst-launch-0.10: linux/Rendezvous.c:105: Rendezvous_meet: Assertion `hRv' failed.Abortedor GThread-ERROR **: file gthread-posix.c: line 367 (g_thread_create_posix_impl): error 'Cannot allocate memory' during 'pthread_create'aborting...Trace/breakpoint trapThe 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.
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?
Yes, it is possible to create multiple instances of H.264 encoder.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.