# v4l2h265dec

The v4l2h265dec plugin uses the V4L2 APIs to decode the video stream.

- The plugin uses the H.265 video decoder to provide hardware accelerated H.265 (MPEG-H Part 2) decoding on supported platforms.
- The plugin is based on the [GstVideoDecoder](https://gstreamer.freedesktop.org/documentation/video/gstvideodecoder.html) 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) → [GstVideoDecoder](https://gstreamer.freedesktop.org/documentation/video/gstvideodecoder.html) → GstV4l2VideoDec → v4l2h265dec

The following tables provide information on pad templates and element properties of v4l2h265dec. For use cases, see Video playback use cases.

## Pad configuration

Table : Pad templates for v4l2h265dec

| 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-h265 | alignment: | au |
| stream-format: | byte-stream |
| <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-raw | format: | { (string)NV12, (string)NV21 } |
| width: | [ 1, 32768 ] |
| height: | [ 1, 32768 ] |
| framerate: | [ 0/1, 2147483647/1 ] |

## Element configuration

Note

For the current release, in the read-write properties, only **capture-io-mode** and **output-io-mode** are supported, and they’re supported only with **(5): dmabuf-import - GST\_V4L2\_IO\_DMABUF\_IMPORT** property.

Table : Element properties of v4l2h265dec

| Property | Description |
| --- | --- |
| automatic-request-sync-point-flags: | - Flags to use when automatically requesting sync points.<br>    - <ul><br><li><p>flags: readable, writable</p></li><br><li><p>Flags &quot;GstVideoDecoderRequestSyncPointFlags&quot; Default: 0x00000003, &quot;corrupt-output+discard-input&quot;</p><br><blockquote><br><div><ul class="simple"><br><li><p>(0x00000001): discard-input - GST_VIDEO_DECODER_REQUEST_SYNC_POINT_DISCARD_INPUT</p></li><br><li><p>(0x00000002): corrupt-output - GST_VIDEO_DECODER_REQUEST_SYNC_POINT_CORRUPT_OUTPUT</p></li><br></ul><br></div></blockquote><br></li><br></ul> |
| automatic-request-sync-points | - Automatically request sync points when required.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Boolean. Default: false</p></li><br></ul> |
| capture-io-mode | - Capture I/O mode (matches src pad).<br>    - <ul><br><li><p>flags: readable, writable</p></li><br><li><p>Enum &quot;GstV4l2IOMode&quot; Default: 0, &quot;auto&quot;</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 | - Device location.<br>    - <ul class="simple"><br><li><p>flags: readable</p></li><br><li><p>String. Default: &quot;/dev/video0&quot;</p></li><br></ul> |
| device-fd | - 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 | - 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> |
| discard-corrupted-frames | - Discard frames marked as corrupted instead of processed them as the output.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Boolean. Default: false</p></li><br></ul> |
| extra-controls | - 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 &quot;GstStructure&quot;</p></li><br></ul> |
| max-errors | - Maximum consecutive decoder errors before returning a flow error.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Integer. Range: ˗1 to 2147483647, default: 10</p></li><br></ul> |
| min-force-key-unit-interval | - 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 to 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: &quot;v4l2h265dec0&quot;</p></li><br></ul> |
| output-io-mode | - Output side I/O mode (matches sink pad).<br>    - <ul><br><li><p>flags: readable, writable</p></li><br><li><p>Enum &quot;GstV4l2IOMode&quot; Default: 0, &quot;auto&quot;</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 &quot;GstObject&quot;</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> |

Last Published: May 14, 2026

Previous Topic
 
v4l2h264dec Next Topic

v4l2h264enc