Video Codec Performance
The C3V platform features a hardware video codec, supporting V4L2 and OpenMax framework. Below are the support and performance details.
Interface and Codec Support
Encode | FW Support | Input | Output | Resolution@FPS | Multi-Stream | Media FW Support |
---|---|---|---|---|---|---|
V4L2 | NV12 NV21 I420 YUY2 UYVY | H.264 | FHD@60 | Support | GStreamer-1.22.9 GStreamer-1.24.2 FFmepg-4.4.4 FFmpeg-6.1.1 | |
MJPEG | 4K@12 | Support | ||||
VP8 | FHD@60 | Support | ||||
OpenMax | H.264 | FHD@60 | Unsupport | GStreamer-1.20.1 | ||
Decode | V4L2 | H.264 | NV12 | FHD@90 | Support | GStreamer-1.22.9 GStreamer-1.24.2 FFmepg-4.4.4 FFmpeg-6.1.1 |
MJPEG | NV12 NV16 | 4K@20 | Support | |||
OpenMax | H.264 | NV12 | FHD@90 | Support | GStreamer-1.20.1 |
Video Codec Performance with V4L2 Framework
Format | Codec | Resolution (W x H) | Number of Streams | Average FPS |
---|---|---|---|---|
H.264 | Encode | FHD (1920 x 1080) | 1 | 60 |
2 | 30 | |||
3 | 20 | |||
HD (1280 x 720) | 1 | 120 | ||
2 | 60 | |||
3 | 40 | |||
Decode | FHD (1920 x 1080) | 1 | FFmpeg: 120 GStreamer: 60 | |
2 | FFmpeg: 60 GStreamer: 30 | |||
3 | FFmpeg: 40 GStreamer: 20 | |||
HD (1280 x 720) | 1 | FFmpeg: 140 GStreamer: 120 | ||
MJPEG | Encode | 4K (3280 x 2160) | 1 | 12 |
2K (2560 x 1440) | 1 | 25 | ||
FHD (1920 x 1080) | 1 | 45 | ||
HD (1280 x 720) | 1 | 90 | ||
Decode | 4K (3280 x 2160) | 1 | 20 | |
2K (2560 x 1440) | 1 | 90 | ||
FHD (1920 x 1080) | 1 | 145 | ||
HD (1280 x 720) | 1 | 280 | ||
VP8 | Encode | FHD (1920 x 1080) | 1 | 60 |
Video Codec Performance with OpenMax Framework
Format | Encode/Decode | Resolution (W x H) | Number of Streams | Average FPS |
---|---|---|---|---|
H.264 | Encode | FHD (1920 x 1080) | 1 | 60 |
HD (1280 x 720) | 1 | 80 | ||
Decode | FHD (1920 x 1080) | 1 | 90 | |
2 | 60 | |||
3 | 30 | |||
HD (1280 x 720) | 1 | 180 |
Note: The data provided is based on measured performance and is intended for reference only. Actual performance may vary due to environmental factors.
Compared to FFmpeg, the GStreamer has an extra copying step when handling the YUV decoding buffer, so it will be slower.
Test Sample flow
Get 1080P YUV 300 frames
gst-launch-1.0 -v videotestsrc num-buffers=300 ! video/x-raw,width=1920,height=1080,framerate=30/1,format=NV12 ! filesink location=/tmp/1080p.yuv
GStreamer H264 encode 1080P stream 300 frames
# gst-launch-1.0 filesrc location=/tmp/1080p.yuv ! rawvideoparse width=1920 height=1080 format=nv12 colorimetry=bt601 framerate=60/1 ! v4l2h264enc ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:04.641600600
Setting pipeline to NULL ...
Freeing pipeline ...
GStreamer H264 decode 1080P stream 300 frames
# gst-launch-1.0 filesrc location=/tmp/1080p.h264 ! h264parse ! v4l2h264dec ! fakesink
Pipeline is PREROLLING ...
Redistribute latency...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
Got EOS from element "pipeline0".
Execution ended after 0:00:05.808335280
Setting pipeline to NULL ...
Freeing pipeline ...
FFmpeg H264 encode 1080P stream 300 frames
FFmpeg H264 decode 1080P stream 300 frames
GStreamer JPEG encode 1080P stream 300 frames
GStreamer JPEG decode 1080P stream 300 frames