Hi
I tried to write a video file from 4k camera(Connected to Jetson nano) using gstreamer pipeline.But fps is too low .The gstreamer pipeline used is given below
gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12,framerate=(fraction)16/1’ ! nvv4l2h264enc bitrate=80000 ! h264parse ! qtmux ! filesink location=2.mp4 -e
If resolution is 1920x1080 ,video is fine.What can be done in improving the fps?
Kindly help me
Thanks in advance
Hi,
On Jetson Nano, we can achieve 4Kp30 encoding, so the bottleneck should not be in encoder. Please rune the pipeline and check if your source can reach target framerate:
$ gst-launch-1.0 -v nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12,framerate=(fraction)16/1’ ! fpsdisplaysink text-overlay=0 video-sink=nvoverlaysink
Thanks for your reply.I tried this pipeline and it is working fine
Log
gst-launch-1.0 -v nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160,format=(string)NV12,framerate=(fraction)16/1’ ! fpsdisplaysink text-overlay=0 video-sink=nvoverlaysink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0: sync = true
Setting pipeline to PLAYING …
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)16/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)16/1
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)16/1
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)16/1
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)16/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)16/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 16.670000 fps Duration = 59988004 ; Analog Gain range min 0.000000, max 72.000000; Exposure Range min 111000, max 44663000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3840 H = 2160
seconds to Run = 0
Frame Rate = 16.670000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0: sync = true
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 10, dropped: 0, current: 18.85, average: 18.85
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 19, dropped: 0, current: 17.22, average: 18.04
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 28, dropped: 0, current: 16.52, average: 17.53
why can’t we get this performance while writing into a file ?My real use case is RTMP streaming .That also not working properly.It also has the same issue which I have faced in writing into a video file.
Hi,
Please set the property to nvv4l2h264enc and try again:
maxperf-enable : Enable or Disable Max Performance mode
flags: readable, writable, changeable only in NULL or READY state
Boolean. Default: false
For confirming hardware encoding is good, suggest you save it to a video file and check framerate with Mediainfo.
Ok .I will check