Closed shersoni610 closed 1 year ago
@shersoni610 I don't think, FFmpeg directly supports PTZ camera You need to setup RTSP stream to be able to open that camera and use that RTSP stream address in FFdecoder.
But why integer index fails with the software. It works fine with opencv.
It works fine with opencv.
@shersoni610 That's because OpenCV supports backends other than FFmpeg, like Gstreamer and v4l2 etc., which supports these cameras. But DeFFcode is made entirely to work with FFmpeg backend only.
I was able to use ffmpeg -i 0:0 to get images from the camera
I was able to use ffmpeg -i 0:0 to get images from the camera
@shersoni610 Paste the output of ffmpeg -i 0:0
here.
Issue guidelines
Issue Checklist
Describe your Question
Hello,
I am trying to open a PTZ Camera on a MAC machine. I get the following errors:
(deff) $ python ex4.py 12:04:20 :: Utilities :: INFO :: Running DeFFcode Version: 0.2.4 12:04:21 :: FFhelper :: DEBUG :: Final FFmpeg Path: ffmpeg 12:04:21 :: FFhelper :: DEBUG :: FFmpeg validity Test Passed! 12:04:21 :: FFhelper :: DEBUG :: Found valid FFmpeg Version:
decoder = FFdecoder("0", frame_format="bgr24", verbose=True).formulate()
File "/Users/Projects/CompVis/OpenCV/VideoCapture/deffcode/deff/lib/python3.8/site-packages/deffcode/ffdecoder.py", line 188, in init
Sourcer(
File "/User/Projects/CompVis/OpenCV/VideoCapture/deffcode/deff/lib/python3.8/site-packages/deffcode/sourcer.py", line 307, in probe_stream
raise ValueError(
ValueError: Invalid source with no decodable audio or video stream provided. Aborting!
(deff) $
b'5.1.2'
installed on this system 12:04:21 :: Sourcer :: DEBUG :: Found valid FFmpeg executable:ffmpeg
. 12:04:21 :: Sourcer :: CRITICAL :: Given source0
is a valid device index. Enforcing 'auto' demuxer. 12:04:21 :: FFhelper :: DEBUG :: Auto-Searching for valid devices... 12:04:21 :: FFhelper :: INFO :: [0]: MINRRAY-TOP 12:04:21 :: FFhelper :: INFO :: [1]: OBS Virtual Camera 12:04:21 :: FFhelper :: INFO :: [2]: Capture screen 0 12:04:21 :: FFhelper :: DEBUG :: Auto-Search completed successfully! Found3
valid device(s). 12:04:21 :: Sourcer :: DEBUG :: Successfully configured deviceMINRRAY-TOP
at index0
with demuxeravfoundation
. Traceback (most recent call last): File "ex4.py", line 6, inTerminal log output(Optional)
No response
Python Code(Optional)
No response
DeFFcode Version
0.2.4
Python version
3.10
Operating System version
MAC
Any other Relevant Information?
No response