I executed this code in the terminal and the camera opened successfully:
$ export DISPLAY=:0
$ gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=3264, height=2464, format=NV12, framerate=21/1’ ! nvegltransform ! nveglglessink
but this code didnot open the camera:
> $ gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3264, height=2464, format=NV12, framerate=21/1' ! nvvidconv flip-method=4 ! video/x-raw, width=640, height=480, format=BGRx ! videoconvert ! video/x-raw, format=BGR ! fakesink
> ```
it kept showing these lines:
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> GST_ARGUS: Creating output stream
> CONSUMER: Waiting until producer is connected...
> GST_ARGUS: Available Sensor modes :
> GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
>
> GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
>
> GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
>
> GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
>
> GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
>
> GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
>
> GST_ARGUS: Running with following settings:
> Camera index = 0
> Camera mode = 0
> Output Stream W = 3264 H = 2464
> seconds to Run = 0
> Frame Rate = 21.000000
> GST_ARGUS: Setup Complete, Starting captures for 0 seconds
> GST_ARGUS: Starting repeat capture requests.
> CONSUMER: Producer has connected; continuing.