Libv4l2: error turning on stream: No space left on device VIDIOC_STREAMON: No space left on device

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))

     ret,frame =
     img = cv2.resize(frame, (256,144), interpolation=cv2.INTER_AREA)
     cv2.imshow("My cam video", img)

     ret1,frame1 =

     ret2,frame2 =

     if cv2.waitKey(1) &0XFF == ord('x'):




For running multiple USB cameras, we would suggest use PCIe - USB hub to leverage bandwidth of PCIe. Please refer to

Thanks DaneLLL,
I’ve searched on the amazon but prices did confuse me.

Here’s the one costing around 700INR (i.e around 10 USD)

and other one is costing around 4000INR (i.e around 60 USD)
and it doesn’t requires external power

I can see forum has been updated and thats might be the reason you missed my last reply.

I went to the local shop to test the pcie card they had if it works with TX2 or not, but i found it shows it using lsusb -t command, but any device connected to it is not operable such as my pendrive or mouse.

It it better to have each port with host controller chipset, such as the suggested card

The description says:
By employing four host controller chipsets, each port operates on a separate independent transmission channel. Dedicating up to 5 Gbps to each USB port reduces performance bottlenecks, and effectively quadruples your total available to bandwidth to 20 Gbps.