simaaiencoder
This section describes the GStreamer plugin named simaaiencoder.
Description
This plugin is used for encoding the outgoing stream using Allegro Encoder
.

Config JSON Parameters
Config JSON is not needed for this plugin.
Example Usage
1simaaiencoder enc-width=1280 enc-height=720 enc-bitrate=4000 name=simaaiencoder1 ignore-caps-event=true enc-fmt=YUV420P
gst-inspect-1.0
Output
1Factory Details:
2Rank primary (256)
3Long-name SiMa.AI Encoder Plugin
4Klass Encoder
5Description Video Encoder
6Author Pawan Kumar <pawankumar.ts@sima.ai>
7
8Plugin Details:
9Name simaaiencoder
10Description GStreamer SiMa.ai Encoder Plugin
11Filename ./libgstsimaaiencoder.so
12Version 1.18.16
13License LGPL
14Source module simaai-soc-pipeline-encoder
15Binary package GStreamer SiMa.ai Encoder Plug-in
16Origin URL https://bitbucket.org/sima-ai/simaai-soc-pipeline
17
18GObject
19+----GInitiallyUnowned
20 +----GstObject
21 +----GstElement
22 +----GstSimaAiEncoder
23
24Pad Templates:
25SINK template: 'sink'
26 Availability: Always
27 Capabilities:
28 video/x-raw
29 format: { (string)I420, (string)NV12 }
30
31SRC template: 'src'
32 Availability: Always
33 Capabilities:
34 video/x-h264
35 stream-format: byte-stream
36 alignment: au
37 video/x-h265
38 stream-format: byte-stream
39 alignment: au
40
41Element has no clocking capabilities.
42Element has no URI handling capabilities.
43
44Pads:
45SRC: 'src'
46 Pad Template: 'src'
47SINK: 'sink'
48 Pad Template: 'sink'
49
50Element Properties:
51config : Config JSON for CM (if given no other config params needed)
52 flags: readable, writable
53 String. Default: ""
54dump-cnt : No. of encoded frames to dump
55 flags: readable, writable
56 Integer. Range: 0 - 2147483647 Default: 0
57dump-path : Path for encode frames to be dumped
58 flags: readable, writable
59 String. Default: "/tmp"
60enc-bitrate : Bit rate value in Kbps
61 Choose a value in kbps indicative as below
62 -640x480 1000kbps to 2000kbps
63 -1280x720 2500kbps to 4000kbps
64 -1920x1080 5000Kbps to 7000kbps
65 flags: readable, writable
66 Integer. Range: 0 - 2147483647 Default: -1
67enc-fmt : i/p fmt either "NV12","YUV420P"
68 flags: readable, writable
69 String. Default: "NV12"
70enc-frame-rate : Controls the encode quality parameters with framerate
71 flags: readable, writable
72 Integer. Range: 0 - 2147483647 Default: 30
73enc-height : Input resolution height
74 flags: readable, writable
75 Integer. Range: 0 - 1080 Default: -1
76enc-ip-mode : "async": [Producer and consumer are decoupled in different elements with
77 frame rate control possible and current being consumer]
78 "sync": [Zero copy i/p across preceding producer & present consumer
79 encoder CMA buffers acquired in preceeding to give i/p in NV12 color fmt.
80 Both producer and consumer share same encoder instance handle through unique
81 unique name , passed as "name" or for CM method as "node-name". Zero copy
82 achieved by producer adding custom meta "GstSimaMeta" with custom field
83 "enc-buffer-hndl" being actual encoder input buffer.
84 Specific encoder C++ apis available for the SYNC mode method]
85 flags: readable, writable
86 String. Default: "async"
87enc-level : 4.0, 4.1, 4.2, 5.0, 5.1, 5.2
88 1920x1080:
89 <= 30fps choose 4.0
90 >30fps-60fps choose 4.2
91 >60fps-90fps choose 5.1
92 1280x720:
93 <= 60fps choose 4.0
94 >60fps choose 4.2
95 640x480:
96 choose 4.0
97 if still incorrect,level is adjusted by encoder for ASYNC mode
98 flags: readable, writable
99 String. Default: "4.0"
100enc-profile : H.264(baseline,main,high) & H265(main)
101 flags: readable, writable
102 String. Default: "main"
103enc-type : Either h264 or h265
104 flags: readable, writable
105 String. Default: "h264"
106enc-width : Input resolution width
107 flags: readable, writable
108 Integer. Range: 0 - 1920 Default: -1
109ignore-caps-event : Ignore caps negotiate if prev plugin sends wrong
110 flags: readable, writable
111 Boolean. Default: false
112ip-cache-inval : i/p mapped as cached need invalidate,custom meta having sima-mem-ptr
113 flags: readable, writable
114 Boolean. Default: false
115ip-queue-max-buffers: High water mark for input queue ,if > then it blocks
116 flags: readable, writable
117 Integer. Range: 0 - 2147483647 Default: 30
118ip-queue-min-buffers: Low water mark for input queue
119 flags: readable, writable
120 Integer. Range: 0 - 2147483647 Default: 15
121ip-rate-ctrl : Only if source is not rate controlled like YUV filesrc
122 flags: readable, writable
123 Boolean. Default: false
124name : The name of the object
125 flags: readable, writable, 0x2000
126 String. Default: "simaaiencoder0"
127node-name : As in json for matching it for CM
128 flags: readable, writable
129 String. Default: ""
130parent : The parent of the object
131 flags: readable, writable, 0x2000
132 Object of type "GstObject"
Note
Please refer to simaaiencoder’s README file for more information.