Capturing image with IMX219 using G streamer via V4l2src

On trying to capture image with IMX219 on Jetson Nano using the command:
gst-launch-1.0 v4l2src num-buffers=1 ! jpegenc ! filesink location=test-img.jpg

This is the error i get :
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

IMX219 is bayer sensor the v4l2 framework didn’t include the ISP to debayer the raw data.
So you can use v4l2 to for any bayer sensor, You need to run argus APP or nvarguscamerasrc.

DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e

Hey @ShaneCCC,

Thanks for the reply.
Is there a way to capture the raw data from v4l2src surpassing the ISP, using gst-Launch-1.0 ?

Do you mean bypass ISP?
You can use the v4l2-ctl to dump the raw image or modify the v4l2src for it.