Question
v_file = cv2.VideoCapture('video_test.avi') ret, frame = v_file.read() data = cv2.imencode('.jpg', frame)[1].tostring() connectionSocket.sendall(data) ____________________________________________________________________ while (True): data = clientSocket.recv(90456) nparr = numpy.fromstring(data, numpy.uint8) frame = cv2.imdecode(nparr,
v_file = cv2.VideoCapture('video_test.avi') ret, frame = v_file.read() data = cv2.imencode('.jpg', frame)[1].tostring() connectionSocket.sendall(data)
____________________________________________________________________
while (True): data = clientSocket.recv(90456) nparr = numpy.fromstring(data, numpy.uint8) frame = cv2.imdecode(nparr, cv2.COLOR_BGR2GRAY) cv2.imshow('frame',frame) if cv2.waitKey(0) & 0xFF == ord('q'): break
The botton(client) receives a file video from the server(bold), but it is only showing the first frame. It is stuck there, and it doesn't play the entire video.
Need Ideas please (Python - Video Streaming service)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started