Hi.
I’m testing the H.264 encoder of Jetson Nano with the MMAPI 10_camera_recording sample code. The FPS of the sample code is around 21fps. Would you tell me why the code cannot achieve 30fps? I’m using the Raspberry Pi v2 camera for video input.
$ sudo nvpmodel -m 0
$ sudo jetson_clocks
$ ./camera_recording -s
Set governor to performance before enabling profilerPRODUCER: Creating output stream
PRODUCER: Launching consumer thread
Opening in BLOCKING MODE
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
875967048
842091865
create video encoder return true
H264: Profile = 100, Level = 50
PRODUCER: Starting repeat capture requests.
----------- Element = enc0 -----------
Total Profiling time = 4.89782
Average FPS = 21.0298
Total units processed = 104
Average latency(usec) = 2592
Minimum latency(usec) = 2304
Maximum latency(usec) = 6688
-------------------------------------
CONSUMER: Got EOS, exiting...
CONSUMER: Done.
PRODUCER: Done -- exiting.
************************************
Total Profiling Time = 0 sec
************************************
The GStreamer pipeline can achieve 30fps.
$ gst-launch-1.0 \
> nvarguscamerasrc ! \
> 'video/x-raw(memory:NVMM),width=1920,height=1080,framerate=30/1' ! \
> queue ! \
> nvv4l2h264enc maxperf-enable=1 ! \
> fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 \
> -v
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = false
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 17, dropped: 0, current: 33.31, average: 33.31
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 33, dropped: 0, current: 30.02, average: 31.63
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 49, dropped: 0, current: 30.01, average: 31.08
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 65, dropped: 0, current: 30.01, average: 30.81
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 81, dropped: 0, current: 30.00, average: 30.65
Thanks.