.. _plugin_simaaiencoder: |plugin| ======== This section describes the GStreamer plugin named |plugin|. Description ----------- This plugin is used for encodeing the outgoing stream using ``Allegro Encoder``. .. image:: media/mlsoc_diagram_allegro.png :scale: 40% :align: center | Config JSON Parameters ---------------------- Config JSON is not needed for this plugin. Example Usage ------------- .. code-block:: :linenos: simaaiencoder enc-width=1280 enc-height=720 enc-bitrate=4000 name=simaaiencoder1 ignore-caps-event=true enc-fmt=YUV420P ``gst-inspect-1.0`` Output --------------------------- .. code-block:: :linenos: Factory Details: Rank primary (256) Long-name SiMa.AI Encoder Plugin Klass Encoder Description Video Encoder Author Pawan Kumar Plugin Details: Name simaaiencoder Description GStreamer SiMa.ai Encoder Plugin Filename ./libgstsimaaiencoder.so Version 1.18.16 License LGPL Source module simaai-soc-pipeline-encoder Binary package GStreamer SiMa.ai Encoder Plug-in Origin URL https://bitbucket.org/sima-ai/simaai-soc-pipeline GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstSimaAiEncoder Pad Templates: SINK template: 'sink' Availability: Always Capabilities: video/x-raw format: { (string)I420, (string)NV12 } SRC template: 'src' Availability: Always Capabilities: video/x-h264 stream-format: byte-stream alignment: au video/x-h265 stream-format: byte-stream alignment: au Element has no clocking capabilities. Element has no URI handling capabilities. Pads: SRC: 'src' Pad Template: 'src' SINK: 'sink' Pad Template: 'sink' Element Properties: config : Config JSON for CM (if given no other config params needed) flags: readable, writable String. Default: "" dump-cnt : No. of encoded frames to dump flags: readable, writable Integer. Range: 0 - 2147483647 Default: 0 dump-path : Path for encode frames to be dumped flags: readable, writable String. Default: "/tmp" enc-bitrate : Bit rate value in Kbps Choose a value in kbps indicative as below -640x480 1000kbps to 2000kbps -1280x720 2500kbps to 4000kbps -1920x1080 5000Kbps to 7000kbps flags: readable, writable Integer. Range: 0 - 2147483647 Default: -1 enc-fmt : i/p fmt either "NV12","YUV420P" flags: readable, writable String. Default: "NV12" enc-frame-rate : Controls the encode quality parameters with framerate flags: readable, writable Integer. Range: 0 - 2147483647 Default: 30 enc-height : Input resolution height flags: readable, writable Integer. Range: 0 - 1080 Default: -1 enc-ip-mode : "async": [Producer and consumer are decoupled in different elements with frame rate control possible and current being consumer] "sync": [Zero copy i/p across preceding producer & present consumer encoder CMA buffers acquired in preceeding to give i/p in NV12 color fmt. Both producer and consumer share same encoder instance handle through unique unique name , passed as "name" or for CM method as "node-name". Zero copy achieved by producer adding custom meta "GstSimaMeta" with custom field "enc-buffer-hndl" being actual encoder input buffer. Specific encoder C++ apis available for the SYNC mode method] flags: readable, writable String. Default: "async" enc-level : 4.0, 4.1, 4.2, 5.0, 5.1, 5.2 1920x1080: <= 30fps choose 4.0 >30fps-60fps choose 4.2 >60fps-90fps choose 5.1 1280x720: <= 60fps choose 4.0 >60fps choose 4.2 640x480: choose 4.0 if still incorrect,level is adjusted by encoder for ASYNC mode flags: readable, writable String. Default: "4.0" enc-profile : H.264(baseline,main,high) & H265(main) flags: readable, writable String. Default: "main" enc-type : Either h264 or h265 flags: readable, writable String. Default: "h264" enc-width : Input resolution width flags: readable, writable Integer. Range: 0 - 1920 Default: -1 ignore-caps-event : Ignore caps negotiate if prev plugin sends wrong flags: readable, writable Boolean. Default: false ip-cache-inval : i/p mapped as cached need invalidate,custom meta having sima-mem-ptr flags: readable, writable Boolean. Default: false ip-queue-max-buffers: High water mark for input queue ,if > then it blocks flags: readable, writable Integer. Range: 0 - 2147483647 Default: 30 ip-queue-min-buffers: Low water mark for input queue flags: readable, writable Integer. Range: 0 - 2147483647 Default: 15 ip-rate-ctrl : Only if source is not rate controlled like YUV filesrc flags: readable, writable Boolean. Default: false name : The name of the object flags: readable, writable, 0x2000 String. Default: "simaaiencoder0" node-name : As in json for matching it for CM flags: readable, writable String. Default: "" parent : The parent of the object flags: readable, writable, 0x2000 Object of type "GstObject" .. note:: Please refer to |plugin|'s README file for more information. .. |plugin| replace:: simaaiencoder .. |plugin_highlighted| replace:: ``simaaiencoder``