gstreamer pipelines are specified by using a ! character. This check needs to also treat a path including a ! as a stream/URL case. This was found in the following discussion.
It might also be a good idea for v0.6.1 to allow constructing a VideoStreamCv2 directly from an existing VideoCapture object, which would avoid requiring any fixes like this in the future.
@Breakthrough Thanks for the example.
With the use case i am trying to get this run, the input is from a gstreamer pipe.
Like:
# in opencv how i read cap= cv2.VideoCapture("videotestsrc ! appsink")
# As per the example you sharedcam= VideoStreamCv2("videotestsrc ! appsink")when i tried the example with this it throws error
cam= VideoStreamCv2(source)
File"/usr/local/lib/python3.6/dist-packages/scenedetect/backends/opencv.py", line92, in__init__
self._open_capture(framerate)
File"/usr/local/lib/python3.6/dist-packages/scenedetect/backends/opencv.py", line297, in_open_captureraise OSError('Video file not found.')
Originally posted by @research-boy in #151 (comment)
gstreamer pipelines are specified by using a
!character. This check needs to also treat a path including a!as a stream/URL case. This was found in the following discussion.It might also be a good idea for v0.6.1 to allow constructing a
VideoStreamCv2directly from an existingVideoCaptureobject, which would avoid requiring any fixes like this in the future.Originally posted by @research-boy in #151 (comment)