/
Video Codec Features and Performance

Video Codec Features and Performance

The C3V platform features a hardware video codec, supporting V4L2 and OpenMax framework. Below are the support and performance details.

Framework and Codec Support

Feature

FW Support

Input

Output

Resolution@FPS

Multi-Stream

Media FW Support

Feature

FW Support

Input

Output

Resolution@FPS

Multi-Stream

Media FW Support

Encode

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

Feature

Resolution (W x H)

Number of Streams

Average FPS

Format

Feature

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

Feature

Resolution (W x H)

Number of Streams

Average FPS

Format

Feature

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

Video Codec H264 Bitrate Performance with Snow Pattern(CBRC on level 4.1)

Input source: GStreamer videotestsrc pattern=snow.

Calculation method: bitrate = h264_file_size * 8 / duration

 

Target Bitrate(bit/s)

Actual Bitrate(bit/s)

 

Target Bitrate(bit/s)

Actual Bitrate(bit/s)

1920x1080@30fps

GOP=60

90,000,000

60,000,000

50,000,000

50,000,000

10,000,000

10,000,000

5,000,000

6,000,000

1,000,000

4,5000,000

320x240@30fps

GOP=15

5,000,000

5,000,000

2,000,000

2,000,000

1,000,000

1,000,000

500,000

500,000

100,000

190,000

Video Codec H264 Bitrate Performance with Sample Video(CBRC on level 4.1)

Test Sequences: https://pi4.informatik.uni-mannheim.de/~kiess/test_sequences/download/

Calculation method: bitrate = h264_file_size * 8 / duration

1920x1080@30fps

GOP=60

Target Bitrate(bit/s)

1,000,000

Target Bitrate(bit/s)

5,000,000

1920x1080@30fps

GOP=60

Target Bitrate(bit/s)

1,000,000

Target Bitrate(bit/s)

5,000,000

big_buck_bunny_scene.mp4.yuv

1,020,732

5,094,115

flamingo.mp4.yuv

1,017,702

5,073,680

highway.mp4.yuv

1,038,313

5,099,442

meerkat.mp4.yuv

1,078,578

5,204,384

train.mp4.yuv

1,264,280

5,039,151

walking.mp4.yuv

1,026,721

5,085,693

 

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

  1. 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
  1. 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 ...
  1. 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 ...
  1. FFmpeg H264 encode 1080P stream 300 frames

# ffmpeg -benchmark -y -pix_fmt nv12 -s 1920x1080 -i /tmp/1080p.yuv -vcodec h264_v4l2m2m -vframes 300 -f null - ...... frame= 300 fps= 65 q=-0.0 Lsize=N/A time=00:00:12.00 bitrate=N/A speed= 2.6x video:733kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown bench: utime=0.663s stime=1.422s rtime=4.620s bench: maxrss=19632kB
  1. FFmpeg H264 decode 1080P stream 300 frames

ffmpeg -benchmark -y -vcodec h264_v4l2m2m -i /tmp/1080p.h264 -vframes 300 -f null - ...... frame= 300 fps=117 q=-0.0 Lsize=N/A time=00:00:00.01 bitrate=N/A speed=0.00649x video:157kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown bench: utime=0.016s stime=0.126s rtime=2.608s bench: maxrss=27532kB
  1. GStreamer JPEG 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 ! v4l2jpegenc ! 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.092821840 Setting pipeline to NULL ... Freeing pipeline ...
  1. GStreamer JPEG decode 1080P stream 300 frames

# gst-launch-1.0 filesrc location=/tmp/1080p.jpg ! jpegparse ! v4l2jpegdec ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... Redistribute latency... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 0:00:02.041467920 Setting pipeline to NULL ... Freeing pipeline ...

Related content