I am using python 3.10.12 and opencv-python 4.10.0.84.
I’ve written a code which plays a IP Camera RTSP Video using python and opencv.
Like this:
import cv2
cap = cv2.VideoCapture("rtsp://videoIP")
And I added a line for using UDP packets. (I want to connect with camera through rtsp using UDP. And it really supports it.)
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "rtsp_transport;udp"
After wrote this, wireshark says it is still TCP packet from camera IP.
I’ve erased my IPs, just camera source and my PC.
Why is it happend? I’ve already found some docs for opencv, ffmpeg but still I have no idea.
I already ask this question on stackoverflow (Why is it still TCP when I using python opencv rtsp capture option "udp"? - Stack Overflow). but I couldn’t get a clear answer.