# v4l2h264enc
The v4l2h264enc plugin uses the V4L2 APIs to encode the video stream.
- The plugin uses the H.264 video encoder to provide hardware accelerated H.264 (MPEG-4 Part 10) encoding on supported platforms.
- The plugin is based on the [GstVideoEncoder](https://gstreamer.freedesktop.org/documentation/video/gstvideoencoder.html?gi-language=c) base class.
## Inheritance chain
[GObject](https://docs.gtk.org/gobject/) → [GstObject](https://gstreamer.freedesktop.org/documentation/gstreamer/gstobject.html?gi-language=c) → [GstElement](https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c) → [GstVideoEncoder](https://gstreamer.freedesktop.org/documentation/video/gstvideoencoder.html?gi-language=c) → GstV4l2VideoEnc → v4l2h264enc
The following tables provide information on pad templates and element properties of v4l2h264enc. For use cases, see [Video encode and decode](https://docs.qualcomm.com/doc/80-80021-50/topic/camera-and-video-encode.html) and [Slice-based encoding](https://docs.qualcomm.com/doc/80-80021-50/topic/camera-and-video-encode.html#slice-based-encoding).
## Pad configuration
| Pad Name | Capabilities | Capabilities | Capabilities |
| --- | --- | --- | --- |
|
SINK template: 'sink'
>
>
>
Availability: Always
Direction: sink
Availability: Always
Direction: sink
Availability: Always
Direction: sink
Availability: Always
Direction: sink
Availability: Always
Direction: source
Availability: Always
Direction: source
Availability: Always
Direction: source
Availability: Always
Direction: source
flags: readable, writable
Enum "GstV4l2IOMode"; default: 0, "auto"
(0): auto - GST_V4L2_IO_AUTO
(1): rw - GST_V4L2_IO_RW
(2): mmap - GST_V4L2_IO_MMAP
(3): userptr - GST_V4L2_IO_USERPTR
(4): dmabuf - GST_V4L2_IO_DMABUF
(5): dmabuf-import - GST_V4L2_IO_DMABUF_IMPORT
flags: readable
String. Default: "/dev/video1"
flags: readable
Integer. Range: ˗1 to 2147483647, default: ˗1
flags: readable
String. Default: null
flags: readable, writable
Boxed pointer of type "GstStructure"
flags: readable, writable
Unsigned Integer 64
Range: 0 - 18446744073709551615; default: 0
flags: readable, writable, 0x2000
String. Default: "v4l2h264enc0"
flags: readable, writable
Enum "GstV4l2IOMode" Default: 0, "auto"
(0): auto - GST_V4L2_IO_AUTO
(1): rw - GST_V4L2_IO_RW
(2): mmap - GST_V4L2_IO_MMAP
(3): userptr - GST_V4L2_IO_USERPTR
(4): dmabuf - GST_V4L2_IO_DMABUF
(5): dmabuf-import - GST_V4L2_IO_DMABUF_IMPORT
flags: readable, writable, 0x2000
Object of type "GstObject"
flags: readable, writable
Boolean. Default: true
value=0; this is the default value
flags=execute-on-write
value=0; this is the default value
flags= execute-on-write
min=0
max=270
step=90
value=0; this is the default value
flags=execute-on-write and modify-layout
min=0
max=7
step=1
>
>value=0; this is the default value
>flags=update and execute-on-write
>
>
min=0
max=2147483647
step=1
value=59; this is the default value
flags=execute-on-write
min=0
max=3
value=0: Variable Bitrate
>
>0: Variable Bitrate; this is the default value
>1: Constant Bitrate
>3: Maximum Bitrate
>
>
flags=update, execute-on-write
min=1
max=100000000
step=1
value=20000000
flags=execute-on-write
value=1; this is the default value
flags=execute-on-write
min=512
max=12500000
step=1
value=512; this is the default value
flags=execute-on-write
min=1
max=36864
step=1
value=1; this is the default value
flags=execute-on-write
min=0
max=2
value=0:Single
>
>0: Single; this is the default value
>1: Max macro blocks
>2: Max Bytes
>
>
flags=execute-on-write
min=0
max=2
step=1
value=0; this is the default value
flags=execute-on-write
min=-1
max=1
step=1
value=-1; this is the default value
flags=execute-on-write
max=0x00000003
default=0x00000000
value=0
flags=execute-on-write
min=0
max=2147483647
step=1
value=0; this is the default value
flags=execute-on-write
min=0
max=1
value=0
>
>0: Random; this is the default value
>1: Cyclic
>
>
flags=execute-on-write
min=1
max=51
step=1
value=20; this is the default value
flags=execute-on-write
min=1
max=51
step=1
value=20; this is the default value
flags=execute-on-write
min=1
max=51
step=1
value=20; this is the default value
flags=execute-on-write
min=1
max=51
step=1
value=1; this is the default value
flags=execute-on-write
min=1
max=51
step=1
value=51; this is the default value
flags=execute-on-write
min=0
max=1
value=1 (CABAC)
>
>0: CAVLC
>1: CABAC; this is the default value
>
>
flags=execute-on-write
min=0
max=15
value=15 (5.1)
>
>0: 1
>1: 1b
>2: 1.1
>3: 1.2
>4: 1.3
>5: 2
>6: 2.1
>7: 2.2
>8: 3
>9: 3.1
>10: 3.2
>11: 4
>12: 4.1
>13: 4.2
>14: 5
>15: 5.1; this is the default value
>
>
flags=execute-on-write
min=0
max=17
value=4 (High)
>
>0: Baseline
>1: Constrained Baseline
>2: Main
>4: High; this is the default value
>17: Constrained High
>
>
flags=execute-on-write
min=0
max=1
step=1
value=0; this is the default value
flags=execute-on-write
min=0
max=1
value =1
>
>0: Hier Coding B
>1: Hier Coding P; this is the default value
>
>
flags=execute-on-write
min=0
max=5
step=1
value=0; this is the default value
flags=execute-on-write
min=1
max=51
step=1
value=1; this is the default value
flags=execute-on-write
min=1
max=51
step=1
value=51; this is the default value
flags=execute-on-write
min=1
max=51
step=1
value=1; this is the default value
flags=execute-on-write
min=1
max=51
step=1
value=51; this is the default value
flags=execute-on-write
min=1
max=51
step=1
value=1; this is the default value
flags=execute-on-write
min=1
max=51
step=1
value=51; this is the default value
flags=execute-on-write
min=1
max=100000000
step=1
value=20000000; this is the default value
flags=execute-on-write
min=1
max=100000000
step=1
value=20000000; this is the default value
flags=execute-on-write
min=1
max=100000000
step=1
value=20000000; this is the default value
flags=execute-on-write
min=1
max=100000000
step=1
value=20000000; this is the default value
flags=execute-on-write
min=1
max=100000000
step=1
value=20000000; this is the default value
flags=execute-on-write
min=1
max=100000000
step=1
value=20000000; this is the default value
flags=execute-on-write