jamjammers007
Posts: 1
Joined: Thu Jan 25, 2018 1:01 pm

how to solve; VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Thu Jan 25, 2018 1:05 pm

VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
Unable to stop the stream: Device or resource busy

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7019
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: how to solve; VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Thu Jan 25, 2018 2:33 pm

What V4L2 device? What format?
"v4l2-ctl -V" will print out the currently selected resolution and format. At a guess it's a webcam putting out H264 (Logitech C920?) and OpenCV can't support that. "v4l2-ctl --list-formats" will list out all the formats your device supports. It is possible that it really doesn't have a compatible format.
("sudo apt install v4l-utils" if v4l2-ctl is not already installed).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Call Me Adept
Posts: 3
Joined: Tue Feb 13, 2018 7:57 pm

Re: how to solve; VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Wed Feb 14, 2018 11:48 am

I have the same problem and I'm still unable to find a solution anywhere.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7019
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: how to solve; VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Wed Feb 14, 2018 1:44 pm

Call Me Adept wrote:
Wed Feb 14, 2018 11:48 am
I have the same problem and I'm still unable to find a solution anywhere.
And yet you haven't answered any of the questions I asked the original poster.
Same questions to you - what device, and what format? "v4l2-ctl -D" and "v4l2-ctl -V"

(OP hung around the forums for 10 minutes after posting and hasn't returned since - I sometimes wonder why we bother).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Call Me Adept
Posts: 3
Joined: Tue Feb 13, 2018 7:57 pm

Re: how to solve; VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Wed Feb 14, 2018 1:47 pm

I got it to work now. Sorry for not giving enough information and thanks for replying

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7019
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: how to solve; VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Wed Feb 14, 2018 2:40 pm

Call Me Adept wrote:
Wed Feb 14, 2018 1:47 pm
I got it to work now. Sorry for not giving enough information and thanks for replying
So help out those who find themselves in the same situation in future, and say what you did to solve it.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.


aardvarko
Posts: 2
Joined: Fri Mar 23, 2018 12:24 am

Re: how to solve; VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Fri Mar 23, 2018 12:25 am

I am running into this too, with a SD image migrated from a Pi 3 to a Pi 3 B+. Any guesses what you did to fix it?

aardvarko
Posts: 2
Joined: Fri Mar 23, 2018 12:24 am

Re: how to solve; VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Fri Mar 23, 2018 1:05 am

my machine was having camera module problems, turns out. this was opencv's way of saying "halp" altogether. I reenabled the camera module in raspi-config and reseated the fpc and it is no longer causing this yack.

111Muhammad
Posts: 26
Joined: Thu Oct 11, 2018 4:29 pm

Re: how to solve; VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Mon Apr 01, 2019 6:37 pm

i am having the same problem. please share it with us. thanks.

projectdrone2
Posts: 3
Joined: Thu May 02, 2019 4:35 pm

Re: how to solve; VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Thu May 02, 2019 4:47 pm

@Call Me Adept, could you please share how you fixed the issue? Thanks in advance.

@aardvarko, what do you mean by
reseated the fpc
?

projectdrone2
Posts: 3
Joined: Thu May 02, 2019 4:35 pm

Re: how to solve; VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Thu May 09, 2019 9:00 pm

I found a workaround which is to open and immediately close a cam then reopen it!

so instead of

Code: Select all

cam = cv2.VideoCapture(0)
do

Code: Select all

cam = cv2.VideoCapture(0)
cam.release()
cam = cv2.VideoCapture(0)
Hope it works for you as well!

Return to “Interfacing (DSI, CSI, I2C, etc.)”