Jump to content

Codec Status

From RidgeRun Developer Wiki

Follow us on: YouTube Twitter LinkedIn Email Share this page

Share This Page



Codec Status

Just as the MIPI CSI camera sensor functionality is essential on Jetson platforms, so are the encoders and decoders. Here, the H264 hardware encoder and decoder are exercised with some GStreamer pipelines.

H264 hardware encoder

The nvv4l2h264enc is used to record an MP4 video from the OV5693 MIPI CSI camera live stream. The GStreamer pipeline used is shown below:

gst-launch-1.0 nvarguscamerasrc sensor-mode=0 ! 'video/x-raw(memory:NVMM),width=2592,height=1944,format=NV12,framerate=30/1' ! nvvidconv ! perf ! queue ! nvv4l2h264enc bitrate=8000000 maxperf-enable=true control-rate=0 ! perf ! h264parse ! qtmux ! filesink location=/tmp/ov5693_h264enc1.mp4 -e

The pipeline output is similar to the following:

Setting pipeline to PAUSED ...
Opening in BLOCKING MODE 
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
NvMMLiteOpen : Block : BlockType = 4 
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 2592 x 1944 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 16,000000; Exposure Range min 34000, max 550385000;

GST_ARGUS: 2592 x 1458 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 16,000000; Exposure Range min 34000, max 550385000;

GST_ARGUS: 1280 x 720 FR = 120,000005 fps Duration = 8333333 ; Analog Gain range min 1,000000, max 16,000000; Exposure Range min 22000, max 358733000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 2592 H = 1944 
   seconds to Run    = 0 
   Frame Rate = 29,999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
INFO:
perf: perf0; timestamp: 4:51:22.467486935; bps: 0,000; mean_bps: 0,000; fps: 0,000; mean_fps: 0,000
H264: Profile = 66, Level = 0 
NVMEDIA: Need to set EMC bandwidth : 2872000 
NVMEDIA: Need to set EMC bandwidth : 2872000 
NvVideo: bBlitMode is set to TRUE 
INFO:
perf: perf1; timestamp: 4:51:22.542592757; bps: 0,000; mean_bps: 0,000; fps: 0,000; mean_fps: 0,000
INFO:
perf: perf0; timestamp: 4:51:23.492323353; bps: 7680,000; mean_bps: 0,000; fps: 28,297; mean_fps: 28,297
INFO:
perf: perf1; timestamp: 4:51:23.576525699; bps: 5354256,000; mean_bps: 0,000; fps: 29,983; mean_fps: 29,983
INFO:
perf: perf0; timestamp: 4:51:24.492586366; bps: 15360,000; mean_bps: 15360,000; fps: 29,992; mean_fps: 29,145
INFO:
perf: perf1; timestamp: 4:51:24.610084232; bps: 29438464,000; mean_bps: 29438464,000; fps: 29,993; mean_fps: 29,988

With a tegrastats output similar to the shown below:

