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

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

Hi,
For running multiple USB cameras, we would suggest use PCIe - USB hub to leverage bandwidth of PCIe. Please refer to
https://devtalk.nvidia.com/default/topic/1027100/jetson-tx2/stream-4-cameras-with-gstreamer/post/5224016/#5224016

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)

https://www.amazon.in/Ultima-Cords-Cables-3-0-Connector/dp/B0728MLSVW/ref=asc_df_B0728MLSVW/?tag=googleshopdes-21&linkCode=df0&hvadid=397009562803&hvpos=&hvnetw=g&hvrand=18041448127836252956&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9062117&hvtargid=pla-846255698550&psc=1&ext_vrnc=hi

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

https://www.amazon.in/Optimized-Ports-Inateck-Expansion-Version/dp/B00I027GPC/ref=pd_sbs_147_9?_encoding=UTF8&pd_rd_i=B00I027GPC&pd_rd_r=91a296a3-6254-49ae-b7e1-085f9743ad73&pd_rd_w=75wTl&pd_rd_wg=OtI40&pf_rd_p=fbf43daf-8fb3-47b5-9deb-ae9cce3969a9&pf_rd_r=XH8GAEVDHF82K9MPS609&psc=1&refRID=XH8GAEVDHF82K9MPS609

@DaneLLL
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.

Hi,
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.