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.

DM814x GStreamer OMX Encoding in MPEG2, MPEG4, MJPEG



Hi all,

I can get a gstreamer pipeline to capture using V4L2 and encode using the 'omx_h264enc' component.  Can someone tell me if there are other GSTreamer OMX components to encode into MPEG2, MPEG4 or MJPEG?  These encoding formats are all supported by the HDVICP2, I'm just wondering how I actually use them!?

Regards,

Danny Cullen

  • Hello Danny Cullen,

    Danny Cullen said:
    an someone tell me if there are other GSTreamer OMX components to encode into MPEG2, MPEG4 or MJPEG?

    You could check in:

    ti-ezsdk_dm814x-evm_5_05_02_00/component-sources/gst-openmax_GST_DM81XX_00_07_00_00/omx

    also you could check in:

    gstomx.c

    or

    ti-ezsdk_dm814x-evm_5_05_02_00/component-sources/gst-openmax_GST_DM81XX_00_07_00_00

    OMX_GST_ReleaseNotes.pdf

    chapter: What is Supported

    Best Regards,

    Margarita

  • Hi Margarita,

    Thanks for the reply.  I checked the pdf documents and they don't specifically mention MPEG4/MJPEG encoding is supported or not.

    In 'gstomx.c', there is a commecnted out line:

    //    { "omx_mpeg4enc",       "libOMX_Core.so",           "OMX.TI.DUCATI.VIDENC",  NULL,                   GST_RANK_PRIMARY,   gst_omx_mpeg4enc_get_type },

    I'm therefore assumming that this isn't supported?  If so, are there any plans in upcoming TI GStreamer releases to make this available?

    Regards,

    Danny

  • Hello,

    I will check and I will let you know.

    Best Regards,

    Margarita

  • Hello,

    Danny Cullen said:
    //    { "omx_mpeg4enc",       "libOMX_Core.so",           "OMX.TI.DUCATI.VIDENC",  NULL,                   GST_RANK_PRIMARY,   gst_omx_mpeg4enc_get_type },

    You could try to remove the comment. Rebuild the gstreamer.

    You could use these pipelines for tests:

    gst-launch -v videotestsrc ! 'video/x-raw-yuv, width=1920, height=1080, format=(fourcc)NV12, framerate=60/1' ! omx_mpeg4enc  !  filesink location=colorbar.mp4

    gst-launch -v filesrc location=colorbar.mp4 ! mpeg4videoparse ! omx_mpeg4dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 !  omx_videosink

    Best Regards,

    Margarita

  • Hi Margarita,

    I have uncommented the omx_mpeg4enc declaration and am rebuilding now.  I'll feed back in an hour or so on the status.

    There must be a reason why it was commented out though?  Or it it just an untested component from a TI GStreamer point of view?

    Regards,

    Danny

  • Hello,

    Danny Cullen said:
    I have uncommented the omx_mpeg4enc declaration and am rebuilding now.  I'll feed back in an hour or so on the status.

    Let me know the result.

    Best Regards,

    Margarita

  • Hi Margarita, I was diverted onto a different activity so I nver got around to testing.  I will feedback one the MPEG4 encoding is complete.

    Regards,

    Danny

  • Margarita,

    I tested the 'omx_mpeg4enc' GStreamer element without success.  These were the pipelines I used:

    gst-launch v4l2src device=/dev/video5 always-copy=false queue-size=12 ! \ video/x-raw-yuv-strided,format=\(fourcc\)NV12,width=1920,height=1080,framerate=\(fraction\)60/1 ! omxbufferalloc numBuffers=12 ! omx_mpeg4enc ! video/mpeg,mpegversion=4 ! \ gstperf ! filesink location=sample.mpeg4 sync=false

    gst-launch --gst-debug=3 --gst-debug-no-color v4l2src device=/dev/video5 always-copy=false queue-size=12 ! \ video/x-raw-yuv-strided,format=\(fourcc\)NV12,width=1920,height=1080,framerate=\(fraction\)60/1 ! omxbufferalloc numBuffers=12 ! omx_mpeg4enc ! video/mpeg,mpegversion=4 ! \ gstperf ! filesink location=sample.mpeg4 sync=false

    With no debugging, it failed with the error "unrecoverable error: One or more parameters were not valid (0x80001005)".  Please see this log,

    Setting pipeline to PAUSED ...
    
     Mode set is 1080P60
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    unrecoverable error: One or more parameters were not valid (0x80001005)
    ERROR: from element /GstPipeline:pipeline0/GstOmxMpeg4Enc:omxmpeg4enc0: GStreamer encountered a general stream error.
    Additional debug info:
    gstomx_base_filter.c(659): pad_chain (): /GstPipeline:pipeline0/GstOmxMpeg4Enc:omxmpeg4enc0:
    Error from OpenMAX component
    Execution ended after 63829300 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...
    

    With gst debug output enable the pipeline generated a segmentation fault, please see this log,

    0:00:00.002834601   100    0x15078 INFO                GST_INIT gstquery.c:108:_gst_query_initialize: init queries
    0:00:00.010664800   100    0x15078 INFO                GST_INIT gstmessage.c:73:_gst_message_initialize: init messages
    0:00:00.012501950   100    0x15078 INFO      GST_PLUGIN_LOADING gstplugin.c:350:_gst_plugin_initialize: registering 0 static plugins
    0:00:00.013889151   100    0x15078 INFO      GST_PLUGIN_LOADING gstplugin.c:255:gst_plugin_register_static: registered static plugin "staticelements"
    0:00:00.013982151   100    0x15078 INFO      GST_PLUGIN_LOADING gstplugin.c:257:gst_plugin_register_static: added static plugin "staticelements", result: 1
    0:00:00.014063201   100    0x15078 INFO            GST_REGISTRY gstregistry.c:1599:ensure_current_registry: reading registry cache: /tmp/gst_registry.bin
    0:00:00.014640101   100    0x15078 INFO            GST_REGISTRY gstregistrybinary.c:532:gst_registry_binary_read_cache: Unable to mmap file /tmp/gst_registry.bin : Failed to open file '/tmp/gst_registry.bin': open() failed: No such file or directory
    0:00:00.014872401   100    0x15078 INFO            GST_REGISTRY gstregistrybinary.c:542:gst_registry_binary_read_cache: Unable to read file /tmp/gst_registry.bin : Failed to open file '/tmp/gst_registry.bin': No such file or directory
    0:00:00.014961601   100    0x15078 INFO            GST_REGISTRY gstregistry.c:1469:scan_and_update_registry: Validating plugins from registry cache: /tmp/gst_registry.bin
    
    (gst-plugin-scanner:101): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstmad.so': /usr/lib/libid3tag.so.0: undefined symbol: id3_frametype_obsolete
    
    (gst-plugin-scanner:101): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstivorbisdec.so': libvorbisidec.so.1: cannot open shared object file: No such file or directory
    
    (gst-plugin-scanner:101): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstcdparanoia.so': libcdda_interface.so.0: cannot open shared object file: No such file or directory
    
    (gst-plugin-scanner:101): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstalsa.so': libasound.so.2: cannot open shared object file: No such file or directory
    
    (gst-plugin-scanner:101): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstjpeg.so': libjpeg.so.8: cannot open shared object file: No such file or directory
    
    (gst-plugin-scanner:101): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstspeex.so': libspeex.so.1: cannot open shared object file: No such file or directory
    
    (gst-plugin-scanner:101): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstfaac.so': libfaac.so.0: cannot open shared object file: No such file or directory
    
    (gst-plugin-scanner:101): GStreamer-CRITICAL **: gst_element_class_add_pad_template: assertion `gst_element_class_get_pad_template (klass, templ->name_template) == NULL' failed
    In base init!!
    In class init!!
    0:00:05.610742400   100    0x15078 INFO            GST_REGISTRY gstregistry.c:1570:scan_and_update_registry: Registry cache changed. Writing new registry cache
    0:00:05.610910600   100    0x15078 INFO            GST_REGISTRY gstregistrybinary.c:364:gst_registry_binary_write_cache: Building binary registry cache image
    0:00:05.644903701   100    0x15078 INFO            GST_REGISTRY gstregistrybinary.c:396:gst_registry_binary_write_cache: Writing binary registry cache
    0:00:05.749722550   100    0x15078 INFO            GST_REGISTRY gstregistrybinary.c:258:gst_registry_binary_cache_finish: Wrote binary registry cache
    0:00:05.749874050   100    0x15078 INFO            GST_REGISTRY gstregistry.c:1578:scan_and_update_registry: Registry cache written successfully
    0:00:05.749932900   100    0x15078 INFO            GST_REGISTRY gstregistry.c:1628:ensure_current_registry: registry reading and updating done, result = 1
    0:00:05.750031450   100    0x15078 INFO                GST_INIT gst.c:792:init_post: GLib runtime version: 2.30.3
    0:00:05.750105600   100    0x15078 INFO                GST_INIT gst.c:794:init_post: GLib headers version: 2.24.2
    0:00:05.750510650   100    0x15078 INFO            GST_PIPELINE gstparse.c:299:gst_parse_launch_full: parsing pipeline description 'v4l2src device=/dev/video5 always-copy=false queue-size=12 ! video/x-raw-yuv-strided,format=(fourcc)NV12,width=1920,height=1080,framerate=(fraction)60/1 ! omx_mpeg4enc ! video/mpeg,mpegversion=4 ! gstperf ! filesink location=sample.mpeg4 sync=false '
    0:00:05.761690750   100    0x15078 INFO      GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/gstreamer-0.10/libgstvideo4linux2.so" loaded
    0:00:05.761867200   100    0x15078 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:371:gst_element_factory_create: creating element "v4l2src"
    0:00:05.768187950   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:716:gst_element_add_pad:<GstBaseSrc@0x118030> adding pad 'src'
    0:00:05.834608351   100    0x15078 INFO      GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/gstreamer-0.10/libgstomx.so" loaded
    0:00:05.834827201   100    0x15078 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:371:gst_element_factory_create: creating element "omx_mpeg4enc"
    0:00:05.837424851   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:716:gst_element_add_pad:<GstOmxBaseFilter@0x11d000> adding pad 'sink'
    0:00:05.837565451   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:716:gst_element_add_pad:<GstOmxBaseFilter@0x11d000> adding pad 'src'
    0:00:05.837840100   100    0x15078 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:371:gst_element_factory_create: creating element "gstperf"
    0:00:05.838839300   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:716:gst_element_add_pad:<GstBaseTransform@0x11e000> adding pad 'sink'
    0:00:05.839130800   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:716:gst_element_add_pad:<GstBaseTransform@0x11e000> adding pad 'src'
    0:00:05.844913151   100    0x15078 INFO      GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/gstreamer-0.10/libgstcoreelements.so" loaded
    0:00:05.845063351   100    0x15078 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:371:gst_element_factory_create: creating element "filesink"
    0:00:05.846438751   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:716:gst_element_add_pad:<GstBaseSink@0x122018> adding pad 'sink'
    0:00:05.846997851   100    0x15078 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:371:gst_element_factory_create: creating element "pipeline"
    0:00:05.848075750   100    0x15078 INFO            GST_PIPELINE ./grammar.y:568:gst_parse_perform_link: linking v4l2src0:(any) to omxmpeg4enc0:(any) (0/0) with caps "0xa00a0"
    0:00:05.848232250   100    0x15078 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:371:gst_element_factory_create: creating element "capsfilter"
    0:00:05.849174950   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:716:gst_element_add_pad:<GstBaseTransform@0x125118> adding pad 'sink'
    0:00:05.849468300   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:716:gst_element_add_pad:<GstBaseTransform@0x125118> adding pad 'src'
    0:00:05.849659300   100    0x15078 INFO              GST_STATES gstbin.c:1759:gst_bin_get_state_func:<pipeline0> getting state
    0:00:05.849873050   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<capsfilter0> completed state change to NULL
    0:00:05.850063050   100    0x15078 INFO        GST_ELEMENT_PADS gstutils.c:1568:gst_element_link_pads_full: trying to link element v4l2src0:(any) to element capsfilter0:sink
    0:00:05.850172900   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:963:gst_element_get_static_pad: found pad capsfilter0:sink
    0:00:05.850258850   100    0x15078 INFO                GST_PADS gstutils.c:1468:prepare_link_maybe_ghosting: v4l2src0 and capsfilter0 in same bin, no need for ghost pads
    0:00:05.850498400   100    0x15078 INFO                GST_PADS gstpad.c:1941:gst_pad_link_prepare: trying to link v4l2src0:src and capsfilter0:sink
    0:00:05.852410000   100    0x15078 INFO                GST_PADS gstpad.c:2124:gst_pad_link_full: linked v4l2src0:src and capsfilter0:sink, successful
    0:00:05.852734901   100    0x15078 INFO        GST_ELEMENT_PADS gstutils.c:1568:gst_element_link_pads_full: trying to link element capsfilter0:src to element omxmpeg4enc0:(any)
    0:00:05.852828951   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:963:gst_element_get_static_pad: found pad capsfilter0:src
    0:00:05.852932601   100    0x15078 INFO                GST_PADS gstutils.c:1028:gst_pad_check_link: trying to link capsfilter0:src and omxmpeg4enc0:sink
    0:00:05.858652550   100    0x15078 INFO                GST_PADS gstutils.c:1468:prepare_link_maybe_ghosting: capsfilter0 and omxmpeg4enc0 in same bin, no need for ghost pads
    0:00:05.858810850   100    0x15078 INFO                GST_PADS gstpad.c:1941:gst_pad_link_prepare: trying to link capsfilter0:src and omxmpeg4enc0:sink
    0:00:05.864270651   100    0x15078 INFO                GST_PADS gstpad.c:2124:gst_pad_link_full: linked capsfilter0:src and omxmpeg4enc0:sink, successful
    0:00:05.864464401   100    0x15078 INFO            GST_PIPELINE ./grammar.y:568:gst_parse_perform_link: linking omxmpeg4enc0:(any) to perf0:(any) (0/0) with caps "0xa0180"
    0:00:05.864578251   100    0x15078 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:371:gst_element_factory_create: creating element "capsfilter"
    0:00:05.864937201   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:716:gst_element_add_pad:<GstBaseTransform@0x1252e8> adding pad 'sink'
    0:00:05.865224951   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:716:gst_element_add_pad:<GstBaseTransform@0x1252e8> adding pad 'src'
    0:00:05.865413001   100    0x15078 INFO              GST_STATES gstbin.c:1759:gst_bin_get_state_func:<pipeline0> getting state
    0:00:05.865597601   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<capsfilter1> completed state change to NULL
    0:00:05.865745201   100    0x15078 INFO        GST_ELEMENT_PADS gstutils.c:1568:gst_element_link_pads_full: trying to link element omxmpeg4enc0:(any) to element capsfilter1:sink
    0:00:05.865835501   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:963:gst_element_get_static_pad: found pad capsfilter1:sink
    0:00:05.865909351   100    0x15078 INFO                GST_PADS gstutils.c:1468:prepare_link_maybe_ghosting: omxmpeg4enc0 and capsfilter1 in same bin, no need for ghost pads
    0:00:05.866044201   100    0x15078 INFO                GST_PADS gstpad.c:1941:gst_pad_link_prepare: trying to link omxmpeg4enc0:src and capsfilter1:sink
    0:00:05.866155201   100    0x15078 INFO                GST_PADS gstpad.c:2124:gst_pad_link_full: linked omxmpeg4enc0:src and capsfilter1:sink, successful
    0:00:05.866326801   100    0x15078 INFO        GST_ELEMENT_PADS gstutils.c:1568:gst_element_link_pads_full: trying to link element capsfilter1:src to element perf0:(any)
    0:00:05.866411251   100    0x15078 INFO        GST_ELEMENT_PADS gstelement.c:963:gst_element_get_static_pad: found pad capsfilter1:src
    0:00:05.866495151   100    0x15078 INFO                GST_PADS gstutils.c:1028:gst_pad_check_link: trying to link capsfilter1:src and perf0:sink
    0:00:05.866823251   100    0x15078 INFO                GST_PADS gstutils.c:1468:prepare_link_maybe_ghosting: capsfilter1 and perf0 in same bin, no need for ghost pads
    0:00:05.866958101   100    0x15078 INFO                GST_PADS gstpad.c:1941:gst_pad_link_prepare: trying to link capsfilter1:src and perf0:sink
    0:00:05.867261551   100    0x15078 INFO                GST_PADS gstpad.c:2124:gst_pad_link_full: linked capsfilter1:src and perf0:sink, successful
    0:00:05.867446001   100    0x15078 INFO            GST_PIPELINE ./grammar.y:568:gst_parse_perform_link: linking perf0:(any) to filesink0:(any) (0/0) with caps "(nil)"
    0:00:05.867544001   100    0x15078 INFO        GST_ELEMENT_PADS gstutils.c:1568:gst_element_link_pads_full: trying to link element perf0:(any) to element filesink0:(any)
    0:00:05.867635351   100    0x15078 INFO                GST_PADS gstutils.c:1028:gst_pad_check_link: trying to link perf0:src and filesink0:sink
    0:00:05.868064050   100    0x15078 INFO                GST_PADS gstutils.c:1468:prepare_link_maybe_ghosting: perf0 and filesink0 in same bin, no need for ghost pads
    0:00:05.868199300   100    0x15078 INFO                GST_PADS gstpad.c:1941:gst_pad_link_prepare: trying to link perf0:src and filesink0:sink
    0:00:05.868580350   100    0x15078 INFO                GST_PADS gstpad.c:2124:gst_pad_link_full: linked perf0:src and filesink0:sink, successful
    Setting pipeline to PAUSED ...
    0:00:05.913778799   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<filesink0> completed state change to READY
    0:00:05.913885899   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<filesink0> posting state-changed NULL to READY
    0:00:05.914170349   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'filesink0' changed state to 2(READY) successfully
    0:00:05.914317649   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<perf0> completed state change to READY
    0:00:05.914393549   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<perf0> posting state-changed NULL to READY
    0:00:05.914519149   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'perf0' changed state to 2(READY) successfully
    0:00:05.914642299   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<capsfilter1> completed state change to READY
    0:00:05.914716699   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<capsfilter1> posting state-changed NULL to READY
    0:00:05.914836599   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'capsfilter1' changed state to 2(READY) successfully
    0:00:05.914963199   100    0x15078 INFO                     omx gstomx_base_filter.c:150:change_state:<omxmpeg4enc0> begin: changing state NULL -> READY
    0:00:06.981851100   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<omxmpeg4enc0> completed state change to READY
    0:00:06.982017000   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<omxmpeg4enc0> posting state-changed NULL to READY
    0:00:06.982214100   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'omxmpeg4enc0' changed state to 2(READY) successfully
    0:00:06.982379100   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<capsfilter0> completed state change to READY
    0:00:06.982455000   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<capsfilter0> posting state-changed NULL to READY
    0:00:06.982691401   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 2(READY) successfully
    0:00:06.991437400   100    0x15078 INFO                    v4l2 v4l2_calls.c:480:gst_v4l2_open:<v4l2src0> Opened device 'TI81xx_catalogue' (/dev/video5) successfully
    0:00:07.001049250   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<v4l2src0> completed state change to READY
    0:00:07.001153250   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<v4l2src0> posting state-changed NULL to READY
    0:00:07.001299400   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 2(READY) successfully
    0:00:07.001492650   100    0x15078 INFO              GST_STATES gstelement.c:2314:gst_element_continue_state:<pipeline0> committing state from NULL to READY, pending PAUSED, next PAUSED
    0:00:07.001890950   100    0x15078 INFO              GST_STATES gstelement.c:2323:gst_element_continue_state:<pipeline0> continue state change READY to PAUSED, final PAUSED
    0:00:07.002288300   100    0x15078 INFO              GST_STATES gstbin.c:2498:gst_bin_change_state_func:<pipeline0> child 'filesink0' is changing state asynchronously to PAUSED
    0:00:07.002519350   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<perf0> completed state change to PAUSED
    0:00:07.002717350   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<perf0> posting state-changed READY to PAUSED
    0:00:07.002852900   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'perf0' changed state to 3(PAUSED) successfully
    0:00:07.003026100   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<capsfilter1> completed state change to PAUSED
    0:00:07.003109100   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<capsfilter1> posting state-changed READY to PAUSED
    0:00:07.003236050   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'capsfilter1' changed state to 3(PAUSED) successfully
    0:00:07.003366050   100    0x15078 INFO                     omx gstomx_base_filter.c:150:change_state:<omxmpeg4enc0> begin: changing state READY -> PAUSED
    0:00:07.003500250   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<omxmpeg4enc0> completed state change to PAUSED
    0:00:07.003581150   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<omxmpeg4enc0> posting state-changed READY to PAUSED
    0:00:07.003708200   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'omxmpeg4enc0' changed state to 3(PAUSED) successfully
    0:00:07.003874000   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<capsfilter0> completed state change to PAUSED
    0:00:07.003957200   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<capsfilter0> posting state-changed READY to PAUSED
    0:00:07.004083850   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 3(PAUSED) successfully
    0:00:07.050376500   100    0x15078 INFO                    v4l2 gstv4l2object.c:1036:gst_v4l2_object_fill_format_list:<v4l2src0> got 4 format(s):
    0:00:07.050490100   100    0x15078 INFO                    v4l2 gstv4l2object.c:1042:gst_v4l2_object_fill_format_list:<v4l2src0>   NV12
    0:00:07.050583500   100    0x15078 INFO                    v4l2 gstv4l2object.c:1042:gst_v4l2_object_fill_format_list:<v4l2src0>   YUYV
    0:00:07.050672100   100    0x15078 INFO                    v4l2 gstv4l2object.c:1042:gst_v4l2_object_fill_format_list:<v4l2src0>   RGB3
    0:00:07.050759100   100    0x15078 INFO                    v4l2 gstv4l2object.c:1042:gst_v4l2_object_fill_format_list:<v4l2src0>   NV16
    0:00:07.744203401   100    0x15078 WARN                    v4l2 gstv4l2object.c:1958:gst_v4l2_object_probe_caps_for_format:<v4l2src0> Could not probe minimum capture size for pixelformat NV12
    0:00:08.778502151   100    0x15078 WARN                    v4l2 gstv4l2object.c:1958:gst_v4l2_object_probe_caps_for_format:<v4l2src0> Could not probe minimum capture size for pixelformat NV12
    0:00:09.823681701   100    0x15078 WARN                    v4l2 gstv4l2object.c:1958:gst_v4l2_object_probe_caps_for_format:<v4l2src0> Could not probe minimum capture size for pixelformat YUYV
    0:00:10.892985251   100    0x15078 WARN                    v4l2 gstv4l2object.c:1958:gst_v4l2_object_probe_caps_for_format:<v4l2src0> Could not probe minimum capture size for pixelformat YUYV
    0:00:11.918220301   100    0x15078 WARN                    v4l2 gstv4l2object.c:1958:gst_v4l2_object_probe_caps_for_format:<v4l2src0> Could not probe minimum capture size for pixelformat RGB3
    0:00:12.981668050   100    0x15078 WARN                    v4l2 gstv4l2object.c:1958:gst_v4l2_object_probe_caps_for_format:<v4l2src0> Could not probe minimum capture size for pixelformat RGB3
    0:00:13.323908251   100    0x15078 INFO                 v4l2src gstv4l2src.c:610:gst_v4l2src_get_caps:<v4l2src0> probed caps: 0x12ba00
    0:00:13.765140601   100    0x15078 INFO                    v4l2 gstv4l2object.c:1519:gst_v4l2_object_get_caps_info:<v4l2src0> rowstride: 1920
    0:00:13.796655451   100    0x15078 INFO                 v4l2src v4l2src_calls.c:319:gst_v4l2src_capture_init:<v4l2src0> capturing buffers via mmap()
    0:00:14.246625213   100    0x15078 INFO               GST_EVENT gstevent.c:600:gst_event_new_new_segment_full: creating newsegment update 0, rate 1.000000, format GST_FORMAT_TIME, start 0:00:00.000000000, stop 99:99:99.999999999, position 0:00:00.000000000
    0:00:14.247669263   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<v4l2src0> completed state change to PAUSED
    0:00:14.247777613   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<v4l2src0> posting state-changed READY to PAUSED
    0:00:14.247926264   100    0x15078 INFO              GST_STATES gstbin.c:2536:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 3(PAUSED) successfully without preroll
    0:00:14.248093364   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<pipeline0> completed state change to PAUSED
    0:00:14.248174864   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<pipeline0> posting state-changed READY to PAUSED
    
     Mode set is 1080P60
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    0:00:14.252204316   100    0x15078 INFO               GST_EVENT gstevent.c:1068:gst_event_new_latency: creating latency event 0:00:00.000000000
    0:00:14.252426916   100    0x15078 INFO                     bin gstbin.c:2368:gst_bin_do_latency_func:<pipeline0> configured latency of 0:00:00.000000000
    0:00:14.253214517   100    0x15078 INFO              GST_STATES gstbin.c:2498:gst_bin_change_state_func:<pipeline0> child 'filesink0' is changing state asynchronously to PLAYING
    0:00:14.253361817   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<perf0> completed state change to PLAYING
    0:00:14.253446167   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<perf0> posting state-changed PAUSED to PLAYING
    0:00:14.253580117   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'perf0' changed state to 4(PLAYING) successfully
    0:00:14.253709067   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<capsfilter1> completed state change to PLAYING
    0:00:14.253790667   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<capsfilter1> posting state-changed PAUSED to PLAYING
    0:00:14.253917367   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'capsfilter1' changed state to 4(PLAYING) successfully
    0:00:14.254046567   100    0x15078 INFO                     omx gstomx_base_filter.c:150:change_state:<omxmpeg4enc0> begin: changing state PAUSED -> PLAYING
    0:00:14.254137817   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<omxmpeg4enc0> completed state change to PLAYING
    0:00:14.254217967   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<omxmpeg4enc0> posting state-changed PAUSED to PLAYING
    0:00:14.254344367   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'omxmpeg4enc0' changed state to 4(PLAYING) successfully
    0:00:14.254470717   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<capsfilter0> completed state change to PLAYING
    0:00:14.254552117   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<capsfilter0> posting state-changed PAUSED to PLAYING
    0:00:14.254677267   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 4(PLAYING) successfully
    0:00:14.254928617   100    0x15078 INFO              GST_STATES gstelement.c:2341:gst_element_continue_state:<v4l2src0> completed state change to PLAYING
    0:00:14.255014567   100    0x15078 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<v4l2src0> posting state-changed PAUSED to PLAYING
    0:00:14.255146317   100    0x15078 INFO              GST_STATES gstbin.c:2492:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 4(PLAYING) successfully
    New clock: GstSystemClock
    0:00:14.290861849   100   0x129f10 INFO                 v4l2src gstv4l2src.c:1016:gst_v4l2src_create:<v4l2src0> sync to 0:00:00.000000000
    0:00:14.291109999   100   0x129f10 INFO                     omx gstomx_base_videoenc.c:290:pad_event:<omxmpeg4enc0> begin: event=newsegment
    0:00:14.291200599   100   0x129f10 INFO                     omx gstomx_base_filter.c:680:pad_event:<omxmpeg4enc0> begin: event=newsegment
    0:00:14.291695549   100   0x129f10 INFO           basetransform gstbasetransform.c:1148:gst_base_transform_setcaps:<capsfilter0> reuse caps
    0:00:14.292013849   100   0x129f10 INFO                     omx gstomx_base_videoenc.c:139:sink_setcaps:<omxmpeg4enc0> setcaps (sink): 0x12b9a0
    0:00:14.293652749   100   0x129f10 INFO                     omx gstomx_base_filter.c:545:pad_chain:<omxmpeg4enc0> omx: prepare
    0:00:14.293751149   100   0x129f10 INFO                     omx gstomx_base_videoenc.c:203:omx_setup:<omxmpeg4enc0> begin
    0:00:14.303201096   100   0x129f10 INFO                     omx gstomx_base_videoenc.c:278:omx_setup:<omxmpeg4enc0> end
    0:00:14.307037346   100   0x129f10 WARN                     omx gstomx_base_filter.c:822:buffer_alloc:<omxmpeg4enc0> faking settings changed notification
    0:00:14.307905846   100   0x129f10 INFO                     omx gstomx_mpeg4enc.c:322:settings_changed_cb:<omxmpeg4enc0> caps are: 0x12bba0
    Segmentation fault
    

    This all leads me to believe that the 'omx_mpeg4enc' element is untested?  I'm using SDK 05.05.02.00 and the GStreamer sources pulled from https://gstreamer.ti.com/svn/gstreamer_ti/trunk/gstreamer_ti_dm814x.

    Is this something which is currently being tested/developed?  Any release dates as to when it will be fully supported?

    Just for sanity, I retested my V4L2 capture and H264 encode and it still works like a charm so no major issues there.

    Kind regards,

    Danny Cullen

  • Hello Danny,

    I will check it and I will let you know.

    Best Regards,

    Margarita

  • Hello Danny,

    Danny Cullen said:

    gst-launch v4l2src device=/dev/video5 always-copy=false queue-size=12 ! \ video/x-raw-yuv-strided,format=\(fourcc\)NV12,width=1920,height=1080,framerate=\(fraction\)60/1 ! omxbufferalloc numBuffers=12 ! omx_mpeg4enc ! video/mpeg,mpegversion=4 ! \ gstperf ! filesink location=sample.mpeg4 sync=false

    gst-launch --gst-debug=3 --gst-debug-no-color v4l2src device=/dev/video5 always-copy=false queue-size=12 ! \ video/x-raw-yuv-strided,format=\(fourcc\)NV12,width=1920,height=1080,framerate=\(fraction\)60/1 ! omxbufferalloc numBuffers=12 ! omx_mpeg4enc ! video/mpeg,mpegversion=4 ! \ gstperf ! filesink location=sample.mpeg4 sync=false

    Could you remove framerate=\(fraction\)60/1 from the pipeline and try again. I have some suspicious. Let me know the result.

    Best Regards,

    Margarita

  • Hi Margarita,

    I finally got around to testing again without success.  Removing the 'framerate=\(fraction\)60/1' part from the gstreamer pipeline had no effect.  I still get the same errors as before.

    Do you have any other suggestions?  Have you seen this work in your system?

    For your information, I tried the pipeline below and it did work and encode.  Does this tell you anything about why it doesn't work with a 'real' V4L2 input?  The obvious differences in the pipeline are that it's not using OMX allocated buffers or a strided capture buffer.

    gst-launch videotestsrc num-buffers=1000 ! video/x-raw-yuv,format=\(fourcc\)NV12,width=1920,height=1080,framerate=\(fraction\)60/1 ! omx_mpeg4enc ! video/mpeg,mpegversion=4,systemstream=false ! gstperf ! filesink location=sample.mpeg4

    Kind regards,

    Danny

  • Hello Danny,

    Could you check this topic and apply the patch for gstomxbufferalloc.c

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/228258/809457.aspx#809457

    Let me know the result.

    Best Regards,

    Margarita

  • hello danny , i have same problem, can you help in any way..

    hi margarita , i don't feel there is need of patches , because omx_h264enc works fine . only problem is with omx_mpeg4enc .

  • Hello,

    This topic is very old, please open a new one with information about the issue that you met, software release, are you using EVM or custom board etc.

    Best Regards,

    Margarita

  • Hello,

    I checked the omx_mpeg4enc.

    Please provide more details about your use case and the issue that you met.

    Here is my observations:

    Pipeline for tests:

    gst-launch videotestsrc num-buffers=1000  ! omx_mpeg4enc ! video/mpeg,mpegversion=4,systemstream=false ! filesink location=mpeg4enc.m4v

    Decoding the stream:

    root@dm814x-evm:~# gst-launch filesrc location=mpeg4enc.m4v ! mpeg4videoparse  !
      omx_mpeg4dec  ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf  !  omx_videosink
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    Width :320, Height: 240
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    perf0: frames: 62     current: 61.20     average: 61.20    arm-load: 10
    perf0: frames: 122     current: 60.00     average: 60.60    arm-load: 34
    perf0: frames: 183     current: 60.00     average: 60.40    arm-load: 33
    perf0: frames: 244     current: 60.00     average: 60.30    arm-load: 37
    perf0: frames: 304     current: 60.00     average: 60.24    arm-load: 34
    perf0: frames: 365     current: 60.01     average: 60.20    arm-load: 32
    perf0: frames: 426     current: 60.00     average: 60.17    arm-load: 35
    perf0: frames: 486     current: 60.00     average: 60.15    arm-load: 36
    perf0: frames: 547     current: 60.00     average: 60.13    arm-load: 32
    perf0: frames: 608     current: 60.00     average: 60.12    arm-load: 35
    perf0: frames: 669     current: 60.00     average: 60.11    arm-load: 32
    perf0: frames: 729     current: 60.00     average: 60.10    arm-load: 33
    perf0: frames: 789     current: 60.00     average: 60.09    arm-load: 31
    perf0: frames: 850     current: 60.00     average: 60.09    arm-load: 32
    perf0: frames: 910     current: 60.00     average: 60.08    arm-load: 35
    perf0: frames: 970     current: 60.00     average: 60.08    arm-load: 34
    Recieved EOS event, press <CTRL+C> to terminate pipeline.
    Recieved EOS event, press <CTRL+C> to terminate pipeline.
    Got EOS from element "pipeline0".
    Execution ended after 16388498500 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...
    root@dm814x-evm:~#

    I am using EZSDK 5.05.02 on dm8148EVM.

    Best Regards,

    Margarita