sudo tegrastats --readall
[sudo] password for nvidia: 
06-03-2026 15:07:30 RAM 2573/15080MB (lfb 2690x4MB) SWAP 0/7540MB (cached 0MB) CPU [21%@2265,13%@2266,11%@2265,10%@2260,15%@2266,14%@2265,21%@2265,18%@2265] EMC_FREQ 5%@2133 GR3D_FREQ 0%@[1377] NVENC 1075 NVENC1 1075 VIC_FREQ 73%@166 APE 150 AUX@50.5C CPU@53C thermal@51.25C Tboard@50C AO@50C GPU@51C Tdiode@53.5C GPU 1078mW/1078mW CPU 2312mW/2312mW SOC 6624mW/6624mW CV 0mW/0mW VDDRQ 462mW/462mW SYS5V 2338mW/2338mW
06-03-2026 15:07:35 RAM 2575/15080MB (lfb 2690x4MB) SWAP 0/7540MB (cached 0MB) CPU [20%@2265,16%@2265,19%@2264,16%@2265,14%@2263,13%@2264,12%@2265,12%@2265] EMC_FREQ 5%@2133 GR3D_FREQ 0%@[1377] NVENC 1075 NVENC1 1075 VIC_FREQ 73%@166 APE 150 AUX@50.5C CPU@53C thermal@51.55C Tboard@50C AO@50C GPU@51C Tdiode@53.5C GPU 1078mW/1078mW CPU 2158mW/2235mW SOC 6626mW/6625mW CV 0mW/0mW VDDRQ 462mW/462mW SYS5V 3225mW/2781mW
06-03-2026 15:07:41 RAM 2576/15080MB (lfb 2689x4MB) SWAP 0/7540MB (cached 0MB) CPU [22%@2265,14%@2265,13%@2266,12%@2264,12%@2265,21%@2265,11%@2265,9%@2265] EMC_FREQ 5%@2133 GR3D_FREQ 0%@[1377] NVENC 1075 NVENC1 1075 VIC_FREQ 71%@166 APE 150 AUX@50.5C CPU@53C thermal@51.55C Tboard@50C AO@50C GPU@51C Tdiode@53.5C GPU 1078mW/1078mW CPU 2312mW/2260mW SOC 6626mW/6625mW CV -154mW/-51mW VDDRQ 462mW/462mW SYS5V 2338mW/2633mW
06-03-2026 15:07:46 RAM 2532/15080MB (lfb 2691x4MB) SWAP 0/7540MB (cached 0MB) CPU [1%@2266,1%@2259,0%@2265,0%@2265,0%@2266,1%@2265,0%@2265,0%@2265] EMC_FREQ 3%@2133 GR3D_FREQ 0%@[1377] VIC_FREQ 115 APE 150 AUX@49.5C CPU@51C thermal@50.4C Tboard@50C AO@49.5C GPU@50.5C Tdiode@53C GPU 1081mW/1078mW CPU 926mW/1927mW SOC 4015mW/5972mW CV 0mW/-38mW VDDRQ 154mW/385mW SYS5V 2180mW/2520mW
06-03-2026 15:07:51 RAM 2532/15080MB (lfb 2691x4MB) SWAP 0/7540MB (cached 0MB) CPU [0%@2265,0%@2266,0%@2261,0%@2263,0%@2257,0%@2266,0%@2265,0%@2269] EMC_FREQ 0%@2133 GR3D_FREQ 0%@[1377] VIC_FREQ 115 APE 150 AUX@48.5C CPU@50.5C thermal@49.55C Tboard@50C AO@49C GPU@50C Tdiode@52.5C GPU 1081mW/1079mW CPU 927mW/1727mW SOC 2472mW/5272mW CV 0mW/-30mW VDDRQ 154mW/338mW SYS5V 2140mW/2444mW

On the tegrastats output check:

  • NVENC and NVENC1 for encoder frequency usage
  • VIC_FREQ for resource percentage and frequency usage
  • RAM for RAM usage changes.

Hardware decoder

The MP4 video recorded in the previous section can be used for exercising the nvv4l2decoder hardware decoder with the following GStreamer pipeline:

gst-launch-1.0 -e filesrc location=/tmp/ov5693_h264enc1.mp4 ! qtdemux ! h264parse ! "video/x-h264,stream-format=byte-stream,alignment=au" ! nvv4l2decoder ! perf ! queue ! nvvidconv ! "video/x-raw(memory:NVMM),width=3840,height=1440" ! nvvidconv ! perf ! xvimagesink

The pipeline expected output:

Setting pipeline to PAUSED ...
Opening in BLOCKING MODE 
Pipeline is PREROLLING ...
NvMMLiteOpen : Block : BlockType = 261 
NvMMLiteBlockCreate : Block : BlockType = 261 
INFO:
perf: perf0; timestamp: 5:08:16.088053287; bps: 0,000; mean_bps: 0,000; fps: 0,000; mean_fps: 0,000
INFO:
perf: perf1; timestamp: 5:08:16.142604236; bps: 0,000; mean_bps: 0,000; fps: 0,000; mean_fps: 0,000
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
INFO:
perf: perf0; timestamp: 5:08:17.109454515; bps: 11776,000; mean_bps: 0,000; fps: 28,392; mean_fps: 28,392
INFO:
perf: perf1; timestamp: 5:08:17.149375712; bps: 1592524800,000; mean_bps: 0,000; fps: 24,832; mean_fps: 24,832
INFO:
perf: perf0; timestamp: 5:08:18.131604155; bps: 15360,000; mean_bps: 15360,000; fps: 30,328; mean_fps: 29,360
INFO:
perf: perf1; timestamp: 5:08:18.175015010; bps: 2654208000,000; mean_bps: 2654208000,000; fps: 30,225; mean_fps: 27,528
INFO:
perf: perf0; timestamp: 5:08:19.164224023; bps: 15360,000; mean_bps: 15360,000; fps: 30,021; mean_fps: 29,580

And tegrastats output similar to the following:

