Page 1 of 1

VLC can't open USB camera on Raspberry Pi 4

Posted: 16 Nov 2019 00:42
by LuckyT
I have a usb camera I'm trying to use with my RPi4. On my dev machine running Pop OS everything works great! Trying the exact same thing on the RPi4, I fail to get any image. I'm working python bindings, but the issue is reproducible in VLC itself. Both machines are running 3.0.8

Opening /dev/video/0 from Open Media -> Capture Device with absolutely no options I hear the camera physically "engage", I see the record indicator light come on, but nothing is displayed. The record indicator light stays on until I press stop in VLC. Besides narrowing things down to this basic case, I have tried increased the shared GPU memory 128/256/512 with no luck as well as tried the lower resolutions.

The only relevant error given is "buffer deadlock prevented"

Code: Select all

main debug: `v4l2:///dev/video0' successfully opened main debug: Buffering 0% main debug: Buffering 33% main debug: Buffering 66% main debug: Buffering 99% main debug: Stream buffering done (399 ms in 399 ms) main error: buffer deadlock prevented SITS HERE UNTIL I PRESS STOP main debug: Decoder wait done in 0 ms main debug: incoming request - stopping current input main debug: killing decoder fourcc `MJPG' main debug: removing module "mmal_codec" main debug: removing module "v4l2" main debug: Program doesn't contain anymore ES main debug: dead input main debug: nothing to play qt debug: IM: Deleting the input

Re: VLC can't open USB camera on Raspberry Pi 4

Posted: 16 Nov 2019 03:10
by LuckyT
Forgot to mention - camera works as expected in guvcview and other test programs :(

Re: VLC can't open USB camera on Raspberry Pi 4

Posted: 16 Nov 2019 05:55
by LuckyT
Appears to be Raspian specific issue. Putting Ubuntu on the Pi everything worked as expected.

Re: VLC can't open USB camera on Raspberry Pi 4

Posted: 16 Nov 2019 19:22
by unidan
Hi, what usb camera is it ? does it do the same for any USB camera ? I could take a look at this sometime.

Re: VLC can't open USB camera on Raspberry Pi 4

Posted: 16 Nov 2019 20:35
by LuckyT
It's a document camera - Ipezo VZ-R
https://www.ipevo.com/prods/VZ-R_HDMI_8MP_Camera
Unfortunately I don't have any other cameras to try

Re: VLC can't open USB camera on Raspberry Pi 4

Posted: 17 Nov 2019 00:41
by LuckyT
Ok I got this working -
It's something to do with the VLC package in the Raspian repo, though I don't know enough about this stuff to determine what/why.

raspian repo
purge vlc
install vlc - says ~200kb will be used

using https://www.deb-multimedia.org buster main non-free
purge vlc
install vlc = says ~28mb will be used and downloads a bunch of deps

Everything works as after using that repo :-|

Re: VLC can't open USB camera on Raspberry Pi 4

Posted: 22 Nov 2019 08:30
by InTheWings
Ok I got this working -
It's something to do with the VLC package in the Raspian repo, though I don't know enough about this stuff to determine what/why.

raspian repo
purge vlc
install vlc - says ~200kb will be used
If the repo provides vlc as multiple packages (one per module), that's only the core.

Re: VLC can't open USB camera on Raspberry Pi 4

Posted: 29 Dec 2019 12:33
by Dosperado
After I updated my Raspberry PIs 4 i encounter the same problem when i try to capture the h.264 stream to HDD from my Logitech C920 Webcams (with cvlc from the command line)
It worked like a charm before and i never had any problems but with the latest update the capture from my webcams stopped working with following message:

vlc@raspberrypi:~ $ [b350a8f8] main decoder error: buffer deadlock prevented

To reproduce the error I did a clean raspian image install and a fresh vlc install from the standard repository with apt-get install vlc. When i start to capture i now get this buffer deadlock error and the cam isn't recording anything.
This NEVER happened before. An this happens on all my raspberry pi's. And i have 4 cams on 4 raspberry pi's and all stopped working suddenly. I changed nothing except an apt-get upgrade after apt-get update.

So this is to 120% a problem with the vlc packages in the raspbian repository! This is reproducable.

How can I change the repository for vlc to a working one? I need to get this working again asap.

Many thanks!

Re: VLC can't open USB camera on Raspberry Pi 4

Posted: 04 Jan 2020 17:38
by Dosperado
Any estimated fix on this?

Re: VLC can't open USB camera on Raspberry Pi 4

Posted: 12 Jan 2020 16:36
by RĂ©mi Denis-Courmont
I don't think the Raspian package maintainer(s) follow discussions here, so your question is unlikely to get a satisfactory answer.

Re: VLC can't open USB camera on Raspberry Pi 4

Posted: 16 Jan 2020 14:37
by Dosperado
Hmm, I get the same error on a fresh ubuntu server installtion with vlc for rpi 4. I guess its not the problem with the raspian repository then...must be a bug in one of the vlc packages.