VLC can't open USB camera on Raspberry Pi 4

*nix specific usage questions
LuckyT
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Dec 2018 01:14

VLC can't open USB camera on Raspberry Pi 4

Postby LuckyT » 16 Nov 2019 00:42

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

LuckyT
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Dec 2018 01:14

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

Postby LuckyT » 16 Nov 2019 03:10

Forgot to mention - camera works as expected in guvcview and other test programs :(

LuckyT
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Dec 2018 01:14

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

Postby LuckyT » 16 Nov 2019 05:55

Appears to be Raspian specific issue. Putting Ubuntu on the Pi everything worked as expected.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

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

Postby unidan » 16 Nov 2019 19:22

Hi, what usb camera is it ? does it do the same for any USB camera ? I could take a look at this sometime.

LuckyT
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Dec 2018 01:14

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

Postby LuckyT » 16 Nov 2019 20:35

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

LuckyT
Blank Cone
Blank Cone
Posts: 10
Joined: 05 Dec 2018 01:14

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

Postby LuckyT » 17 Nov 2019 00:41

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

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

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

Postby InTheWings » 22 Nov 2019 08:30

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.
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

Dosperado
New Cone
New Cone
Posts: 9
Joined: 29 Dec 2019 12:24

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

Postby Dosperado » 29 Dec 2019 12:33

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!

Dosperado
New Cone
New Cone
Posts: 9
Joined: 29 Dec 2019 12:24

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

Postby Dosperado » 04 Jan 2020 17:38

Any estimated fix on this?

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 12 Jan 2020 16:36

I don't think the Raspian package maintainer(s) follow discussions here, so your question is unlikely to get a satisfactory answer.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Dosperado
New Cone
New Cone
Posts: 9
Joined: 29 Dec 2019 12:24

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

Postby Dosperado » 16 Jan 2020 14:37

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.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 25 guests