Problem opening rtsp stream
Hello!
I am trying to capture an sdp file with vc2.VideoCapture using Python 2.7.13 and opencv 3.2.0 in win10 using:
cap = cv2.VideoCapture("my_file.sdp")
but cap.isOpened()
never becomes true
.
The program exits with code 0
and a message:
[rtp @ 07902760] Protocol not on whitelist 'file,crypto'!
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:779)
warning: my_file.sdp (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:780)
The sdp file plays ok from command line with ffplay –protocol_whitelist file,udp,rtp my_file.sdp
(For some unknown reason vlc shows only one frame…)
Any clues on how to proceed?
Thanks in advance, Vagelis
btw, i have no idea, how you even managed to type this:
“my_file.sdp”
you need plain
'
or"
, opencv only understands ascii !also, unlikely, that you can use sdp files. try with a proper (stream) url instead.
Hi berak and thank you for your comment. I have used regular double quotes in my code (I edited accordingly my question above) Also, the same code worked perfectly in my previous intallation of python and ocv on the same system... I don't know why it is not working now... V