sudo tegrastats --readall
06-03-2026 15:23:58 RAM 2523/15080MB (lfb 2680x4MB) SWAP 0/7540MB (cached 0MB) CPU [0%@2262,0%@2263,0%@2268,0%@2263,0%@2266,0%@2262,0%@2260,0%@2260] EMC_FREQ 0%@2133 GR3D_FREQ 0%@[1377] VIC_FREQ 115 APE 150 AUX@47C CPU@48.5C thermal@47.75C Tboard@48C AO@47.5C GPU@48C Tdiode@51C GPU 1082mW/1082mW CPU 928mW/928mW SOC 2319mW/2319mW CV 0mW/0mW VDDRQ 154mW/154mW SYS5V 2140mW/2140mW
06-03-2026 15:24:03 RAM 2540/15080MB (lfb 2679x4MB) SWAP 0/7540MB (cached 0MB) CPU [3%@2265,9%@2265,16%@2265,13%@2265,4%@2265,3%@2265,14%@2265,12%@2265] EMC_FREQ 0%@2133 GR3D_FREQ 13%@[1377] NVDEC 1075 NVDEC1 1075 VIC_FREQ 42%@115 APE 150 AUX@47C CPU@49.5C thermal@48.2C Tboard@48C AO@47.5C GPU@48.5C Tdiode@51C GPU 1081mW/1081mW CPU 1853mW/1390mW SOC 2779mW/2549mW CV 0mW/0mW VDDRQ 463mW/308mW SYS5V 2257mW/2198mW
06-03-2026 15:24:08 RAM 2541/15080MB (lfb 2679x4MB) SWAP 0/7540MB (cached 0MB) CPU [11%@2265,1%@2265,14%@2265,14%@2265,0%@2263,25%@2265,7%@2265,0%@2265] EMC_FREQ 5%@2133 GR3D_FREQ 0%@[1377] NVDEC 448 NVDEC1 448 VIC_FREQ 76%@128 APE 150 AUX@47.5C CPU@49.5C thermal@48.05C Tboard@48C AO@47.5C GPU@48.5C Tdiode@51C GPU 1235mW/1132mW CPU 1699mW/1493mW SOC 2780mW/2626mW CV 0mW/0mW VDDRQ 463mW/360mW SYS5V 2261mW/2219mW
06-03-2026 15:24:14 RAM 2524/15080MB (lfb 2680x4MB) SWAP 0/7540MB (cached 0MB) CPU [6%@2265,8%@2265,15%@2265,15%@2264,0%@2266,27%@2264,1%@2266,1%@2263] EMC_FREQ 5%@2133 GR3D_FREQ 0%@[1377] NVDEC 448 NVDEC1 448 VIC_FREQ 67%@128 APE 150 AUX@47.5C CPU@50C thermal@48.55C Tboard@48C AO@48C GPU@48.5C Tdiode@51.25C GPU 1235mW/1158mW CPU 1699mW/1544mW SOC 2780mW/2664mW CV 0mW/0mW VDDRQ 463mW/385mW SYS5V 2221mW/2219mW
06-03-2026 15:24:19 RAM 2523/15080MB (lfb 2680x4MB) SWAP 0/7540MB (cached 0MB) CPU [0%@2265,0%@2265,0%@2265,0%@2265,0%@2265,0%@2265,0%@2265,0%@2265] EMC_FREQ 2%@2133 GR3D_FREQ 0%@[1377] VIC_FREQ 115 APE 150 AUX@47C CPU@48.5C thermal@48.1C Tboard@48C AO@47.5C GPU@48.5C Tdiode@51C GPU 1082mW/1143mW CPU 928mW/1421mW SOC 2319mW/2595mW CV 0mW/0mW VDDRQ 154mW/339mW SYS5V 2140mW/2203mW
06-03-2026 15:24:24 RAM 2523/15080MB (lfb 2680x4MB) SWAP 0/7540MB (cached 0MB) CPU [0%@2259,0%@2265,0%@2269,0%@2257,0%@2266,0%@2267,0%@2264,0%@2262] EMC_FREQ 0%@2133 GR3D_FREQ 0%@[1377] VIC_FREQ 115 APE 150 AUX@47C CPU@49C thermal@47.9C Tboard@48C AO@47.5C GPU@48C Tdiode@51C GPU 1082mW/1132mW CPU 928mW/1339mW SOC 2319mW/2549mW CV 0mW/0mW VDDRQ 154mW/308mW SYS5V 2140mW/2193mW

For the tegrastats output NVDEC and NVDEC1 for decoder frequency, as well as the VIC_FREQ and RAM changing values.




Cookies help us deliver our services. By using our services, you agree to our use of cookies.