# v4l2h265enc

The v4l2h265enc plugin uses V4L2 APIs for encoding of video stream.

- The plugin uses the H.265 video encoder to provide hardware accelerated H.265 (MPEG-H Part 2) encoding on supported platforms
- The plugin is based on [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 → v4l2h265enc

The following tables provide information on pad templates and element properties of v4l2h265enc. For use cases, see [Video encode and decode](https://docs.qualcomm.com/doc/80-70029-50/topic/camera-and-video-encode.html) and [Slice-based encoding](https://docs.qualcomm.com/doc/80-70029-50/topic/camera-and-video-encode.html#slice-based-encoding).

## Pad configuration

| Pad Name | Capabilities | Capabilities | Capabilities |
| --- | --- | --- | --- |
| <br>SINK template: 'sink'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  sink</p></li><br>> </ul> | video/x-raw | format: | { (string)NV12, (string)NV21 } |
| <br>SINK template: 'sink'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  sink</p></li><br>> </ul> | video/x-raw | width: | [ 1, 32768 ] |
| <br>SINK template: 'sink'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  sink</p></li><br>> </ul> | video/x-raw | height: | [ 1, 32768 ] |
| <br>SINK template: 'sink'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  sink</p></li><br>> </ul> | video/x-raw | framerate: | [ 0/1, 2147483647/1 ] |
| <br>SRC template: 'src'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  source</p></li><br>> </ul> | video/x-h265 | alignment: | au |
| <br>SRC template: 'src'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  source</p></li><br>> </ul> | video/x-h265 | stream-format: | byte-stream |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |

## Element configuration

Table : Element properties of v4l2h265enc

| Property | Description |
| --- | --- |
| capture-io-mode | - Capture I/O mode (matches src pad).<br>    - <ul><br><li><p>flags: readable, writable</p></li><br><li><p>Enum "GstV4l2IOMode" Default: 0, "auto"</p><br><blockquote><br><div><ul class="simple"><br><li><p>(0): auto - GST_V4L2_IO_AUTO</p></li><br><li><p>(1): rw - GST_V4L2_IO_RW</p></li><br><li><p>(2): mmap - GST_V4L2_IO_MMAP</p></li><br><li><p>(3): userptr - GST_V4L2_IO_USERPTR</p></li><br><li><p>(4): dmabuf - GST_V4L2_IO_DMABUF</p></li><br><li><p>(5): dmabuf-import - GST_V4L2_IO_DMABUF_IMPORT</p></li><br></ul><br></div></blockquote><br></li><br></ul> |
| device | - The device location.<br>    - <ul class="simple"><br><li><p>flags: readable</p></li><br><li><p>String. Default: "/dev/video1"</p></li><br></ul> |
| device-fd | - The file descriptor of the device.<br>    - <ul class="simple"><br><li><p>flags: readable</p></li><br><li><p>Integer. Range: ˗1 to 2147483647, default: ˗1</p></li><br></ul> |
| device-name | - The name of the device.<br>    - <ul class="simple"><br><li><p>flags: readable</p></li><br><li><p>String. Default: null</p></li><br></ul> |
| extra-controls | - The extra v4l2 controls (CIDs) for the device.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Boxed pointer of type "GstStructure"</p></li><br></ul> |
| min-force-key-unit-interval | - The minimum interval between force-key-unit requests in nanoseconds.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0</p></li><br></ul> |
| name | - The name of the object.<br>    - <ul class="simple"><br><li><p>flags: readable, writable, 0x2000</p></li><br><li><p>String. Default: "v4l2h265enc0"</p></li><br></ul> |
| output-io-mode | - The output side I/O mode (matches sink pad).<br>    - <ul><br><li><p>flags: readable, writable</p></li><br><li><p>Enum "GstV4l2IOMode" Default: 0, "auto"</p><br><blockquote><br><div><ul class="simple"><br><li><p>(0): auto - GST_V4L2_IO_AUTO</p></li><br><li><p>(1): rw - GST_V4L2_IO_RW</p></li><br><li><p>(2): mmap - GST_V4L2_IO_MMAP</p></li><br><li><p>(3): userptr - GST_V4L2_IO_USERPTR</p></li><br><li><p>(4): dmabuf - GST_V4L2_IO_DMABUF</p></li><br><li><p>(5): dmabuf-import - GST_V4L2_IO_DMABUF_IMPORT</p></li><br></ul><br></div></blockquote><br></li><br></ul> |
| parent | - The parent of the object.<br>    - <ul class="simple"><br><li><p>flags: readable, writable, 0x2000</p></li><br><li><p>Object of type "GstObject"</p></li><br></ul> |
| qos | - Handle quality-of-service events from downstream.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Boolean. Default: true</p></li><br></ul> |

The following table lists the codec controls for H.265. For the general v4l2ctl user and codec controls, see [Table : v4l2ctl extra-controls–user controls](https://docs.qualcomm.com/doc/80-70029-50/topic/v4l2h264enc.html#section-ibv-jrz-q1c) and [Table : v4l2ctl extra-controls–codec controls](https://docs.qualcomm.com/doc/80-70029-50/topic/v4l2h264enc.html#section-ibn-jrz-q1c).

Table : v4l2ctl–H.265 codec controls

| Control name | Control type | Parameters |
| --- | --- | --- |
| hevc\_minimum\_qp\_value | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=51</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=1; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_maximum\_qp\_value | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=51</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=51; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_i\_frame\_qp\_value | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=51</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=20; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_p\_frame\_qp\_value | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=51</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=20; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_b\_frame\_qp\_value | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=51</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=20; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_hierarchical\_coding\_type | Menu | <ul class="simple"><br><li><p>min=0</p></li><br></ul><br><br><br>> <br>> <br>> <ul><br>> <li><p>max=1</p></li><br>> <li><p>value=1 (P)</p><br>> <blockquote><br>> <div><ul class="simple"><br>> <li><p>0: B</p></li><br>> <li><p>1: P; this is the default value</p></li><br>> </ul><br>> </div></blockquote><br>> </li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_hierarchical\_coding\_layer | Integer | <ul class="simple"><br><li><p>min=0</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=5</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=0; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_profile | Menu | <ul class="simple"><br><li><p>min=0</p></li><br></ul><br><br><br>> <br>> <br>> <ul><br>> <li><p>max=2</p></li><br>> <li><p>default=0</p></li><br>> <li><p>value=0 (Main)</p><br>> <blockquote><br>> <div><ul class="simple"><br>> <li><p>0: Main; this is the default value</p></li><br>> <li><p>1: Main Still Picture</p></li><br>> <li><p>2: Main 10</p></li><br>> </ul><br>> </div></blockquote><br>> </li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_level | Menu | <ul class="simple"><br><li><p>min=0</p></li><br></ul><br><br><br>> <br>> <br>> <ul><br>> <li><p>max=7</p></li><br>> <li><p>value=7 (5)</p><br>> <blockquote><br>> <div><ul class="simple"><br>> <li><p>0: 1</p></li><br>> <li><p>1: 2</p></li><br>> <li><p>2: 2.1</p></li><br>> <li><p>3: 3</p></li><br>> <li><p>4: 3.1</p></li><br>> <li><p>5: 4</p></li><br>> <li><p>6: 4.1</p></li><br>> <li><p>7: 5; this is the default value</p></li><br>> </ul><br>> </div></blockquote><br>> </li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_hierarchical\_lay\_0\_bitrate | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=100000000</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=20000000; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_hierarchical\_lay\_1\_bitrate | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=100000000</p></li><br>> <li><p>step=1</p></li><br>> <li><p>default=20000000; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_hierarchical\_lay\_2\_bitrate | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=100000000</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=20000000; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_hierarchical\_lay\_3\_bitrate | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=100000000</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=20000000; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_hierarchical\_lay\_4\_bitrate | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=100000000</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=20000000; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_hierarchical\_lay\_5\_bitrate | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=100000000</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=20000000; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_i\_frame\_minimum\_qp\_value | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=51</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=1; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_i\_frame\_maximum\_qp\_value | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=51</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=51; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_p\_frame\_minimum\_qp\_value | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=51</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=1; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_p\_frame\_maximum\_qp\_value | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=51</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=51; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_b\_frame\_minimum\_qp\_value | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=51</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=1; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |
| hevc\_b\_frame\_maximum\_qp\_value | Integer | <ul class="simple"><br><li><p>min=1</p></li><br></ul><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p>max=51</p></li><br>> <li><p>step=1</p></li><br>> <li><p>value=51; this is the default value</p></li><br>> <li><p>flags=execute-on-write</p></li><br>> </ul> |

Last Published: Jun 03, 2026

[Previous Topic
v4l2h264enc](https://docs.qualcomm.com/bundle/publicresource/80-70029-50/topics/v4l2h264enc.md) [Next Topic
v4l2vp9dec](https://docs.qualcomm.com/bundle/publicresource/80-70029-50/topics/v4l2vp9dec.md)

Source: [https://docs.qualcomm.com/doc/80-70029-50/topic/v4l2h265enc.html](https://docs.qualcomm.com/doc/80-70029-50/topic/v4l2h265enc.html)