How to get raspberry pi v2 camera image using nvarguscamerasrc, without a display?

I am using following pipeline:

nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)10/1 ! nvvidconv flip-method=2 ! video/x-raw, width=(int)1280, height=(int)720, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink

and creating a cv2 camera with it using:

camera = cv2.VideoCapture(gstream_pipeline, cv2.CAP_GSTREAMER)

now together with an x server I can run my program and process my images and display results. Now I would like to be able to run the program without the need for an x server, from the command line or using supervisord. Now this fails with following error:

Gtk-WARNING **: 11:51:05.102: cannot open display:
CONSUMER: Done Success
WARNING Argus: 5 client objects still exist during shutdown:
548086147128 (0x7ee8003ca8) 548092474720 (0x7ee8001a80) 548092474880 (0x7ee8001b20) 548092480272 (0x7ee8001c80) 548092481568 (0x7ee8003b90)

I tried to replace appsink with fakesink but I get:

GStreamer warning: cannot find appsink in manual pipeline

Is there a way to get the image using nvarguscamerasrc and wrap it with a videocapture device, but without an x server and a display?

Hi,
Please refer to


Probably you miss certain driver.