I am getting rtsp stream from IP camera and then passing the stream in opencv for getting frame, but i am getting distorted frame in that. But when i am using video file instead of rtsp stream frame is not distorted.
import cv2
video_capture = cv2.VideoCapture("rtsp://ip_address/onvif1")
while True:
ret, frame = video_capture.read()
cv2.imshow('Video', frame)
When streaming directly in vlc player and in ffmpeg frame is not distorting.