Hello,
I’m currently trying to record 720p or 1080p videos with 3 usb cameras on tx2 using opencv and python. And later I’ll be using 5 usb cameras with TX2.
The video was getting recorded with 3 cameras simultaneously earlier but the video was playing back in timelapse like it wasn’t getting recorded at 30fps and now I’m unable to record with third camera with the error libv4l2: error turning on stream: No space left on device
VIDIOC_STREAMON: No space left on device
Python version is 3.6.9 and opencv version is 3.4.0
Waiting for the help
Here’s the code I’m using to record :
import cv2
import datetime as dt
vid_capture = cv2.VideoCapture(5)
vid_capture1 = cv2.VideoCapture(3)
vid_capture2 = cv2.VideoCapture(1)
vid_capture.set(3, 1920)
vid_capture.set(4, 1080)
vid_capture1.set(3, 1920)
vid_capture1.set(4, 1080)
vid_capture2.set(3, 1920)
vid_capture2.set(4, 1080)
vid_cod = cv2.VideoWriter_fourcc(*'H264')
output = cv2.VideoWriter("/Documents/Adwait2/111.mp4", vid_cod, 30.0, (1920,1080))
output1 = cv2.VideoWriter("/Documents/Adwait2/222.mp4", vid_cod, 30.0, (1920,1080))
output2 = cv2.VideoWriter("/Documents/Adwait2/333.mp4", vid_cod, 30.0, (1920,1080))
while(True):
ret,frame = vid_capture.read()
img = cv2.resize(frame, (256,144), interpolation=cv2.INTER_AREA)
cv2.imshow("My cam video", img)
output.write(frame)
ret1,frame1 = vid_capture1.read()
output1.write(frame1)
ret2,frame2 = vid_capture2.read()
output2.write(frame2)
if cv2.waitKey(1) &0XFF == ord('x'):
break
vid_capture.release()
vid_capture1.release()
vid_capture2.release()
output.release()
output1.release()
output2.release()
cv2.destroyAllWindows()