Connecting GoPro hero 6 black as a webcam

So you would display your camera, assuming you have an X display, with:

# Raw mode (YUYV 4:2:2):
gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-raw, format=YUY2, width=1280, height=720, framerate=30/1 ! xvimagesink
# if not working fine, try adding mmap 
gst-launch-1.0 v4l2src device=/dev/video2 io-mode=2 ! video/x-raw, format=YUY2, width=1280, height=720, framerate=30/1 ! xvimagesink

# MJPEG
gst-launch-1.0 v4l2src device=/dev/video2 ! image/jpeg,width=1280,height=720, framerate=30/1 ! jpegparse ! nvv4l2decoder mjpeg=1 ! nvvidconv ! xvimagesink
# or
gst-launch-1.0 v4l2src device=/dev/video2 ! image/jpeg,width=1280,height=720, framerate=30/1 ! jpegparse ! nvjpegdec ! 'video/x-raw(memory:NVMM),format=I420' ! nvvidconv ! xvimagesink

# Not sure for H264 through v4l2src...
gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! nvv4l2decoder ! nvvidconv ! xvimagesink