Need help getting Nano working with opencv

I have a waveshare imx219 ir camera. I can get it working in shell with the following command:

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

I am using the preinstaled version of opencv(3.3.1) and using the following code but not getting any picture:

cam = ('nvarguscamerasrc ! video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1 ! videoconvert ! video/x-raw, format=(string)BGR ! appsink')
video_capture = cv2.VideoCapture(cam, cv2.CAP_GSTREAMER)

Also, Python 3.6 seems to take forever to run. It took like 10 seconds to store some variables and open a file that was pretty small.

This works:

cam = ('nvarguscamerasrc ! video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1 ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink')
video_capture = cv2.VideoCapture(cam, cv2.CAP_GSTREAMER)