Carrier Boards
The NXP i.MX95 Technical Guide documentation from RidgeRun is presently being developed. |
Introduction
The i.MX95 includes a Video Processing Unit (VPU) that provides hardware-accelerated video encoding and decoding for selected codecs. On this platform, the VPU is exposed through the standard Video4Linux2 (V4L2) interface rather than through a dedicated user-space VPU library.
This is an important difference compared to other i.MX families. While other platforms may expose SoC-specific VPU libraries, the i.MX95 follows the approach where the VPU is controlled through V4L2-compliant interfaces and is typically used from multimedia frameworks such as GStreamer.
GStreamer Integration
For i.MX95, the VPU is typically accessed through V4L2-based GStreamer plugins.
The hardware encoder plugins explicitly documented for i.MX95 are:
v4l2h264enc: VPU-based AVC/H.264 encoderv4l2h265enc: VPU-based HEVC/H.265 encoder
VPU-backed decoding is also possible through V4L2 decoder elements such as v4l2h264dec.
Supported Video Codec Capabilities
The following table summarizes the i.MX95 VPU codec capabilities taken from NXP documentation.
| Function | Codec | Profile | Max Bit Rate | Min Resolution | Max Resolution | Maximum Frame Rate | Portrait Mode | Notes |
|---|---|---|---|---|---|---|---|---|
| Decode | HEVC | Main | 100 Mbps | 64 x 64 | 4096 x 2304 | 60 fps at 3840 x 2160 | Yes | - |
| Decode | H.264 | HP / MP / BP | 50 Mbps | 64 x 64 | 4096 x 2304 | 60 fps at 3840 x 2160 | Yes | - |
| Decode | MJPEG | - | - | 64 x 64 | 4096 x 2160 | 30 fps at 3840 x 2160 | Yes | 400 MSample/s; maximum JPEG image resolution is 8192 x 8192 |
| Encode | H.264 | HP / MP / BP | 20 Mbps | 256 x 128 | 4096 x 2304 | 60 fps at 3840 x 2160 | No | - |
| Encode | H.265 | Main | - | 256 x 128 | 4096 x 2304 | 60 fps at 3840 x 2160 | No | - |
| Encode | MJPEG | - | - | 64 x 64 | 4096 x 2160 | 15 fps at 3840 x 2160 | Yes | Maximum JPEG image resolution is 8192 x 8192 |
Typical Usage on i.MX95
Video Encoding from Raw Frames
For raw video input, the user guide recommends the following structure for i.MX95:
gst-launch-1.0 filesrc location=test.yuyv ! rawvideoparse format=2 width=1920 height=1080 framerate=30/1 colorimetry=bt601 ! v4l2h264enc ! h264parse ! qtmux ! filesink location=output.mp4
For HEVC/H.265:
gst-launch-1.0 filesrc location=test.yuyv ! rawvideoparse format=2 width=1920 height=1080 framerate=30/1 colorimetry=bt601 ! v4l2h265enc ! h265parse ! qtmux ! filesink location=output.mp4
The same encoded stream can also be written to other container formats by replacing the muxer, for example:
qtmuxfor MP4/MOVmatroskamuxfor MKVmpegtsmuxfor TS
Hardware-Accelerated Decode and Display
For H.264 content in MP4 format:
gst-launch-1.0 filesrc location=input.mp4 \ ! qtdemux ! h264parse ! v4l2h264dec ! waylandsink
Decode with Downscaling
The user guide provides a VPU-assisted downscaling example for i.MX95, converting a 1920x1080 H.264 stream to 720x480. On systems without aiurdemux, the equivalent MP4 pipeline uses qtdemux:
gst-launch-1.0 filesrc location=1080p.mp4 \ ! qtdemux ! h264parse ! v4l2h264dec ! video/x-raw,width=720,height=480 ! waylandsink
H.264 Transcoding
The documented transcoding flow for i.MX95 is based on hardware decode followed by hardware encode. For MP4 input:
gst-launch-1.0 filesrc location=input.mp4 typefind=true \ ! qtdemux ! h264parse ! v4l2h264dec ! queue ! v4l2h264enc ! h264parse \ ! matroskamux ! filesink location=output.mkv
This pipeline shows the intended VPU usage model on i.MX95:
- decode using a V4L2-backed hardware decoder
- re-encode using a V4L2-backed hardware encoder
- insert the appropriate parser before the muxer when required
H.264 Transcoding from MPEG-TS
For a transport stream source, replace the demuxer accordingly:
gst-launch-1.0 filesrc location=input.ts \ ! tsdemux ! h264parse ! v4l2h264dec ! queue ! v4l2h264enc ! h264parse \ ! matroskamux ! filesink location=output.mkv
H.264 Transcoding from Matroska
For MKV input:
gst-launch-1.0 filesrc location=input.mkv \ ! matroskademux ! h264parse ! v4l2h264dec ! queue ! v4l2h264enc ! h264parse \ ! qtmux ! filesink location=output.mp4
Encoding Camera Capture to H.264
When the input is raw video from a V4L2 capture device, the VPU encoder can be used directly:
gst-launch-1.0 v4l2src device=/dev/video3 \ ! video/x-raw,width=1920,height=1080,framerate=30/1 \ ! v4l2h264enc ! h264parse ! qtmux ! filesink location=capture.mp4
For HEVC/H.265:
gst-launch-1.0 v4l2src device=/dev/video3 \ ! video/x-raw,width=1920,height=1080,framerate=30/1 \ ! v4l2h265enc ! h265parse ! qtmux ! filesink location=capture_h265.mp4