Not getting frames from external camera

Hi im using Ubuntu 18.04. Im not getting frames fromexternal camera device from Sony EV9500L. Im trying to read frames in Pycharm IDLE.
import cv2
cap = cv2.VideoCapture(‘/dev/video0’)
while True:
ret, frame =
if ret:
cv2.imshow(“vidout”, frame)
cv2.moveWindow(“vidout”, 0, 0)
if cv2.waitkey(1)==ord(‘q’):

Also when a video file is provided in cv2.VideoCapture(‘cam.avi’) the frames are not displayed in cv2.imshow(“frames”, frame). Please help.

Even when i use this command it shows pipeline failed to create.
command:— nvgstcapture-1.0 --camsrc=0 --cap-dev-node=0

Do you integrate the driver for it?
Check below document for driver implement.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.