Ask Your Question
0

libv4l2: error turning on stream: Invalid argument VIDIOC_STREAMON: Invalid argument

asked 2015-12-04 08:01:20 -0600

mannish gravatar image

I'm working on logitech external camera using opencv 3.0.0 and C++ on cross compiled raspberry pi 2 board,

When I run a program using the camera and stop it with Ctrl + C, I can't get it run for a second time and it gives me the following:

libv4l2: error turning on stream: Invalid argument VIDIOC_STREAMON: Invalid argument Cannot read a frame from video stream

I have tried lsusb and the webcam is recognized.

The only solution is to unplug & plug the webcam usb on raspberry pi 2 board.

Any suggestion will be appreciated :) thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-09-24 19:06:09 -0600

bleater gravatar image

An old question, but for those who stumble on this error in future:

You need to set the gpu memory to 128MB or greater. 'sudo raspi-config' and adjust value, or else add a line to /boot/config.txt that reads 'gpu-mem=128'.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-12-04 08:01:20 -0600

Seen: 4,262 times

Last updated: Dec 04 '15