Hello nvcsi and vi experts
The problem described below is new in jetpack-4.6. I never observed i t with jetpack-4.5.1 nor jetpack-4.3.1 or even jetpack-3.3.
In summary ‘with jetpack-4.6 on tx2, v4l2-ctl --stream-mmap’ needs to be preceded by ‘gst-launch-1.0 nvarguscamerasrc’ to work successfully.
After a fresh boot, the following v4l2-ctl video acquisition fails :
$ v4l2-ctl -d /dev/video1 -p 68.300
Frame rate set to 68.300 fps
$ v4l2-ctl -d /dev/video1 --stream-mmap=3 --stream-count=256 --set-fmt-video=width=2464,height=2056,pixelformat=GREY
[ 1619.417324] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 1619.424090] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
However, if thereafter I run a nvargus-based gstreamer pipeline, it works flawlessly :
+ gst-launch-1.0 -vv nvarguscamerasrc do-timestamp=true awblock=true aelock=true sensor-id=1 '!' 'video/x-raw(memory:NVMM),width=2464,height=2056,format=NV12,framerate=30/1' '!' nvvidconv '!' nvv4l2h264enc '!' h264parse '!' qtmux '!' filesink location=test_color_1080p.mp4 -e
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)2464, height=(int)2056, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)2464, height=(int)2056, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)2464, height=(int)2056, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/nvv4l2h264enc:nvv4l2h264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)2464, height=(int)2056, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)2464, height=(int)2056, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
Redistribute latency...
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
/GstPipeline:pipeline0/nvv4l2h264enc:nvv4l2h264enc0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)2464, height=(int)2056, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)2464, height=(int)2056, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)2464, height=(int)2056, format=(string)NV12, framerate=(fraction)30/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1936 x 1096 FR = 59,999999 fps Duration = 16666667 ; Analog Gain range min 1,000000, max 251,188705; Exposure Range min 16000, max 165770000;
GST_ARGUS: 2464 x 2056 FR = 68,300002 fps Duration = 14641288 ; Analog Gain range min 1,000000, max 251,188705; Exposure Range min 16000, max 165770000;
GST_ARGUS: Running with following settings:
Camera index = 1
Camera mode = 1
Output Stream W = 2464 H = 2056
seconds to Run = 0
Frame Rate = 68,300002
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
H264: Profile = 66, Level = 0
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)constrained-baseline, level=(string)5.1, width=(int)2464, height=(int)2056, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01424033ffe1000c67424033965401340207f2a001000468ce3c80
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstQTMuxPad:video_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)constrained-baseline, level=(string)5.1, width=(int)2464, height=(int)2056, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01424033ffe1000c67424033965401340207f2a001000468ce3c80
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = video/quicktime, variant=(string)apple
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)apple
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
And thereafter, the first v4l-ctl-based command works also perfectly :
$ v4l2-ctl -d /dev/video1 -p 68.300
Frame rate set to 68.300 fps
$ v4l2-ctl -d /dev/video1 --stream-mmap=3 --stream-count=256 --set-fmt-video=width=2464,height=2056,pixelformat=GREY
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 69.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 68.50 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 68.33 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
I have two sensors on that board, and the other one does not require nvargus usage to work, but that sensor is also not able to deliver a framerate as high as the one used above. Also on the /dev/video1 sensor, the problem does not happen when working with a lower framesize/framerate combination.
Of course I would like the first command to run perfectly the first time without needing first to run a nvargus pipeline.
I already tried to boost the nvcsi/vi and isp clock before running the command, but that does not help.
The sensor driver itself is unaware that it is called by nvarguscamerasrc or by v4l2-ctl and behave always the same. What do the nvcsi and vi drivers do when called from argus, that is not done when called by v4l2-ctl, and that is also not reverted when called by v4l2-ctl ?
Thanks in advance