how to process the 'frame' (opencv) into a video streaming and real-time transmission to other servers [closed]
I am a beginner in opencv(python) and spent a lot of time . I want to record video and real-time transport to the other server. here is the code. import cv2
cap = cv2.VideoCapture(0)
out = cv2.VideoWriter('output.avi', cv2.cv.CV_FOURCC('M', 'J', 'P', 'G'), 20.0, (640,480))
while(cap.isOpened()): ret, frame = cap.read() if ret == True:
out.write(frame)
cv2.imshow('show', frame)
if cv2.waitKey(1) & 0XFF == ord('q'):
break
cap.release() out.release() cv2.destroyAllWindows()
i don't know what type of data is 'frame' and how to process it to be a stream to transport to the another server in real-time. hope someone help me to solve this problem
do you really need rtp ? or would a simple mjpeg do as well ?
i just wanna real-time transport the video stream ... and the rtp is what i think of the first protocol
maybe something as simple as this might get you started. (single thread,single client)
that's a task from my tutor... and i want to do that step by step. The final goal is that bulid a webcam... Do you have any advice to me ... THX
ahh, ok. no real idea then. writing a nice, fluid server is a hard task.
thx anyway
Hi sir! did you solve the problem, I also have the same problem to send the mat/images to rtmp server. Thanks!